mirror of
https://github.com/remvze/moodist.git
synced 2025-12-18 09:24:14 +00:00
feat: add media session (wip)
This commit is contained in:
parent
cf4870b0d6
commit
34d3f07581
1 changed files with 1 additions and 1 deletions
|
|
@ -96,6 +96,7 @@ export function App() {
|
||||||
Howler.masterGain.connect(dest);
|
Howler.masterGain.connect(dest);
|
||||||
|
|
||||||
if (audioElement.current) {
|
if (audioElement.current) {
|
||||||
|
audioElement.current.volume = 0;
|
||||||
audioElement.current.srcObject = dest.stream;
|
audioElement.current.srcObject = dest.stream;
|
||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|
@ -113,7 +114,6 @@ export function App() {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isPlaying) {
|
if (isPlaying) {
|
||||||
audioElement.current?.play().then(() => {
|
audioElement.current?.play().then(() => {
|
||||||
audioElement.current!.volume = 1;
|
|
||||||
navigator.mediaSession.metadata = new MediaMetadata({
|
navigator.mediaSession.metadata = new MediaMetadata({
|
||||||
title: 'Moodist',
|
title: 'Moodist',
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue