mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Adjust mediaSession feature test for consistency
This commit is contained in:
parent
fccd99d0ef
commit
a224a87fc7
1 changed files with 2 additions and 2 deletions
|
@ -175,7 +175,7 @@ import connectionManager from 'connectionManager';
|
||||||
}
|
}
|
||||||
|
|
||||||
function hideMediaControls() {
|
function hideMediaControls() {
|
||||||
if (navigator.mediaSession) {
|
if ('mediaSession' in navigator) {
|
||||||
navigator.mediaSession.metadata = null;
|
navigator.mediaSession.metadata = null;
|
||||||
} else {
|
} else {
|
||||||
window.NativeShell.hideMediaSession();
|
window.NativeShell.hideMediaSession();
|
||||||
|
@ -206,7 +206,7 @@ import connectionManager from 'connectionManager';
|
||||||
playbackManager[name](currentPlayer);
|
playbackManager[name](currentPlayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (navigator.mediaSession) {
|
if ('mediaSession' in navigator) {
|
||||||
navigator.mediaSession.setActionHandler('previoustrack', function () {
|
navigator.mediaSession.setActionHandler('previoustrack', function () {
|
||||||
execute('previousTrack');
|
execute('previousTrack');
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue