<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>25966</bug_id>
          
          <creation_ts>2014-06-03 21:27:28 +0000</creation_ts>
          <short_desc>Use ArrayBufferView and ArrayBuffer instead of Uint8Array in APIs</short_desc>
          <delta_ts>2014-10-20 18:30:14 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>Encrypted Media Extensions</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>23369</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Dorwin">ddorwin</reporter>
          <assigned_to name="David Dorwin">ddorwin</assigned_to>
          <cc>acolwell</cc>
    
    <cc>annevk</cc>
    
    <cc>d</cc>
    
    <cc>jdsmith</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-media</cc>
    
    <cc>watsonm</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>107220</commentid>
    <comment_count>0</comment_count>
    <who name="David Dorwin">ddorwin</who>
    <bug_when>2014-06-03 21:27:28 +0000</bug_when>
    <thetext>The EME APIs currently use Uint8Array for all binary data. Uint8Array is just a subclass of ArrayBufferView, and I don&apos;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&apos;s appendBuffer() accepts either ArrayBuffer or ArrayBufferView [1]. I&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107766</commentid>
    <comment_count>1</comment_count>
    <who name="Jerry Smith">jdsmith</who>
    <bug_when>2014-06-13 00:30:05 +0000</bug_when>
    <thetext>I don&apos;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&apos;s harder to see where it would be of use in EME.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107940</commentid>
    <comment_count>2</comment_count>
    <who name="David Dorwin">ddorwin</who>
    <bug_when>2014-06-17 15:18:21 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108299</commentid>
    <comment_count>3</comment_count>
    <who name="Mark Watson">watsonm</who>
    <bug_when>2014-06-24 21:38:49 +0000</bug_when>
    <thetext>https://dvcs.w3.org/hg/html-media/rev/b8e333b8510c</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>112757</commentid>
    <comment_count>4</comment_count>
    <who name="David Dorwin">ddorwin</who>
    <bug_when>2014-10-06 17:56:38 +0000</bug_when>
    <thetext>Bug 23369 has been resolved by, among other things, adding:
  typedef (ArrayBufferData or ArrayBuffer) BufferSource;

I&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>113483</commentid>
    <comment_count>5</comment_count>
    <who name="David Dorwin">ddorwin</who>
    <bug_when>2014-10-20 18:22:03 +0000</bug_when>
    <thetext>(In reply to David Dorwin from comment #4)
&gt; Bug 23369 has been resolved by, among other things, adding:
&gt;   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;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>113485</commentid>
    <comment_count>6</comment_count>
    <who name="David Dorwin">ddorwin</who>
    <bug_when>2014-10-20 18:30:14 +0000</bug_when>
    <thetext>https://dvcs.w3.org/hg/html-media/rev/54693f404322 uses the new BufferSource typedef.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>