Contact emails [email protected], [email protected]
Explainer https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/IframeMediaPause/iframe_media_pausing.md Specification https://wicg.github.io/iframe-media-pausing Summary Adds a "media-playback-while-not-visible" permission policy to allow embedders to pause audible media playback of embedded iframes which are currently hidden - ie "display" property set to "none"; "visibility" property set to "hidden"; or zero-area (width or height equal to 0). While hidden, attempts made by the embedded iframe to render audible media will be blocked. When the frame is shown again the prohibitions should be lifted. This should allow developers to build more user-friendly experiences and to also improve the performance by letting the browser handle the playback of content that is not visible to users. Blink component Blink>Media Web Feature ID https://github.com/web-platform-dx/web-features/issues/4292 Motivation Web applications that host embedded media content via iframes may wish to respond to application input by temporarily hiding the media content. These applications may not want to unload the entire iframe when it's not rendered since it could generate user-perceptible performance and experience issues when showing the media content again. At the same time, the user could have a negative experience if the media continues to play and emit audio when not rendered. This proposal aims to provide web applications with the ability to control embedded media content in such a way that guarantees their users have a good experience when the iframe's render status is changed. Initial public proposal No information provided TAG review https://github.com/w3ctag/design-reviews/issues/1084 TAG review status Issues addressed Origin Trial Name media-playback-while-not-visible Permission Policy Goals for experimentation Gather feedback from web developers and validate that the current prototype implementation works as expected. We have added telemetry to measure how the feature is being exercised by users: - HTMLMediaElement's: - # of pauses while hidden - # of pauses because got hidden during playback - WebAudio AudioContext's - # of interruptions while hidden - # of interruptions because got hidden during playback Chromium Trial Name MediaPlaybackWhileNotVisiblePermissionPolicy Origin Trial documentation link https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/IframeMediaPause/iframe_media_pausing.md WebFeature UseCounter name kMediaPlaybackWhileNotVisiblePermissionPolicy Risks Interoperability and Compatibility Firefox has already shown official support, although, we can't say for sure when other browsers are going to implement this feature. Safari also seems to be unofficially supportive: https://github.com/whatwg/html/issues/10208#issuecomment-3060151372 Gecko: Positive (https://github.com/mozilla/standards-positions/issues/1082) WebKit: No signal (https://github.com/WebKit/standards-positions/issues/409) Web developers: Positive (https://github.com/whatwg/html/issues/10208) The community is supportive of resolving this problem using a permission policy. A commenter mentioned that the proposal fits well within the Permissions Policy API specification. They also agree that there is no workaround for this problem using current web API's. Feedback has been addressed to also include other invisibility scenarios like zero-area (height or width equal to 0) and to change the API name from "not-rendered" to "not-visible". Other signals: Ergonomics This feature will be used with other audio rendering API's, like HTMLMediaElement and Web Audio. This new behavior should only take effect if web pages explicitly opt-in by overriding the permission policy's default state. Moreover, once the permission policy is used, it should help Chromium to be more optimized by pausing audio rendering for content that is not visible for the user. Activation Developers need to opt-in by setting "allow" property of an iframe. For example: <iframe src="https://foo.media.com" allow="media-playback-while-not-visible 'none'"></iframe> WebView application risks Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications? None. This feature adds a new behavior that applications need to opt-in. Debuggability No information provided Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)? Yes Is this feature fully tested by web-platform-tests? Yes - https://wpt.fyi/results/html/semantics/embedded-content/media-elements/media-playback-while-not-visible-permission-policy?label=master&label=experimental&aligned&q=media-playback-while-not-visible-permission-policy - https://wpt.fyi/results/webaudio/the-audio-api/media-playback-while-not-visible-permission-policy?label=master&label=experimental&aligned&q=media-playback-while-not-visible-permission-policy DevTrial instructions https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/IframeMediaPause/HOWTO.md Flag name on about://flags media-playback-while-not-visible-permission-policy Finch feature name MediaPlaybackWhileNotVisiblePermissionPolicy Rollout plan Will ship enabled for all users Requires code in //chrome? False Tracking bug https://issues.chromium.org/issues/351354996 Availability expectation The feature will be available in Chromium browsers at first. Despite this, Mozilla supports the feature too and will implement it at some point. Adoption expectation Feature is used by specific partners to provide functionality within 3 months of launch in Chrome. Non-OSS dependencies Does the feature depend on any code or APIs outside the Chromium open source repository and its open-source dependencies to function? None. Estimated milestones Shipping on desktop 155 Origin trial desktop first 137 Origin trial desktop last 142 Origin trial extension 1 end milestone 145 DevTrial on desktop 137 Shipping on Android 155 Origin trial Android first 137 Origin trial Android last 142 Shipping on WebView 155 Origin trial WebView first 137 Origin trial WebView last 142 Anticipated spec changes Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (eg links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (eg, changing to naming or structure of the API in a non-backward-compatible way). Currently the feature is spec'ed to work with HTMLMediaElements and Web Audio AudioContexts. We'll work on incrementally integrating it with other media-playback apis like PiP, Audio Session API, and Media Session API: - https://github.com/WICG/iframe-media-pausing/issues/2 - https://github.com/WICG/iframe-media-pausing/issues/3 - https://github.com/WICG/iframe-media-pausing/issues/4 Link to entry on the Chrome Platform Status https://chromestatus.com/feature/5082950457884672?gate=5168819537707008 Links to previous Intent discussions Intent to Prototype: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/PH7PR00MB1638C5FA59458CE0BBDC1FA6D5D72%40PH7PR00MB1638.namprd00.prod.outlook.com Intent to Experiment: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/6806b191.170a0220.2f866a.0286.GAE%40google.com This intent message was generated by Chrome Platform Status. -- You received this message because you are subscribed to the Google Groups "blink-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/6a9af687.c266e0a9.3a8c99.0130.GAE%40google.com.
