-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Media autoplay permission #13
Comments
I'd be interested in hearing the use case for autoplaying videos with audio enabled. Can you provide a few more details? |
@marcoscaceres Hey, sorry for the delay. To be specific, I work on the Adobe Spark team on a product called Spark Video that is a video generating tool that allows users to record their narration for the video. It does not actually autoplay videos. The preview of the generated video is rendered via WebGL, and multiple audio files are played at different moments using timeOut delays. As a result this is being considered "autoplaying" the audio and is currently blocked in Safari TP by default since each audio isn't the direct result of a click. |
@mounirlamouri, thoughts? |
+1 for this Without this perm request it's a completely degraded experience |
At the moment, we do not want to expose a permission for autoplay. We might want to tell a website whether yes/no they can autoplay but not allow them to request this privilege nor offer a switch to users. |
Could you explain why? There are legitimate use cases on the web suffering from your strict decision, so an explanation is required. |
I also need this feature. The site riofestiv.al, a project carried out with the main international art festivals that exhibit in Rio de Janeiro, invites the visitor to create a play list from the videos registered in the gallery of the site. In the end, the visitor needs to see the play list created without having to play each video separately. A media autoplay permission would be useful in this case. |
If a question as fair as this is ignored, what hope is there? |
Commercial products with dashboard webpages that need audible alarms to sound automatically. The page is started and left open. User may not have clicked anything, The the "MEI" (chrome "interactiveness" metric) may be high and allow autoplay, but on first time visiting the device page, it needs to be guaranteed to work. |
Music and sound editing web applications are affected by this a lot. In a web app I am working on, we want to allow users to overlay sound effects on top of music, which automatically play at a given time. Safari blocks these sound effects, because while the user initially starts audio playback by clicking a button, these sound effects are considered "autoplay" and blocked. |
@marcoscaceres would be happy to help with this one! Please take a look on a screenshot below: As you see we even ask people a preference on autoplay to make sure user is comfortable with it. So we would love to request permission right there and handle it via browser native modal. So as current state - player act differently in different browsers and its brining a lot of confusion. |
+1 for @savroff - we're working on an online video chat, and we'd like to notify users when they get a message with sound. |
Working on digital displays, our only user is ourselves, this would make the process more straightforward. |
Going back to the OP, this issue was dealing with "permission request" of "Media autoplay". However, the Permission API is now limited to querying permissions only. I think this issue needs to move to either the media group or to HTML. @jernoble, as Chair of the Media WG, could you provide us with some guidance? |
@marcoscaceres this is extremely needed. We have a dashboard for employees (~100 people) that when the tab is open, and a task arrives, it makes a nice alarm bell sound. The use case is legit, and there is no problem when the first time the page loads, to pop up a permission consent screen (exactly like the Browser Notification consent screen: Notification.requestPermission) that the user can allow auto-playing alert sounds, or reject them permanently, or ignore the pop up. Otherwise, there is no proper alternative. |
@ndvbd, your use case seems subtly different from the video one. Just so I know where to best route your use case (or who else to ping at least), what HTML element or API are you using to play the alarm sound? |
@marcoscaceres It's an |
Transferring the issue to w3c/autoplay in the hope we can get a response here... |
FYI, the autoplay detection API is in the discussion, which might be the thing y'all are looking for? (although that is not a permission, it's a current status of whether a website can start autoplaying media) |
While detecting autoplay is a step in the right direction, I think what we all want is at least consistent behaviour. Today it's difficult to make something as simple as a playlist of songs. I work on a web app that allows users to create "mixes" from songs and we've tested MediaElement, WebAudio and MediaElementAudioSourceNode, they all have different behavior in different browsers, and it was a HUGE pain to make one song in the playlist trigger the next to play. Our solutions include doing things such as muting audio before playing it, playing it muted, then unmuting it, which is apparently considered valid by browsers, but playing them normally is not (even though a user gesture activated the playback). I don't think there will ever be a complete automatic solution that can cover all use cases, I understand the reluctance of having an autoplay permission request popup, but at least make the ruleset consistent and expand it so it covers all use cases. Maybe allow events originating from media which was started by a user action to start other media unmuted? Maybe once media has loaded from a URL after a user action, allow other media from that origin to autoplay? Maybe only allow autoplay if the html element is in the viewport and the tab is focused? Anything would be better than what we have today. I might be wrong about this but I even see browser vendors making autoplay exceptions for popular websites? Doesn't seem very fair. |
We have web conference/classroom app. Some of the main feature are Sharing webcam/Screensharing/Playing video by teacher ... |
|
Just fyi, I mounirlamouri is no longer working on this, so he might not respond. If anyone else can answer, that would be greatly appreciated. |
How has this not been addressed in a year ? 🤦♂️ |
FWIW the permission-policy autoplay addresses a site indicating that it allows autoplay in "general". However a browser can happily ignore this or have other conditions for blocking autoplay. For example, some might allow autoplay if the user touches the element, but not otherwise. Perhaps that kind of transient activation might be a good approach to be standardized, in particular also requiring the site permission. FYI Autoplay detection https://www.w3.org/TR/autoplay-detection/#query-by-a-media-type is enabled in Firefox nightly from FF110 |
As browsers are starting to disable auto-playing videos & audio it would be great if we could easily request autoplay permission. Currently the app I'm working on has legitimate uses for autoplay and I'm not looking forward to telling users to go dig into Settings to enable it.
The text was updated successfully, but these errors were encountered: