MediaSesssion API cannot work on muted(or volume is 0) media
Categories
(Core :: Audio/Video, defect)
Tracking
()
People
(Reporter: 709922234, Unassigned)
References
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:79.0) Gecko/20100101 Firefox/79.0
Steps to reproduce:
1.open https://mantou132.github.io/javascript-learn/media-session/muted.html
2.click play
3.click media key(e.g: F9
on macbook keyboard)
4.close this page, open https://mantou132.github.io/javascript-learn/media-session/volume.html do the same
Actual results:
Can use media key to pause video
Expected results:
Can't
sorry.
The play/pause media key on macbook keyboard is f8
Comment 2•4 years ago
•
|
||
We would enable the ability to control media when only the page has audible media at least once time [1]. The recommended way of determining the active media session in the spec [2] is also depending on the audio focus, which would be claimed by the window when the window becomes audible.
So if you unmute you video, then you can receive the media key since then, even if the media gets muted again.
[1] https://docs.google.com/document/d/1c4FivJpvAjjw9Uw-jn7X1UjGOoWkANXOulNyqDWs83w/edit#heading=h.ajhjxemmrj91
[2] https://w3c.github.io/mediasession/#audio-focus
Description
•