Add a stop button to the player and resume after a server outage
The full player had no way to stop: Back only moved playback to the miniplayer. A stop button now sits with the right-hand controls and closes the player outright, as the miniplayer's close button does. When the server went away mid-stream, mpv played out its buffer and then took the cut-off stream for the end of the file: the title counted as ended (opening Up Next for episodes), and Play restarted it from 0. A stream ending more than 15 s before its duration is now treated as a lost connection: the player shows "Lost connection to <server>", checks /identity every few seconds, and reloads in place at the same position (staying in the miniplayer) once the server answers; Play tries at once. A second cut-off at the same spot counts as the real end of the file. A file left paused at its end (keep-open) re-paused as soon as it was unpaused, so the reload is unpaused again after loadfile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
6775d29249
commit
624f01f745
5 changed files with 152 additions and 12 deletions
|
|
@ -13,6 +13,7 @@ const PATHS: Record<string, string> = {
|
|||
arrowLeft: '<path d="M19 12H5m6-6-6 6 6 6"/>',
|
||||
play: '<path d="M7 4.8v14.4a.8.8 0 0 0 1.2.7l11.6-7.2a.8.8 0 0 0 0-1.4L8.2 4.1a.8.8 0 0 0-1.2.7Z" fill="currentColor" stroke="none"/>',
|
||||
pause: '<rect x="6" y="4.5" width="4" height="15" rx="1.2" fill="currentColor" stroke="none"/><rect x="14" y="4.5" width="4" height="15" rx="1.2" fill="currentColor" stroke="none"/>',
|
||||
stop: '<rect x="5.5" y="5.5" width="13" height="13" rx="1.6" fill="currentColor" stroke="none"/>',
|
||||
plus: '<path d="M12 5v14M5 12h14"/>',
|
||||
minus: '<path d="M5 12h14"/>',
|
||||
check: '<path d="m5 12.5 4.2 4.2L19 7"/>',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue