mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-19 11:58:20 -07:00
Split then/catch. Remove explicit player destroying
This commit is contained in:
parent
d969fc2cdb
commit
f805bef9e5
@ -2240,17 +2240,14 @@ class PlaybackManager {
|
|||||||
const streamInfo = createStreamInfoFromUrlItem(item);
|
const streamInfo = createStreamInfoFromUrlItem(item);
|
||||||
streamInfo.fullscreen = playOptions.fullscreen;
|
streamInfo.fullscreen = playOptions.fullscreen;
|
||||||
getPlayerData(player).isChangingStream = false;
|
getPlayerData(player).isChangingStream = false;
|
||||||
return player.play(streamInfo).then(function () {
|
return player.play(streamInfo).then(() => {
|
||||||
loading.hide();
|
loading.hide();
|
||||||
onPlaybackStartedFn();
|
onPlaybackStartedFn();
|
||||||
onPlaybackStarted(player, playOptions, streamInfo);
|
onPlaybackStarted(player, playOptions, streamInfo);
|
||||||
}, function () {
|
}).catch(() => {
|
||||||
// TODO: show error message
|
// TODO: show error message
|
||||||
self.stop(player);
|
self.stop(player);
|
||||||
loading.hide();
|
loading.hide();
|
||||||
}).catch(() => {
|
|
||||||
player.destroy();
|
|
||||||
loading.hide();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user