mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Improve NativeShell integration
- Move NativeShell calls into shell.js where possible to better group them - Add "updateVolumeLevel" API (not used yet)
This commit is contained in:
parent
bef58052fa
commit
7adc288ca6
3 changed files with 35 additions and 15 deletions
|
@ -1,5 +1,6 @@
|
|||
import playbackManager from 'playbackManager';
|
||||
import nowPlayingHelper from 'nowPlayingHelper';
|
||||
import shell from 'shell';
|
||||
import events from 'events';
|
||||
/* eslint-disable indent */
|
||||
|
||||
|
@ -127,8 +128,7 @@ import events from 'events';
|
|||
});
|
||||
} else {
|
||||
const itemImageUrl = seriesImageUrl(item, { maxHeight: 3000 }) || imageUrl(item, { maxHeight: 3000 });
|
||||
|
||||
window.NativeShell.updateMediaSession({
|
||||
shell.updateMediaSession({
|
||||
action: eventName,
|
||||
isLocalPlayer: isLocalPlayer,
|
||||
itemId: itemId,
|
||||
|
@ -182,7 +182,7 @@ import events from 'events';
|
|||
/* eslint-disable-next-line compat/compat */
|
||||
navigator.mediaSession.metadata = null;
|
||||
} else {
|
||||
window.NativeShell.hideMediaSession();
|
||||
shell.hideMediaSession();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue