[Bug 27599] New: Allow SourceBuffer.trackDefaults to be nullable

https://www.w3.org/Bugs/Public/show_bug.cgi?id=27599

            Bug ID: 27599
           Summary: Allow SourceBuffer.trackDefaults to be nullable
           Product: HTML WG
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Media Source Extensions
          Assignee: adrianba@microsoft.com
          Reporter: wolenetz@google.com
        QA Contact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-media@w3.org

In current spec, if an app wants to clear a SourceBuffer's non-empty
trackDefaults, it must set the attribute to a TrackDefaultList that was
constructed with an empty sequence<TrackDefault>. For example:
...
sb = mediaSource.activeSourceBuffers[0];
sb.trackDefaults = new TrackDefaultList( [] );
...

This bug is to request change to spec to make this operation more natural, by
specifying:
0. the SourceBuffer.trackDefaults attribute is nullable
1. the SourceBuffer.trackDefaults attribute setter allows null
2. the initial value of SourceBuffer.trackDefaults is null
3. the default {language, kind, label} algorithms behave correctly if
trackDefaults is null

These changes would be app-visible and #2 would possibly break existing apps.
Alternatively, maybe #2 should be:
2. prior to any explicit set operation by app, the SourceBuffer.trackDefaults
attribute getter should return an empty TrackDefaultList object that is the
same object (===) each time for this SourceBuffer.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Friday, 12 December 2014 22:32:49 UTC