Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@ class MediaSessionSubscriber extends PlaybackSubscriber {
return resetMediaSession();
}

const player = this.player ?? this.playbackManager.getCurrentPlayer();
const isVideo = item.MediaType === MediaType.Video;
const isLocalPlayer = !!this.player?.isLocalPlayer;
const isLocalPlayer = !!player?.isLocalPlayer;

// Local players do their own notifications
if (isLocalPlayer && isVideo) {
Expand Down Expand Up @@ -149,6 +150,8 @@ class MediaSessionSubscriber extends PlaybackSubscriber {
}

onPlayerChange() {
// Player change events can fire before bindPlayerEvents updates this.player
this.player = this.playbackManager.getCurrentPlayer();
this.onMediaSessionUpdate({ type: 'timeupdate' });
}

Expand Down
Loading