mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix theme song playback when switching items with different themes
When you change an item with a theme to an item with a different theme, the backdrop tries to access the player. The latter has not yet started playing the new theme (`streamInfo` is null), but is already considered playing. A runtime error occurs when referring to null `streamInfo` (to check if the content type matches). To fix the problem, set `streamInfo` just before playback starts.
This commit is contained in:
parent
0d3550c534
commit
d997d63d11
1 changed files with 5 additions and 2 deletions
|
@ -2385,8 +2385,11 @@ class PlaybackManager {
|
|||
|
||||
streamInfo.fullscreen = playOptions.fullscreen;
|
||||
|
||||
getPlayerData(player).isChangingStream = false;
|
||||
getPlayerData(player).maxStreamingBitrate = maxBitrate;
|
||||
const playerData = getPlayerData(player);
|
||||
|
||||
playerData.isChangingStream = false;
|
||||
playerData.maxStreamingBitrate = maxBitrate;
|
||||
playerData.streamInfo = streamInfo;
|
||||
|
||||
return player.play(streamInfo).then(function () {
|
||||
loading.hide();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue