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 25574 - Queue a (micro)task to change enabled audio tracks
Summary: Queue a (micro)task to change enabled audio tracks
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-06 09:13 UTC by contributor
Modified: 2014-06-12 08:37 UTC (History)
4 users (show)

See Also:


Attachments

Description contributor 2014-05-06 09:13:47 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html
Multipage: http://www.whatwg.org/C#dom-TrackList-getKind-categories
Complete: http://www.whatwg.org/c#dom-TrackList-getKind-categories
Referrer: http://www.whatwg.org/specs/web-apps/current-work/multipage/

Comment:
Queue a (micro)task to change enabled audio tracks

Posted from: 83.218.67.123
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36 OPR/21.0.1432.48 (Edition Next)
Comment 1 Philip Jägenstedt 2014-05-06 09:21:30 UTC
If a script is to switch audio tracks, it needs to disable one and enable another. In order to make the switch gapless, it's necessary to wait until the script has finished before informing the media engine about the change. It would be nice if the spec pointed this out, so that all implementations do the same thing.

The difference is possibly detectable when using the Web Audio API and certainly audible.

Only one video track can be selected at a time, but maybe it would be a good idea to throw that into the same logic in case an audio track and video track are switched at the same time and somehow go together.
Comment 2 Ian 'Hixie' Hickson 2014-06-11 22:24:43 UTC
I don't really see why it would have to be a microtask. I just synchronised it with reaching the event loop's step 1. (Note that this has implications with respect to alert() and company that you might want to explicitly test...)
Comment 3 contributor 2014-06-11 22:25:42 UTC
Checked in as WHATWG revision r8673.
Check-in comment: Make sure that we say that enabling audio tracks and selecting video tracks is all synchronised with the event loop
http://html5.org/tools/web-apps-tracker?from=8672&to=8673
Comment 4 Philip Jägenstedt 2014-06-12 08:37:15 UTC
I meant a task or a microtask, either would do I think. There's now a lot of "the last time the event loop reached step 1" around media elements, which may or may not map to something sane in an implementation. Is there any particular reason you have that concept in addition to tasks and microtasks?