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

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 the QA Contact for the bug.

Received on Monday, 19 January 2015 15:31:47 UTC