Firefox/Block Playback: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 4: Line 4:




===Key Documents===
===Meta Bug===
* Code: https://hg.mozilla.org/integration/mozilla-inbound/file/tip/dom/media
* [https://bugzilla.mozilla.org/show_bug.cgi?id=1262053 Bug 1262053]
* Issues: Meta Bug -


===Other Resources===
===Other Resources===

Revision as of 07:04, 3 October 2016

Overview

Block Playback Video/Audio will be blocked if a new tab been opened but never bring to front.


Meta Bug

Other Resources


Known Issues

Related telemetries:

Related bugs:

Video element as content source

The situation is about the video element itself is used as a content source and its decoder might be suspended at the same time. This issue could be split into two cases:

  • Case 1: The decoder is suspended AFTER the {cpatureStream(), drawImage(), createImageBitmap()} is called.
  • Case 2: The decoder is suspended BEFORE the {cpatureStream(), drawImage(), createImageBitmap()} is called.

Case 1 is relatively easy, we could mark the video element as being a content source while {cpatureStream(), drawImage(), createImageBitmap()} is invoked and then its decoder should never be suspended.

Case 2 is rather complicated. The critical issue is that resuming decoder is an async operation with latency. So, while {cpatureStream(), drawImage(), createImageBitmap()} is invoked on an already-suspended-video, there must be several "blank" frames been leaked, even though we resume the decoder immediately. To completely solve this problem, we must make "resuming decoder" a blocking operation, however, it might block the main thread; otherwise, we leak the blank frames.


Related bugs:

Planning

Goals

  • Help users to reduce device resource usage (CPU & Memory)
  • Finish tasks across videos
  • No impact on current user flow

Feature Plan

  • Phase 0: Shutdown decoders when video element is invisible
  • Phase 1: Using a blank video decoder to replace video decoder instead of shutdown decoders directly. In this phase, the mechanism is applied to 1) Low-resolution video (480P) and 2) Video film without audio track
  • Phase 2: We're going to enhance the mechanism and make sure it can apply to all video files.

Success

  • Effective cross-discipline teams solving problems across platforms
  • Validation of key assumptions through telemetrics
  • video decode suspend in the hands of all our users

Schedule

Product Milestones

Engineering

Block Playback [status: Green]

Current Goals:

  • Ship disabling video decoders for ads
  • Silent, looping videos where user doesn't really care the exact point

Next Milestone:


Milestones

Optimizations

Telemetry

Mochitests

Team

Product owner:

Eng: Alastor, Daniel, Gerald, JW, Kaku,

Program Management: Blake, Josh

UX: Mark, Morpheus

QA: SoftVision and William

Communications

IRC:

Email:

VidyoRoom: