This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 18190 - Track selection cannot be performed (synchronously) per inserted track
Summary: Track selection cannot be performed (synchronously) per inserted track
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: Silvia Pfeiffer
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-18 17:37 UTC by contributor
Modified: 2012-09-28 05:39 UTC (History)
5 users (show)

See Also:


Attachments

Description contributor 2012-07-18 17:37:04 UTC
This was was cloned from bug 17168 as part of operation convergence.
Originally filed: 2012-05-24 12:22:00 +0000

================================================================================
 #0   contributor@whatwg.org                          2012-05-24 12:22:24 +0000 
--------------------------------------------------------------------------------
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html
Multipage: http://www.whatwg.org/C#sourcing-out-of-band-text-tracks
Complete: http://www.whatwg.org/c#sourcing-out-of-band-text-tracks

Comment:
Track selection cannot be performed (synchronously) per inserted track

Posted from: 2001:4c28:a032:32:99ec:df32:e805:6235 by philipj@opera.com
User agent: Opera/9.80 (X11; Linux x86_64; U; Edition Next; en) Presto/2.10.289 Version/12.00
================================================================================
 #1   Philip J                                        2012-05-24 13:06:57 +0000 
--------------------------------------------------------------------------------
The spec text begins with "When a text track corresponding to a track element is added to a media element's list of text tracks, the user agent must set the text track mode appropriately, as determined by the following conditions:"

It appears that this requires the steps that follow to be run synchronously when a track element is inserted, which is not what we want to implement. Doing so could mean that if a user has indicated a preference for English, French and Swedish (in that order) and tracks in Swedish, French and English are added by script (in that order), the Swedish and French tracks will first be enabled, and then set to hidden when the next track is added.

We want to implement a heuristic that look at the set of available tracks all at once and picks enables those that that are relevant. This heuristic should be run synchronously when the parser encounters </video> (including in innerHTML) and after awaiting a stable state if a script inserts a <track> element.
================================================================================
 #2   Philip J                                        2012-05-24 13:12:13 +0000 
--------------------------------------------------------------------------------
As a more theoretical concern, since the spec as written asks things like "If there is a text track in the media element's list of text tracks whose text track mode is showing by default" a naive implementation of that while inserting tracks would lead to O(n^2) track insertion.
================================================================================
Comment 1 Silvia Pfeiffer 2012-09-28 05:39:23 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If
you are satisfied with this response, please change the state of
this bug to CLOSED. If you have additional information and would
like the Editor to reconsider, please reopen this bug. If you would
like to escalate the issue to the full HTML Working Group, please
add the TrackerRequest keyword to this bug, and suggest title and
text for the Tracker Issue; or you may create a Tracker Issue
yourself, if you are able to do so. For more details, see this
document:   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: applied patch
https://github.com/w3c/html/commit/bd2c336a3e46b1605420ff4b3d108e9bc0b90b76
Rationale: adopted resolution by WHATWG