1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Fix old streamInfo on stream change

When the client changes the stream (fail to play) `streamInfo`
contains the old play session and the next progress report
will update the wrong session. The server then responds with
the wrong playback method until the next progress report.

Update `streamInfo` before playback start so that the data
is up to date.
This commit is contained in:
Dmitry Lyzo 2022-03-15 23:15:46 +03:00
parent 70814ba748
commit 93d3458fd0

View file

@ -1721,17 +1721,17 @@ class PlaybackManager {
}
function setSrcIntoPlayer(apiClient, player, streamInfo) {
return player.play(streamInfo).then(function () {
const playerData = getPlayerData(player);
const playerData = getPlayerData(player);
playerData.streamInfo = streamInfo;
return player.play(streamInfo).then(function () {
playerData.isChangingStream = false;
playerData.streamInfo = streamInfo;
streamInfo.started = true;
streamInfo.ended = false;
sendProgressUpdate(player, 'timeupdate');
}, function (e) {
const playerData = getPlayerData(player);
playerData.isChangingStream = false;
onPlaybackError.call(player, e, {