Pushing up video playback control stuff
This commit is contained in:
1 parent
92d6473e1d
commit
4e2520ee76
10 files changed
+509
-10
No files matched your search
@@ -47,8 +47,9 @@ Ctrl+C or SIGTERM stops the child process; a child that ignores termination is
|
||||
killed after two seconds. The player does not modify the database and currently
|
||||
does not apply `media_playback_option` records.
|
||||
|
||||
Until playback buttons are wired up, set selection flags directly in SQLite.
|
||||
For example, select media ID 3 without temporarily leaving several active rows:
|
||||
Use **Play Media** from the home page to select an item in the unified library.
|
||||
Alternatively, set selection flags directly in SQLite. For example, select media
|
||||
ID 3 without temporarily leaving several active rows:
|
||||
|
||||
```sql
|
||||
BEGIN;
|
||||
@@ -62,6 +63,39 @@ Flask and the player run separately; starting the web app alone does not start
|
||||
playback. The player requires a working graphical display/audio session, not
|
||||
just an SSH shell without display access.
|
||||
|
||||
## Media library and playback selection
|
||||
|
||||
Open **Play Media** from the homepage, or visit `/media`. All media types share
|
||||
one page, with a **Play** button per item and image/video/stream icons. Clicking
|
||||
Play clears the previous active selection and activates the new item in a single
|
||||
database transaction; default flags are preserved. The separate player picks up
|
||||
the change on its next two-second check.
|
||||
|
||||
A green border and **Selected** badge show the item selected for playback,
|
||||
including the default when no active item exists. The selection banner and badges
|
||||
refresh every two seconds. These indicators reflect the database's requested
|
||||
selection, not proof that FFplay is running or that a stream is healthy. Refresh
|
||||
the page to load newly added media or edited names/sources. Empty sources cannot
|
||||
be selected using the Play button.
|
||||
|
||||
Local images and videos receive lazy-loaded, cached PNG thumbnails generated by
|
||||
FFmpeg (the first video frame, scaled to at most 240×135). Cache files live in
|
||||
`.thumbnails/` beside `config.json` and are excluded from Git. Source path, size,
|
||||
and modification time determine the cache key; deleting this folder is safe and
|
||||
causes previews to regenerate. Streams use an icon without opening a network
|
||||
connection. Missing FFmpeg, unsupported files, or generation failures also fall
|
||||
back to the type icon. Thumbnail generation has a ten-second timeout.
|
||||
|
||||
Previews are restricted to files inside configured image, video, and legacy
|
||||
upload storage folders, including custom storage locations. Symlinks outside
|
||||
those folders are rejected, and FFmpeg's preview input is restricted to local
|
||||
file/pipe protocols. A local file outside those folders can still be selected
|
||||
for playback but has no preview. Media types are inferred from local filename
|
||||
extensions or URL schemes; no schema changes are required.
|
||||
|
||||
As with uploads, keep this interface on a trusted network until authentication
|
||||
and broader access controls are implemented.
|
||||
|
||||
## Uploading local videos
|
||||
|
||||
Use **Upload a Video** on the home page, or visit `/upload/video`. Enter a display
|
||||
@@ -204,5 +238,5 @@ WHERE youtube_download_job_id = 123
|
||||
Run the database and worker tests without downloading any videos:
|
||||
|
||||
```sh
|
||||
python3 -m unittest test.youtube_download_job_test test.youtube_download_web_test test.upload_video_test test.upload_photo_test test.player_test -v
|
||||
python3 -m unittest test.youtube_download_job_test test.youtube_download_web_test test.upload_video_test test.upload_photo_test test.player_test test.media_library_test -v
|
||||
```
|
||||
Reference in new issue
Block a user