mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-10 10:06:15 -08:00
fix(playback): apply saved player changes to mounted web players
WebPlayerViewComponent resolved the saved engine from a one-shot StorageMap snapshot taken at mount, so a player switch from the command palette or settings page confirmed via snackbar and persisted the setting while an already-mounted Xtream/Stalker player silently kept the previous engine. The same snapshot also made first play mount the default Video.js engine and swap to the saved one once the async read landed. Resolve the player (and recording folder) from the live SettingsStore signal instead and drop the snapshot entirely. Precedence is unchanged: temporary recovery override -> host playerOverride -> saved player -> Video.js. Hosts passing no override (Xtream/Stalker live layouts, the portal inline detail player) now track saved changes in place; first mount reads the already-loaded store, so the default engine no longer flashes. Regression coverage (all verified to fail with the fix reverted): three unit tests on the component and two Xtream live-route e2e tests — a palette switch reaching the mounted player without a layout remount, and a MutationObserver engines-ever-seen assertion that the saved engine mounts first time. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f7bb3a13db
commit
6eab0938ea
5 files changed
+243
-27
No files matched your search
@@ -364,7 +364,20 @@ Current contract:
|
||||
|
||||
The shared `WebPlayerViewComponent` is the central browser-player viewport for
|
||||
M3U, Xtream, and Stalker inline playback, including live streams opened from
|
||||
favorites and recently viewed collections. Video.js, HTML5, and ArtPlayer
|
||||
favorites and recently viewed collections.
|
||||
|
||||
The mounted engine resolves in a fixed order: temporary recovery override →
|
||||
host `playerOverride` input → the saved player read from the live
|
||||
`SettingsStore` signal (Video.js as the last-resort default). The saved player
|
||||
is deliberately NOT a mount-time storage snapshot: persisting a different
|
||||
player — from the settings page or the command palette — re-applies to every
|
||||
mounted `WebPlayerViewComponent` in place as a new playback application, and a
|
||||
first mount reads the already-loaded store value so the default engine never
|
||||
flashes before the saved one. Hosts that pass no `playerOverride` (the Xtream
|
||||
and Stalker live layouts, the portal inline detail player) rely on this live
|
||||
tracking.
|
||||
|
||||
Video.js, HTML5, and ArtPlayer
|
||||
report native media errors, hls.js errors, Video.js/VHS errors, Shaka errors,
|
||||
mpegts.js errors, and HLS manifest codec metadata into the DOM-free classifiers
|
||||
exported by `@iptvnator/playback/util`.
|
||||
|
||||
Reference in new issue
Block a user