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 20948 - timestampOffset should reopen media source just like append
Summary: timestampOffset should reopen media source just like append
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: Media Source Extensions (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Aaron Colwell (c)
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-11 14:32 UTC by Adrian Bateman [MSFT]
Modified: 2013-02-19 01:03 UTC (History)
3 users (show)

See Also:


Attachments
Proposed patch (2.10 KB, patch)
2013-02-11 17:57 UTC, Adrian Bateman [MSFT]
Details

Description Adrian Bateman [MSFT] 2013-02-11 14:32:35 UTC
Currently step 5 of the appendArrayBuffer|Stream methods reopens the media source if its state is "ended". However, the timestampOffset throws INVALID_STATE_ERR in this situation. This means that if you can't set the timestamp offset and then append without doing something else to cause the media source to be reopened first.

Proposal: Change step 3 of the timestampOffset property setting to match steps 4 and 5 of appendArrayBuffer:

"If the readyState attribute of the parent media source is not in the "open" state, then throw an INVALID_STATE_ERR exception and abort these steps."

becomes

"If the readyState attribute of the parent media source is in the "closed" state then throw an INVALID_STATE_ERR exception and abort these steps.
If the readyState attribute of the parent media source is in the "ended" state then run the following steps:
  1.Set the readyState attribute of the parent media source to "open" 
  2.Queue a task to fire a simple event named sourceopen at the parent media source."
Comment 1 Adrian Bateman [MSFT] 2013-02-11 17:57:58 UTC
Created attachment 1326 [details]
Proposed patch

Proposed patch updating the steps for timestampOffset.
Comment 2 Aaron Colwell (c) 2013-02-19 01:03:29 UTC
Changes committed.
https://dvcs.w3.org/hg/html-media/rev/d5956e93b991

Proposed patch applied.