Probe video durations at scan time
Parse the mp4 mvhd box in pure PHP (ffprobe fallback) for videos with no stored duration, so folder listings show durations before first play.
This commit is contained in:
@@ -106,8 +106,10 @@ attempt, and quiz scores count toward folder progress alongside videos.
|
||||
Completion is sticky — rewatching doesn't un-complete it.
|
||||
- Folder progress is computed over the folder's entire subtree using a path
|
||||
prefix match, with partial credit for videos in progress.
|
||||
- Video duration is captured from the browser on first play (no ffprobe
|
||||
dependency) and cached on the `videos` row.
|
||||
- Video duration is read at scan time by parsing the mp4's `mvhd` header in
|
||||
pure PHP (ffprobe fallback if the parse fails), so listings show durations
|
||||
before anyone plays the video. The browser still reports the duration on
|
||||
first play as a last-resort fallback.
|
||||
|
||||
## Production notes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user