← Back to release summary

Pause media playback on not-rendered iframes

Category
Multimedia
Type
New or changed feature
Status
In developer trial (Behind a flag) (Chrome In developer trial (Behind a flag))
Intent stage
None

Summary

Adds a "media-playback-while-not-rendered" permission policy to allow embedder websites to pause media playback of embedded iframes which aren't rendered - i.e. have their "display" property set to "none". 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.

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.

Standards & signals

Samples: https://gabrielsanbrito.github.io/media-playback-while-not-visible

Explainers: https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/IframeMediaPause/iframe_media_pausing.md

View on chromestatus.com