Merge pull request #6271 from thornbill/media-session-subscriber
Refactor media session to playback subscriber
This commit is contained in:
@@ -21,8 +21,9 @@ import { includesAny } from '../../utils/container.ts';
|
||||
import { getItems } from '../../utils/jellyfin-apiclient/getItems.ts';
|
||||
import { getItemBackdropImageUrl } from '../../utils/jellyfin-apiclient/backdropImage';
|
||||
|
||||
import { bindMediaSegmentManager } from 'apps/stable/features/playback/utils/mediaSegmentManager';
|
||||
import { PlayerEvent } from 'apps/stable/features/playback/constants/playerEvent';
|
||||
import { bindMediaSegmentManager } from 'apps/stable/features/playback/utils/mediaSegmentManager';
|
||||
import { bindMediaSessionSubscriber } from 'apps/stable/features/playback/utils/mediaSessionSubscriber';
|
||||
import { MediaError } from 'types/mediaError';
|
||||
import { getMediaError } from 'utils/mediaError';
|
||||
import { toApi } from 'utils/jellyfin-apiclient/compat';
|
||||
@@ -3663,7 +3664,6 @@ export class PlaybackManager {
|
||||
});
|
||||
}
|
||||
|
||||
bindMediaSegmentManager(self);
|
||||
if (!browser.tv && !browser.xboxOne && !browser.ps4) {
|
||||
this._skipSegment = bindSkipSegment(self);
|
||||
}
|
||||
@@ -4230,6 +4230,8 @@ export class PlaybackManager {
|
||||
}
|
||||
|
||||
export const playbackManager = new PlaybackManager();
|
||||
bindMediaSegmentManager(playbackManager);
|
||||
bindMediaSessionSubscriber(playbackManager);
|
||||
|
||||
window.addEventListener('beforeunload', function () {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user