mirror of
https://github.com/deunix-educ/mediadeck.git
synced 2026-11-25 04:39:42 +01:00
Media tab: several players per file type, chosen by long press
Each type (sound, image, video) can now have 1 to 8 named players on /admin, reordered with the arrows; the first opens by default. A tap opens with it, a long press (or right click) on a file lists the others. The open_media message takes an optional opener id; the client can only name a player already configured for the file's type, and the command is still rebuilt from the database. Tablets receive player names and kinds (never the spec) and are notified on every change. media_openers (one row per type) becomes media_players; existing settings are migrated as unnamed players whose id is the type, so the old PUT /api/media/openers/<type> keeps working. A type always keeps a player. With real touch events the click following a long press landed on the chooser backdrop (closing it at once) or on one of its buttons (opening a player by mistake); clicks of the opening gesture are now ignored. Tests: store, migration, REST, WebSocket choice and refusals, and a Chromium test with touch long press, release click, Escape and right click. The UI tests no longer leave /admin before the token is stored. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
+5
-3
@@ -150,13 +150,15 @@ Changes show up on the tablet immediately.
|
||||
|
||||
The **Media** tab (shown as soon as at least one folder is configured) lists **sound**, **image** and **video** files
|
||||
as icons: subfolders, breadcrumb, back button, All / Sounds / Images / Videos filter, search. Tapping a file **opens it on the
|
||||
PC**; the tablet stays a remote control.
|
||||
PC**; the tablet stays a remote control. A **long press** (or a right click) offers the other players of the type when there are several.
|
||||
|
||||
- **Folders**: `[media] roots` in `config.toml` (absolute paths or `~/…`). Without this key, the user's Music, Videos
|
||||
and Pictures folders are used (read from `~/.config/user-dirs.dirs`, never the whole home folder). `roots = []`
|
||||
disables the tab. A single folder is opened directly; several appear as a first level.
|
||||
- **One special launcher per type** (Sound, Image, Video): the **file path is added as the last argument**. They are
|
||||
set on the `/admin` page, "Media file players" section, with the same rules as launchers:
|
||||
- **One or several players per type** (Sound, Image, Video): the **file path is added as the last argument**. They
|
||||
are set on the `/admin` page, "Media file players" section, with the same rules as launchers. Each player has a name;
|
||||
**the first one in the list opens by default** (a tap), the others are reached with a long press on the file. The ↑ ↓
|
||||
buttons change the order, hence the default player; at most 8 players per type, and a type always keeps at least one:
|
||||
|
||||
| Player | Command run | What the client can write |
|
||||
|---|---|---|
|
||||
|
||||
Reference in New Issue
Block a user