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 18593 - Should SourceBuffer.buffered return a new object?
Summary: Should SourceBuffer.buffered return a new object?
Status: VERIFIED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: Media Source Extensions (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Aaron Colwell (c)
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-16 15:43 UTC by Philip Jägenstedt
Modified: 2012-08-23 08:36 UTC (History)
3 users (show)

See Also:


Attachments

Description Philip Jägenstedt 2012-08-16 15:43:17 UTC
http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#dom-buffered

2. Return TimeRanges for the media segments buffered.

It's not clear if a new object should be returned or if the same object should be returned each time. If the same object is returned, it must be clearly stated that the object is live, similar to a HTMLCollection.

HTMLMediaElement.buffered always returns a new object, see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-media-buffered
Comment 1 Philip Jägenstedt 2012-08-16 15:45:06 UTC
To be perfectly clear, I think that MSE should also return a new object on each property read.
Comment 2 Aaron Colwell (c) 2012-08-17 20:46:23 UTC
(In reply to comment #0)
> http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#dom-buffered
> 
> 2. Return TimeRanges for the media segments buffered.
> 
> It's not clear if a new object should be returned or if the same object should
> be returned each time. If the same object is returned, it must be clearly
> stated that the object is live, similar to a HTMLCollection.
> 
> HTMLMediaElement.buffered always returns a new object, see
> http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-media-buffered

I intended for it to be a new object every time.

How about:
"2. Return a new static normalized TimeRanges object for the media segments buffered."
Comment 3 Philip Jägenstedt 2012-08-20 08:39:50 UTC
Yes, that sounds good!
Comment 4 Aaron Colwell (c) 2012-08-22 23:37:46 UTC
Changes committed.
http://dvcs.w3.org/hg/html-media/rev/340786fcae83