Pausing iframe media when not visible

Open
#1,468 2 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
html, javascript

Research direction

Review the explainer and specification linked in the issue to understand the 'media-playback-while-not-visible' permission policy. Examine the existing web-platform-tests (WPT) for this feature at the provided test links to see current test coverage. The task likely involves adding or updating tests in the WPT repository to ensure interoperability across browsers. Start by running the existing tests locally to understand the baseline, then identify gaps in test coverage for edge cases or browser-specific behaviors.

Written by the indexing model from the issue text.

Description

focus-area-proposal
Description

The media-playback-while-not-visible permission policy allows sites to automatically pause audible media playback of iframes when they're hidden (display: none, visibility: hidden, or width/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 are lifted. This allows developers to build more user-friendly experiences and improve performance by letting the browser handle the playback of content that is not visible to users.

<iframe src="https://foo.media.com" allow="media-playback-while-not-visible 'none'"></iframe>

Explainer: https://github.com/WICG/iframe-media-pausing/blob/main/explainer.md

Specification

https://wicg.github.io/iframe-media-pausing/

web-feature

https://github.com/web-platform-dx/web-features/issues/4292

Test Links
Additional Signals

Gecko Standards position: Positive (https://github.com/mozilla/standards-positions/issues/1082)
WebKit: No signal (https://github.com/WebKit/standards-positions/issues/409)

Standards discussion at https://github.com/whatwg/html/issues/10208

Dominant language
JavaScript
Stars
591
Forks
39
Avg merge
3h 8m
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from web-platform-tests/interop

All issues in web-platform-tests/interop

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.