Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Intent to Experiment: Pause media playback on not-rendered iframes

137 views
Skip to first unread message

Chromestatus

unread,
Apr 21, 2025, 4:59:10 PMApr 21
to blin...@chromium.org, gabrie...@microsoft.com, ste...@microsoft.com

Contact emails

gabrie...@microsoft.com, ste...@microsoft.com

Explainer

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

Specification

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.



Blink component

Blink>Media

TAG review

None

TAG review status

Pending

Origin Trial documentation link

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

Risks



Interoperability and Compatibility

This feature is still being discussed with other browser vendors and the shape and functionality might not be final.



Gecko: No signal (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 web community seems to be interested in this feature, even though we may need to iterate on the user-facing API.

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



Goals for experimentation



Ongoing technical constraints

None



Debuggability

None



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

We have implemented Blink webtests. But they are not WPT's yet. - https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/media/media-playback-while-not-visible-permission-policy-cant-play-if-hidden.html?q=third_party%2Fblink%2Fweb_tests%2Fmedia%2Fmedia-playback-while-not-visible-permission-policy-cant-play-if-hidden.html&ss=chromium%2Fchromium%2Fsrc -https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/media/media-playback-while-not-visible-permission-policy-pause-when-hidden.html



DevTrial instructions

https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/IframeMediaPause/iframe_media_pausing.md#proposed-solution-media-playback-while-not-visible-permission-policy

Flag name on about://flags

None

Finch feature name

MediaPlaybackWhileNotVisiblePermissionPolicy,AudioContextInterruptedState

Requires code in //chrome?

False

Tracking bug

https://issues.chromium.org/issues/351354996

Estimated milestones

DevTrial on desktop 133


Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5082950457884672?gate=5165819033288704

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


This intent message was generated by Chrome Platform Status.

Domenic Denicola

unread,
Apr 22, 2025, 5:28:47 AMApr 22
to blink-dev, Chromestatus, gabrie...@microsoft.com, ste...@microsoft.com
Generally looks good, but there's a few things to tidy up...

On Tuesday, April 22, 2025 at 5:59:10 AM UTC+9 Chromestatus wrote:
Contact emails gabrie...@microsoft.com, ste...@microsoft.com

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

Specification 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.



Blink component Blink>Media

TAG review None

It might be worth filing this now to get feedback early. (Not a blocker for approving the I2E.)
 


TAG review status Pending

Origin Trial documentation link https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/IframeMediaPause/iframe_media_pausing.md

Risks


Interoperability and Compatibility

This feature is still being discussed with other browser vendors and the shape and functionality might not be final.



Gecko: No signal (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 web community seems to be interested in this feature, even though we may need to iterate on the user-facing API.

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



Goals for experimentation



Due to https://github.com/GoogleChrome/chromium-dashboard/issues/4155 (please upvote), this field gets lost when generating emails in Chrome Status. Could you copy it over for us?
You can move these into web platform tests as long as you use the .tentative naming scheme. (Not blocking for the I2E.)
 

DevTrial instructions https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/IframeMediaPause/iframe_media_pausing.md#proposed-solution-media-playback-while-not-visible-permission-policy

Flag name on about://flags None

Finch feature name MediaPlaybackWhileNotVisiblePermissionPolicy,AudioContextInterruptedState

Requires code in //chrome? False

Tracking bug https://issues.chromium.org/issues/351354996

Estimated milestones DevTrial on desktop 133

This one is pretty important: can you fill in the experiment milestones?

Gabriel Brito

unread,
Apr 22, 2025, 9:49:53 PMApr 22
to blink-dev, Domenic Denicola, Chromestatus, gabrie...@microsoft.com, ste...@microsoft.com
Ok. I can't seem to be able to regenerate the draft... But, I have addressed your feedback and updated the chrome status feature page where necesary. Thanks for the tip about the webtests. I will try to do it soon. Thanks for the feedback!


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

Experiment milestones: M137

Domenic Denicola

unread,
Apr 22, 2025, 10:01:37 PMApr 22
to Gabriel Brito, blink-dev, Domenic Denicola, Chromestatus, ste...@microsoft.com
Can you also fill in the OT end milestones? (The usual ending would be after 6 milestones, in 142, although earlier is also possible.)

--
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 blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/f29cc6a5-83b7-4bde-a450-302cb689e88an%40chromium.org.

Gabriel Brito

unread,
Apr 22, 2025, 10:13:23 PMApr 22
to blink-dev, Domenic Denicola, blink-dev, Chromestatus, ste...@microsoft.com, Gabriel Brito
Ok. Added M142 as the final milestone.

Domenic Denicola

unread,
Apr 22, 2025, 10:14:41 PMApr 22
to Gabriel Brito, blink-dev, Domenic Denicola, Chromestatus, ste...@microsoft.com
Thanks! LGTM to experiment from M137-M142.

Gabriel Brito

unread,
Apr 22, 2025, 10:23:12 PMApr 22
to blink-dev, Domenic Denicola, blink-dev, Chromestatus, ste...@microsoft.com, Gabriel Brito
Thanks for reviewing!
Reply all
Reply to author
Forward
0 new messages