This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Presently the SourceBuffer appendArrayBuffer method takes an ArrayBuffer argument, meaning that there is an additional copy whenever the data to be appended is not already in a single ArrayBuffer object (for example if only part of an ArrayBuffer received from XmlHttpRequest is to be appended). Consider changing this to ArrayBufferView, so that view objects like Uint8Arrays can be appended (as in the original webkitSourceAppend).
Any preference on the method name? 1. Keep as appendArrayBuffer() 2. Change to appendArrayBufferView() 3. Change to appendBuffer() 4. Other suggestions welcome.
I think the method can be overloaded to accept either an ArrayBuffer or ArrayBufferView. This is what we've done elsewhere in the platform. I'm not precious about the naming but prefer to settle on something sooner rather than later if we're going to make a change.
(In reply to comment #2) > I think the method can be overloaded to accept either an ArrayBuffer or > ArrayBufferView. This is what we've done elsewhere in the platform. > > I'm not precious about the naming but prefer to settle on something sooner > rather than later if we're going to make a change. Ok. How about we just call it appendBuffer() and I'll add the 2 overloads. void appendBuffer(ArrayBuffer) void appendBuffer(ArrayBufferView) That way if we come across some other buffer type we need to add, we can just add the extra overload w/o changing the method name.
Changes committed. https://dvcs.w3.org/hg/html-media/rev/dcd406812201