mirror of
https://github.com/remvze/moodist.git
synced 2026-01-03 18:50:31 -05:00
feat: add media session (wip)
This commit is contained in:
parent
f79e941527
commit
fc1bd07b7d
@ -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…
x
Reference in New Issue
Block a user