diff options
| author | RblSb <msrblsb@gmail.com> | 2024-04-29 07:45:10 +0300 |
|---|---|---|
| committer | RblSb <msrblsb@gmail.com> | 2024-04-29 07:45:10 +0300 |
| commit | 5d2375cbb23dbe69a7afe7a691707be48397c6d9 (patch) | |
| tree | 2fe92ab48e83427b3a7e90855545f73c2c8daa3e /src/client/players | |
| parent | 9d844bbf3ac6be327325b13a91a6b33f73c49c1d (diff) | |
Video item fixes
- Fix youtube fallback, `videoItem.url` is now immutable
- JsApi.setVideoSrc now updates to supported player based on `url` arg
- Fix auto-pause when video is ended (with `requestLeaderOnPause`)
Diffstat (limited to 'src/client/players')
| -rw-r--r-- | src/client/players/Youtube.hx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/players/Youtube.hx b/src/client/players/Youtube.hx index 5308b63..7c98b3f 100644 --- a/src/client/players/Youtube.hx +++ b/src/client/players/Youtube.hx @@ -243,6 +243,7 @@ class Youtube implements IPlayer { onError: e -> { // TODO message error codes trace('Error ${e.data}'); + final item = player.getCurrentItem() ?? return; rawSourceFallback(item.url); } } @@ -258,9 +259,7 @@ class Youtube implements IPlayer { trace(info); return; }; - final item = player.getCurrentItem(); - item.url = format.url; - player.refresh(); + player.changeVideoSrc(format.url); }); main.send({ type: GetYoutubeVideoInfo, |
