This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html#sourcebufferlist-events The addsourcebuffer and removesourcebuffer events are fired when: * addSourceBuffer: "Add the new object to sourceBuffers and fire a addsourcebuffer on that object." (Ambiguous which the target object is, but presumably sourceBuffers.) * removeSourceBuffer: "If sourceBuffer is in activeSourceBuffers, then remove it from that list and fire a removesourcebuffer event on that object." and "Remove sourceBuffer from sourceBuffers and fire a removesourcebuffer event on that object." * Detaching from a media element: "Remove all the SourceBuffer objects from sourceBuffers and fire a removesourcebuffer event for each one." What is the use case for these events? Since the application is the only source of added or removed buffers, telling the application about it appears very strange. It looks like this API may have taken inspiration from HTML's TextTrackList, but the reason there are addtrack and removetrack events in that context is that the application needs to be notified about in-band tracks, i.e. an external source of events.
You are right, these events were inspired by TextTrackList. The primary reason I added them was for monitoring activeSourceBuffers. This list gets modified by the UA when tracks enabled/selected state changes. A web application might want to monitor changes to this list so it can stop fetching media for inactive SourceBuffers. I agree the targets need to be fixed and I'll fix that in response the the broader event targets bug you filed.
(In reply to comment #1) > You are right, these events were inspired by TextTrackList. The primary reason > I added them was for monitoring activeSourceBuffers. This list gets modified by > the UA when tracks enabled/selected state changes. A web application might want > to monitor changes to this list so it can stop fetching media for inactive > SourceBuffers. Oh right, I overlooked that. > I agree the targets need to be fixed and I'll fix that in response the the > broader event targets bug you filed. Great!
I decided to updated these specific event targets before tackling all the rest. http://dvcs.w3.org/hg/html-media/rev/340786fcae83