W3C home > Mailing lists > Public > public-html-media@w3.org > January 2015

[Bug 27857] New: [MSE] Reorder SourceBuffer.remove() exceptions handling for consistency

From: <bugzilla@jessica.w3.org>
Date: Mon, 19 Jan 2015 15:31:45 +0000
To: public-html-media@w3.org
Message-ID: <bug-27857-5436@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27857

            Bug ID: 27857
           Summary: [MSE] Reorder SourceBuffer.remove() exceptions
                    handling for consistency
           Product: HTML WG
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Media Source Extensions
          Assignee: adrianba@microsoft.com
          Reporter: b.gajda@samsung.com
        QA Contact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-media@w3.org

SourceBuffer.remove()

1. If duration equals NaN, then throw an InvalidAccessError exception and abort
these steps.
2. If start is negative or greater than duration, then throw an
InvalidAccessError exception and abort these steps.
3. If end is less than or equal to start or end equals NaN, then throw an
InvalidAccessError exception and abort these steps.

4. If this object has been removed from the sourceBuffers attribute of the
parent media source then throw an InvalidStateError exception and abort these
steps.
5. If the updating attribute equals true, then throw an InvalidStateError
exception and abort these steps.

---

I believe this is wrong order, and we move check number 4 (and 5 for
consistency) before 1, so the new order would be "4 5 1 2 3"

While this might not seem as big deal, any reference to mediaSource data
("duration" in this example) feels wrong if the SourceBuffer is removed from
parent MediaSource, and currently check for duration is before check for being
removed.

This would also be consistent with appendWindowStart, appendWindowEnd,
buffered, etc. as they also check first is SB removed.

Opinions?

Similar but less important issue is with setting mode of SourceBuffer (first
InvalidAccess, then InvalidState), but there is no reference to mediaSource
data there, so I don't thing it's that big of issue.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Monday, 19 January 2015 15:31:47 UTC

This archive was generated by hypermail 2.3.1 : Monday, 19 January 2015 15:31:48 UTC