This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The EME APIs currently use Uint8Array for all binary data. Uint8Array is just a subclass of ArrayBufferView, and I don't think there is a reason to require 8-bit formatting. For data provided to the application, we might need to use an ArrayBuffer. MSE's appendBuffer() accepts either ArrayBuffer or ArrayBufferView [1]. I'm not sure whether EME needs to support both. [1] https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source-respec.html#widl-SourceBuffer-appendBuffer-void-ArrayBuffer-data
I don't see any reason now not to switch to ArrayBuffer, but am confirming with some others. ArrayBufferView adds the ability to view data with an offset. For SourceBuffer, that seems useful. It's harder to see where it would be of use in EME.
Notes from telecon today: Anne pointed us to WebIDL bug 23369. Adrian proposed that EME methods should accept either. That allows a view of a buffer to be passed as well as an ArrayBuffer to be passed without creating a view. Event attributes should be an ArrayBuffer.
https://dvcs.w3.org/hg/html-media/rev/b8e333b8510c
Bug 23369 has been resolved by, among other things, adding: typedef (ArrayBufferData or ArrayBuffer) BufferSource; I'm reopening this to track updating the spec to use the typedef for method parameters. http://heycam.github.io/webidl/#common-BufferSource http://heycam.github.io/webidl/#idl-buffer-source-types
(In reply to David Dorwin from comment #4) > Bug 23369 has been resolved by, among other things, adding: > typedef (ArrayBufferData or ArrayBuffer) BufferSource; This work had been blocked by a typo in this text (bug 27110). This is now fixed: typedef (ArrayBufferView or ArrayBuffer) BufferSource;
https://dvcs.w3.org/hg/html-media/rev/54693f404322 uses the new BufferSource typedef.