New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 688544 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Clarify specs so implementators and web authors have common expectations on agent changes to track state

Project Member Reported by wolenetz@chromium.org, Feb 3 2017

Issue description

Chrome can disable video tracks on an audio-video element when the element's frame is backgrounded. There are other scenarios similarly being considered/experimented with, such as disabling video track on AV element when the element is not visible, but the frame is foregrounded.

MSE apps currently depend upon SourceBuffer.buffered and HTMLMediaElement.buffered to predict where playback stalls can happen. They can also (once servolk@'s work completes) directly {en,dis}able/{de,}select tracks (and observe AudioTrackList, VideoTrackList 'change' events are produced when they do this).

However, with an MSE app with A/V in distinct SourceBuffers, without any signalling of track changes to the app by Chrome when the element is backgrounded/foregrounded, then a couple problems:
1) The app doesn't know that it could reduce network usage and not fetch+append video while backgrounded, and
2) Chrome will happily play through an unbuffered video region without stalling so long as there is audio and the element is backgrounded, confounding app expectation that playback should have stalled.

ISTM we need a few changes:
1) Chrome should signal agent-originated track changes appropriately to the web app.
2) The HTML5 spec (and perhaps MediaSession spec or similar as is being done/discussed around video-only-element backgrounding pausing the element) should indicate that user agents MAY perform such app-visible track changes for various scenarios (like audio playback from an A/V element that is backgrounded or not visible, or other cases not yet identified), and if they do, they MUST comply with the existing HTML5 spec requiring 'change' events to AudioTrackList or VideoTrackList objects, as appropriate, and
3) Standardize the expectation around the behavior of an app selecting a video track in an element that is currently backgrounded: what should happen, and also what should happen when the element is foregrounded later?

If some of this has already been clarified, my apologies. I'm seeking less fragmentation and more clarity so web authors, especially those using MSE, can take advantage of adapting their behavior (network, etc) based on user-agents making changes to the set of enabled/selected tracks. Conceivably, even regular src= web apps could also benefit, for example by switching their src to adapt similarly to track changes made by the user agent.
 
Owner: mlamouri@chromium.org
Status: Untriaged (was: Assigned)
Assigning all my bugs to Mounir for him to triage and close/reassign later.
Status: Assigned (was: Untriaged)
Cc: servolk@chromium.org

Sign in to add a comment