mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Split then/catch. Remove explicit player destroying
This commit is contained in:
parent
d969fc2cdb
commit
f805bef9e5
1 changed files with 2 additions and 5 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue