w3c / mediasession

Media Session API
https://w3c.github.io/mediasession/
Other
129 stars 29 forks source link

Using MediaSession without playing audio? #328

Open pixelblob opened 6 months ago

pixelblob commented 6 months ago

Is it possible to use MediaSession without playing audio? I seem to be able to get away with this on chrome by using something like this: https://github.com/anars/blank-audio but firefox doesnt seem to think anything is playing... My usecase is controlling music that is not playing through the browser and using the browser as a sort of control panel for that external source of music.

marcoscaceres commented 6 months ago

So, no, it's really intended to play audio... at the same time, you could, in theory play a file with no actual sound. However, this is not really the intended use of the API, so Firefox might be getting clever and realizing the API is being (somewhat) misused.

@jan-ivar, thoughts?

jan-ivar commented 6 months ago

@pixelblob What are the symptoms and repro steps here? Does Firefox not play silent mp3 files?

cc @alastor0325 who might know more about Firefox behavior.