mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-19 03:48:18 -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);
|
||||
streamInfo.fullscreen = playOptions.fullscreen;
|
||||
getPlayerData(player).isChangingStream = false;
|
||||
return player.play(streamInfo).then(function () {
|
||||
return player.play(streamInfo).then(() => {
|
||||
loading.hide();
|
||||
onPlaybackStartedFn();
|
||||
onPlaybackStarted(player, playOptions, streamInfo);
|
||||
}, function () {
|
||||
}).catch(() => {
|
||||
// TODO: show error message
|
||||
self.stop(player);
|
||||
loading.hide();
|
||||
}).catch(() => {
|
||||
player.destroy();
|
||||
loading.hide();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user