This document extends the Web platform with the ability to direct audio output to non-default devices, when authorization is given. Authorization is necessary because playing audio out of a non-default device may be unexpected behavior to the user, and may cause a nuisance. For example, suppose a user is in a library or other quiet public place where she is using a laptop with system audio directed to a USB headset. Her expectation is that the laptop’s audio is private and she will not disturb others. If any Web application can direct audio output through arbitrary output devices, a mischievous website may play loud audio out of the laptop’s external speakers without the user’s consent.
To prevent these kinds of nuisance scenarios, the user agent must acquire the user’s consent to access non-default audio output devices. This would prevent the library example outlined earlier, because the application would not be authorized to play out audio from the system speakers.
The default audio output device is always authorized.
My thought exactly when the music started playing. But I think this could better be implemented in the browser/ via an extension. You can't trust users to follow a convention all the time.
Comments
There should be a rule that pages that autoplays background music should explicitly warn the user.
:-(
My thought exactly when the music started playing. But I think this could better be implemented in the browser/ via an extension. You can't trust users to follow a convention all the time.
EDIT: Someone found my comment worth downvoting.