MediaSession got broken #6
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
stefan/nuxt-om#6
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Somewhere along the way MediaSession stopped working.
Probably
720d65b03fis one of the last commits where we can see MediaSession.Got it!
This function somehow stops MediaSession. If I comment out it - MediaSession works.
@PeWe79 any thoughts on this?
Yeah, the issue is that your function adds event listeners to the entire document.body. These listeners interfere with Media Session initialization. Hm..
Hi @gAlleb , actualy cause AudioContext was mount premature (on initPlayer) was mount via app, so AudioContext was block. Other solution is AudioContext mount after "do something" may look click togglePlay or call initPlayer after togglePlay.
oh, I see! Thank you!
Hm, even if I call initPlayer on Button togglePlayAll or other one instead of onMounted hook - mediasession won't start either. AudioContext is not blocked anymore on Chrome but still no mediasession (at least on iOS).
So it's somehow mediasession doesn't like if AudioContext is started NOT onMounted. Because if we call initPlayer on event or resume AudioContext on event - mediasession doesn't start. And it's not connected to event listeners. Hm.