Google and other browser vendors continuously balance the need for powerful web platform capabilities, with the need for a safe and great user experience. Recent changes in media autoplay and extension installation are aimed to reduce misuse of browser capabilities and may affect some WebRTC services.
WebRTC services can capture screen content using the chooseDesktopMedia API, which is only available to Chrome extensions. After September 12th, extensions will no longer be able to be installed “inline” using the chrome.webstore.install() API. Users can still install and use extensions, but will need to navigate to the extension details page in the Chrome Web Store to complete the install. Extensions that are already installed are not affected.
Google is in the process of implementing the standardized getDisplayMedia API for screen capture, which does not require a Chrome extension. However, this implementation is unlikely to be completed before the new Chrome Web Store changes take effect in September. We therefore recommend WebRTC services to update their extension installation method as outlined in this FAQ.
We recognize that this will cause some difficulty in the short term, but the end result of not needing a Chrome extension should lead to a significantly improved experience, and we are working to make that happen as soon as reasonably possible.
To combat the proliferation of auto-playing videos and ads, Chrome 66 introduced new policies that restrict usage of autoplay for <audio> and <video> elements. The policies will also be enabled for AudioContext (the Web Audio API) in Chrome 70, which will be released around October 16th. These changes may affect WebRTC-based services.
How it affects WebRTC services
MediaStreamTracks from PeerConnections or local devices that are played out in audio/video elements or in an AudioContext may not autoplay; per Chrome policy, a user gesture will be required before any attempt to play out audio.
General Recommendations
Developers should assume that media elements (<video> and <audio>) as well as Web Audio (AudioContext) may not be allowed to autoplay before a user gesture. Currently, such elements that have a MediaStream assigned via the srcObject attribute (as is the case in WebRTC applications) are allowed to autoplay, but this might change in the future. As such, WebRTC applications should ensure that a user gesture is received before trying to play MediaStreams. When autoplay is not allowed, this will result in a failed play() promise for media elemented and a suspended AudioContext for Web Audio. Developers should detect this, and enable audio (either by calling play() for media, or resume() for an AudioContext) after the next user gesture. More detailed recommendations, including debugging tips, can be found at https://developers.google.com/web/updates/2017/09/autoplay-policy-changes.
We will be evaluating the impact of this policy and possible improvements over the next few releases. While the intent is to allow autoplay in legitimate use cases, developers should assume that autoplay may require a user gesture in certain situations, including future policy adjustments or user settings.
WebRTC applications often use an AudioContext to implement a microphone volume meter to provide visual feedback to the user. As noted above, the current direction is that these uses of Web Audio will also require a user gesture (as of Chrome 70). While OfflineAudioContexts are exempted from the user gesture requirement, the use of MediaStreams with OfflineAudioContexts has been deprecated and therefore their use in the "volume meter" scenario is discouraged.
We recognize that Web Audio processing that results in no audio output is a legitimate use case and are evaluating various potential improvements for this scenario.
Hi,I don't know where to bring this up, but I found this post so I am starting here. Please let me know if there is somewhere else to take it. I wish that WebRTC would define a standard for clients to ask for policy permission upfront, and asking if that permission can be persistent. I make this requires because I am building a web app that runs on chrome and safari and mixes realtime media with recorded media - the purpose of the app is structured, large scale deliberative discussion (that's productive rather than polarizing). The problem that is the inconsistent policy experiences between implementations (chrome and safari) and the poor user experience this creates. I realize that you want to prevent abuse, and I am all for that because I hate it when sites play videos (with loud audio) unexpectedly.In chrome ( 71.0.3578.98 ), I have implemented a button to click on, that causes the user interaction that allows autoplay. But there is still a separate popup asking for permission to use the camera. On safari, (on iOS 12.1.2) it seems that I need to get permission each time I auto play (I auto play things in a sequence), also it seems there is 'lowered volumne' audio until there is another user interaction.
What I'm thinking is that my app (javascript running on the client) could request permissions at the beginning, permissions to access the camera, auto play video, audio, switch media sources, and what ever other policy questions we come up with. Much like a native application does when you download it. And that the user could choose if this was permitted one-time, for the day, for the page, or for the site.
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/0ab995c2-46dc-4d8b-9e93-0b7e34dbf6a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/0b7b2c58-e8d4-46a3-a1b2-dffe7985dea7%40googlegroups.com.