mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Issue #5486: When changing player types, destroy old player
Signed-off-by: Kevin G <kevin@myplaceonline.com>
This commit is contained in:
parent
3a73467dba
commit
e11c8900c4
1 changed files with 11 additions and 2 deletions
|
@ -3423,7 +3423,7 @@ export class PlaybackManager {
|
|||
const nextItemPlayOptions = nextItem ? (nextItem.item.playOptions || getDefaultPlayOptions()) : getDefaultPlayOptions();
|
||||
const newPlayer = nextItem ? getPlayer(nextItem.item, nextItemPlayOptions) : null;
|
||||
|
||||
if (newPlayer !== player) {
|
||||
if (!newPlayer) {
|
||||
data.streamInfo = null;
|
||||
destroyPlayer(player);
|
||||
removeCurrentPlayer(player);
|
||||
|
@ -3431,12 +3431,21 @@ export class PlaybackManager {
|
|||
|
||||
if (errorOccurred) {
|
||||
showPlaybackInfoErrorMessage(self, 'PlaybackError' + displayErrorCode);
|
||||
} else if (nextItem) {
|
||||
} else if (newPlayer) {
|
||||
const apiClient = ServerConnections.getApiClient(nextItem.item.ServerId);
|
||||
|
||||
apiClient.getCurrentUser().then(function (user) {
|
||||
if (user.Configuration.EnableNextEpisodeAutoPlay || nextMediaType !== MediaType.Video) {
|
||||
self.nextTrack();
|
||||
|
||||
if (newPlayer !== player) {
|
||||
Events.trigger(self, 'playbackstop', [{
|
||||
player: player,
|
||||
state: state,
|
||||
nextItem: nextItem,
|
||||
nextMediaType: nextItem.MediaType
|
||||
}]);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue