You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.
For some reason the "Brave" developers seem to have taken the decision to restrict use of HTMLMediaElement play() via script. Pages that automatically playback mp3 music using the HTMLMediaElement will no longer work. See respective error message in console:
"Failed to execute 'play' on 'HTMLMediaElement': API can only be initiated by a user gesture.
Uncaught (in promise) DOMException: play() can only be initiated by a user gesture."
It seems "Brave" is not blocking automatic music/mp3 playback per se, but just one specific implementation approach (other implementation approaches still work, e.g. https://www.wothke.ch/modum/).
As you may recall, use of the "built-in" element is advisable so that "shitty" browsers that have problems with mp3's licensing model can still play mp3 using the OS's built-in implementation. Actually there is a good reason why pages are using HTMLMediaElement play() to playback mp3 files: This approach has the benefit that playback can be started as soon enough data has been transmitted - without having to wait for the complete file to have downloaded first. Blocking the script's use of "play()" would force pages to use slower approaches instead making for a more unpleasant user experience - which is unacceptable to me.
On the other hand I don't see any compelling benefit to the user why "play()" should be blocked.
As long as this user unfriendly policy is in place I cannot recommend using "Brave" and I'll keep using one of the other browsers instead (which is unfortunate since apart from this annoying glitch "Brave" looks rather promising).
Description
For some reason the "Brave" developers seem to have taken the decision to restrict use of HTMLMediaElement play() via script. Pages that automatically playback mp3 music using the HTMLMediaElement will no longer work. See respective error message in console:
"Failed to execute 'play' on 'HTMLMediaElement': API can only be initiated by a user gesture.
Uncaught (in promise) DOMException: play() can only be initiated by a user gesture."
It seems "Brave" is not blocking automatic music/mp3 playback per se, but just one specific implementation approach (other implementation approaches still work, e.g. https://www.wothke.ch/modum/).
As you may recall, use of the "built-in" element is advisable so that "shitty" browsers that have problems with mp3's licensing model can still play mp3 using the OS's built-in implementation. Actually there is a good reason why pages are using HTMLMediaElement play() to playback mp3 files: This approach has the benefit that playback can be started as soon enough data has been transmitted - without having to wait for the complete file to have downloaded first. Blocking the script's use of "play()" would force pages to use slower approaches instead making for a more unpleasant user experience - which is unacceptable to me.
On the other hand I don't see any compelling benefit to the user why "play()" should be blocked.
As long as this user unfriendly policy is in place I cannot recommend using "Brave" and I'll keep using one of the other browsers instead (which is unfortunate since apart from this annoying glitch "Brave" looks rather promising).
Steps to Reproduce
Brave Version
0.19.88 (Win10 64-bit)
Additional Information
#11527
#10972 (comment)
The text was updated successfully, but these errors were encountered: