Firefox/Block autoplay in background

From MozillaWiki
Jump to: navigation, search

Overview

Background

The Block Playback feature is designed to block media with enabled autoplay if the tabs are opened in the background. Videos which autoplay in the background will now have their load deferred until the tab is visible for the first time.
This avoids autoplay during session restore and premature playback.Resources will still be preloaded but Firefox will delay the start of playback until the tab that contain a video with an enabled autoplay is visited. Once a tab / RenderFrame has ever played media before, it's allowed to continue to autoplay/autoload indefinitely; this is to support playlist type applications.The main advantages of the Block Playback feature is that it prevents obviously user annoyance but also conserves power as Firefox will only consume power once the tab is foregrounded

Overall Project Health

[GREEN, ON TRACK]

  • QA has checked 100% of all bugs, bringing 5 more bugs for further clarification and follow-up.
  • In total, we have 17 bugs for tracking, 17 out of these 17 bugs are resolved, representing a 100% completion rate.

Target Milestone

Firefox54 Firefox 56

The Team

MVP Scope-Bug Tracking

  • bug 1308154 -[meta] Block autoplay media until the tab is visible at first time
Full Query
ID Priority Summary Status Resolution Assigned to Last change time
1262053 P3 Block playback of media until document is visible VERIFIED FIXED Alastor Wu [:alwu] 2017-06-20T06:08:50Z
1302350 P3 Refactor the block-media-element feature. RESOLVED FIXED Alastor Wu [:alwu] 2017-03-05T16:26:25Z
1308153 P3 Implement the new UX visual mechanism for blocking autoplay media RESOLVED FIXED Alastor Wu [:alwu] 2017-03-05T16:27:08Z
1308399 P3 [UX] UX Spec for Delay Autoplay RESOLVED FIXED Mark Liang(:mark_liang) 2019-01-23T22:24:56Z
1314220 -- Add the Telemetry for blocking autoplay media VERIFIED FIXED Alastor Wu [:alwu] 2017-01-12T09:18:26Z
1319526 -- Media autoplay blocking icon has the wrong tooltip RESOLVED WORKSFORME 2017-03-05T16:28:21Z
1319529 -- The unblocking icon didn't be hided when resuming Flash RESOLVED FIXED Alastor Wu [:alwu] 2017-03-05T16:28:12Z
1319771 -- If the pinned tab is the first tab in the tab list, the media won't be blocked after browser restarts VERIFIED FIXED Alastor Wu [:alwu] 2017-03-05T16:27:31Z
1320005 -- Don't show 'play tab' icon for video without audio track VERIFIED FIXED Alastor Wu [:alwu] 2017-03-05T16:26:57Z
1322505 P1 Don't resume the video after calling video.pause() VERIFIED FIXED Alastor Wu [:alwu] 2017-06-13T20:15:56Z
1328058 -- Tab displays "play" button or sound indicator when the only media element is playing and has no sound VERIFIED FIXED Alastor Wu [:alwu] 2017-03-14T16:14:07Z
1329170 P3 Play Tab indicator looks pixelated in pinned tabs VERIFIED FIXED Alastor Wu [:alwu] 2017-03-02T10:01:00Z
1329179 -- Play Tab indicator is displayed on a foreground tab VERIFIED FIXED Alastor Wu [:alwu] 2017-02-07T11:28:26Z
1330195 -- The audio indicator doesn't work for flash on Linux RESOLVED DUPLICATE Alastor Wu [:alwu] 2017-03-05T16:29:08Z
1330232 -- Blocked media was resumed with sound when user click "mute tab" in the pop-up menu RESOLVED FIXED Alastor Wu [:alwu] 2017-03-05T16:27:49Z
1330644 -- No indications that a video with no audio track is blocked RESOLVED WONTFIX 2017-01-16T07:34:32Z
1330681 -- Play tab indicator has no hover state in pinned tabs VERIFIED FIXED Alastor Wu [:alwu] 2017-02-21T15:21:32Z
1330929 -- Play tab icon not displayed for certain plugins RESOLVED WORKSFORME 2017-03-05T16:23:29Z
1331317 -- Only enable pref "media.block-autoplay-until-in-foreground" on Nightly VERIFIED FIXED Alastor Wu [:alwu] 2017-01-18T10:56:51Z
1336309 -- Modify the access key for "play tab" option VERIFIED FIXED Alastor Wu [:alwu] 2017-03-05T16:27:36Z
1337232 -- Enable pref "media.block-autoplay-until-in-foreground" by default VERIFIED FIXED Alastor Wu [:alwu] 2017-03-13T13:37:54Z
1337704 -- Flickery transition between tabs indicators (play tab -> sound) RESOLVED WONTFIX 2017-02-09T02:45:31Z
1338137 P1 If the first tab is pinned and muted - media is not blocked after browser restart VERIFIED FIXED Alastor Wu [:alwu] 2017-04-24T13:24:36Z
1338145 -- Social media: notification inconsistent behavior (Play tab indicator + sound) RESOLVED INVALID 2017-02-14T06:48:16Z
1343465 -- The tab should show the "play tab" icon even the tab was muted. RESOLVED FIXED Alastor Wu [:alwu] 2017-03-09T19:33:37Z
1345947 P1 The blocked autoplay media icon appears for tabs that I've seen before RESOLVED DUPLICATE Alastor Wu [:alwu] 2017-07-01T16:32:38Z
1347758 P1 HTML5 video/audio doesn't play if node was removed in background tab RESOLVED FIXED Alastor Wu [:alwu] 2017-04-06T11:10:53Z
1347791 -- The pinned tab shows play tab icon every time when restarts browser VERIFIED FIXED Alastor Wu [:alwu] 2018-04-24T15:51:33Z
1348326 P1 BBC video/audio fails to load after focusing the video’s tab RESOLVED WORKSFORME Alastor Wu [:alwu] 2017-05-02T15:07:34Z
1348759 -- The video/audio on be-at.tv is not working as expected after focusing the video's tab RESOLVED DUPLICATE Alastor Wu [:alwu] 2017-05-31T20:43:48Z
1348859 -- Focusing an opened Facebook game tab no longer outputs the audio RESOLVED DUPLICATE Alastor Wu [:alwu] 2017-05-31T20:33:16Z
1348879 -- Playbutton not visible when opening a video from givemesport.com in a new tab RESOLVED DUPLICATE 2017-05-31T20:37:01Z
1348909 -- Focusing the Web Skype tab while being called does not output the call audio RESOLVED DUPLICATE 2017-05-31T20:42:47Z
1349202 -- Block Playback feature is not working as intended on several websites RESOLVED DUPLICATE 2017-04-06T03:08:44Z
1350947 -- Postpone loading NPAPI Flash content until the tab is resumed RESOLVED WONTFIX Alastor Wu [:alwu] 2022-05-16T19:51:10Z
1352014 -- Add the flag "RELEASE_OR_BETA" for the pref "media.block-autoplay-until-in-foreground" RESOLVED FIXED Alastor Wu [:alwu] 2017-04-04T03:03:58Z
1358211 -- Blocking autoplay for background tabs (bug 1308154) is breaking twitter videos RESOLVED WORKSFORME 2017-05-20T04:24:26Z
1367356 -- Add telemetry to measure how many Flash contents are blocked by blocking autoplay media RESOLVED WONTFIX Alastor Wu [:alwu] 2022-05-16T19:51:10Z
1378105 P3 Media is not blocked for previously unfocused closed tabs after restoring them from the History menu REOPENED 2022-10-11T19:27:20Z
1387917 -- Turn on the pref "media.block-autoplay-until-in-foreground" by default RESOLVED FIXED Alastor Wu [:alwu] 2018-01-09T02:30:35Z
1394455 P1 [e10s] Media is unblocked while hovering an unfocused tab VERIFIED FIXED Mike Conley (:mconley) (:⚙️) 2018-07-11T16:24:55Z
1572798 P2 Video element created using document.open() doesn't work RESOLVED FIXED Emilio Cobos Álvarez (:emilio) 2021-01-26T15:57:25Z
1611748 P3 video does not play in a dynamically created iframe (friendly) RESOLVED WORKSFORME Alastor Wu [:alwu] 2021-02-12T21:53:33Z
1684876 -- "Mute Tab" sometimes starts playing the tab's video, with sound RESOLVED FIXED kz04px 2021-10-26T21:46:51Z
1685163 P3 MediaStreamTrack freezes when played in opened popup (used to work if visiting fullscreen) RESOLVED WORKSFORME Alastor Wu [:alwu] 2021-02-12T21:54:44Z
1733902 P3 Autoplay fails if the player is switched in a background tab VERIFIED FIXED Alastor Wu [:alwu] 2022-01-10T11:08:29Z

46 Total; 1 Open (2.17%); 29 Resolved (63.04%); 16 Verified (34.78%);


  • bug 1350869 -Bug 1350869 -[QA] Block Playback feature tracking bug
Full Query
ID Priority Summary Status Resolution Assigned to Last change time
1347758 P1 HTML5 video/audio doesn't play if node was removed in background tab RESOLVED FIXED Alastor Wu [:alwu] 2017-04-06T11:10:53Z
1348326 P1 BBC video/audio fails to load after focusing the video’s tab RESOLVED WORKSFORME Alastor Wu [:alwu] 2017-05-02T15:07:34Z
1348759 -- The video/audio on be-at.tv is not working as expected after focusing the video's tab RESOLVED DUPLICATE Alastor Wu [:alwu] 2017-05-31T20:43:48Z
1348859 -- Focusing an opened Facebook game tab no longer outputs the audio RESOLVED DUPLICATE Alastor Wu [:alwu] 2017-05-31T20:33:16Z
1348879 -- Playbutton not visible when opening a video from givemesport.com in a new tab RESOLVED DUPLICATE 2017-05-31T20:37:01Z
1348909 -- Focusing the Web Skype tab while being called does not output the call audio RESOLVED DUPLICATE 2017-05-31T20:42:47Z
1349202 -- Block Playback feature is not working as intended on several websites RESOLVED DUPLICATE 2017-04-06T03:08:44Z

7 Total; 0 Open (0%); 7 Resolved (100%); 0 Verified (0%);


UX Spec

Signoff-Report

Signoff-Report Summary

  • Mid- Auroa Signoff- RED *
  • Recommendation : DON'T SHIP IT.( Targeted GA: Firefox 54 - June 13, 2017)
  • Testing status: COMPLETED (100%).
  • 4 passed (9%), 0 blocked (0%), 0 failed with known bugs (0%), 40 failed with new bugs (91%)

Signoff-Report Details

  • Proposed course of action: fix 1347758, 1349201 and 1349202 in order to make this feature eligible for shipping with Fx54.
  • New bugs uncovered during sign off: https://mzl.la/2nwWIIh.
  • Reason: 91% of our tests failed with a total of 7 bugs - https://mzl.la/2nwWIIh.
  • Bug 1347758 - HTML5 video/audio doesn't play if node was removed in background tab –> RESOLVED FIXED, 03/24 landed on Firefox55.
  • Bug 1349201 - Mute button is not working on several websites–> –> RESOLVED WORKSFORME, 03/21
  • Bug 1349202 - Block Playback feature is not working as intended on several websites–: Duplicate of Bug 1347758
  • Bug 1350869 - [QA] Block Playback feature tracking bug

Test Case and Test plan