mirror of
https://github.com/remvze/moodist.git
synced 2025-12-17 00:44:14 +00:00
feat: add media session (wip)
This commit is contained in:
parent
f79e941527
commit
fc1bd07b7d
1 changed files with 4 additions and 1 deletions
|
|
@ -13,10 +13,13 @@ export function useMediaSession() {
|
|||
title: 'Moodist - Ambient Sounds',
|
||||
});
|
||||
|
||||
navigator.mediaSession.playbackState = 'playing';
|
||||
|
||||
navigator.mediaSession.setActionHandler('play', function () {});
|
||||
navigator.mediaSession.setActionHandler('pause', function () {});
|
||||
navigator.mediaSession.setActionHandler('stop', function () {});
|
||||
} else {
|
||||
navigator.mediaSession.metadata = null;
|
||||
navigator.mediaSession.playbackState = 'paused';
|
||||
console.log('bye');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue