<?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>18531</bug_id>
          
          <creation_ts>2012-08-10 18:38:01 +0000</creation_ts>
          <short_desc>Consider renaming addKey method</short_desc>
          <delta_ts>2013-01-12 03:02:24 +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>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>FPWD</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mark Watson">watsonm</reporter>
          <assigned_to name="David Dorwin">ddorwin</assigned_to>
          <cc>ddorwin</cc>
    
    <cc>eric.sun</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-media</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>72054</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Watson">watsonm</who>
    <bug_when>2012-08-10 18:38:01 +0000</bug_when>
    <thetext>The addKey method can be used for more than just providing a key. Specifically it can be used for
- providing a key
- providing a license
- updating a license or other CDM session state

As a result the addKey name is confusing.

In general, the purpose of this method is to provide a message to the CDM that updates the session state in some CDM-specific way. With the object-oriented model, sessions are explicitly represented by session objects and addKey is a method on that object. With that context we could rename the method to something as simple as update() - it is a method on the session object so the implication is that it updates the session somehow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72914</commentid>
    <comment_count>1</comment_count>
    <who name="Adrian Bateman [MSFT]">adrianba</who>
    <bug_when>2012-08-28 20:30:09 +0000</bug_when>
    <thetext>Agree on addKey potentially being confusing. How about addData()?

Assigned to Mark to follow-up on the mailing list.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76333</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Watson">watsonm</who>
    <bug_when>2012-10-15 19:34:03 +0000</bug_when>
    <thetext>Mailing list consensus is to go with update()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76653</commentid>
    <comment_count>3</comment_count>
    <who name="Yang Sun">eric.sun</who>
    <bug_when>2012-10-19 06:55:25 +0000</bug_when>
    <thetext>I think key or license is very similar, and even you want to update a license or key, you still need to provide a new key or license.addKey() is very clear about proivide key or license to CDM, what the confusion comes from?

So I think addKey() is clear enough to express its functionality, using update() seems confusing me more than addKey(), because app developer will not clearly know what can be &quot;update&quot; by update().

What&apos;s more, in webrtc, we have updateIce(), we also use update, but we know that we are update configuration of ICE agent.






(In reply to comment #0)
&gt; The addKey method can be used for more than just providing a key.
&gt; Specifically it can be used for
&gt; - providing a key
&gt; - providing a license
&gt; - updating a license or other CDM session state
&gt; 
&gt; As a result the addKey name is confusing.
&gt; 
&gt; In general, the purpose of this method is to provide a message to the CDM
&gt; that updates the session state in some CDM-specific way. With the
&gt; object-oriented model, sessions are explicitly represented by session
&gt; objects and addKey is a method on that object. With that context we could
&gt; rename the method to something as simple as update() - it is a method on the
&gt; session object so the implication is that it updates the session somehow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76732</commentid>
    <comment_count>4</comment_count>
    <who name="Mark Watson">watsonm</who>
    <bug_when>2012-10-19 19:09:17 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; I think key or license is very similar, and even you want to update a
&gt; license or key, you still need to provide a new key or license.addKey() is
&gt; very clear about proivide key or license to CDM, what the confusion comes
&gt; from?

This method can be used to update the CDM state in a CDM-specific way. For example, a CDM supporting heartbeat might require regular updates which modify the expiry time of the license. Is this a new key ? or a new license ? or an update to an existing license ? That depends on the CDM.

Another example would be secure proof of key release, where this method will be used to provide an acknowledgement from the server that a proof of key release message has been received. This is certainly not a new key or new license, but it does cause an update to the CDM internal state.

&gt; 
&gt; So I think addKey() is clear enough to express its functionality, using
&gt; update() seems confusing me more than addKey(), because app developer will
&gt; not clearly know what can be &quot;update&quot; by update().
&gt; 
&gt; What&apos;s more, in webrtc, we have updateIce(), we also use update, but we know
&gt; that we are update configuration of ICE agent.
&gt; 
&gt; 
&gt; 
&gt; 
&gt; 
&gt; 
&gt; (In reply to comment #0)
&gt; &gt; The addKey method can be used for more than just providing a key.
&gt; &gt; Specifically it can be used for
&gt; &gt; - providing a key
&gt; &gt; - providing a license
&gt; &gt; - updating a license or other CDM session state
&gt; &gt; 
&gt; &gt; As a result the addKey name is confusing.
&gt; &gt; 
&gt; &gt; In general, the purpose of this method is to provide a message to the CDM
&gt; &gt; that updates the session state in some CDM-specific way. With the
&gt; &gt; object-oriented model, sessions are explicitly represented by session
&gt; &gt; objects and addKey is a method on that object. With that context we could
&gt; &gt; rename the method to something as simple as update() - it is a method on the
&gt; &gt; session object so the implication is that it updates the session somehow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79939</commentid>
    <comment_count>5</comment_count>
    <who name="David Dorwin">ddorwin</who>
    <bug_when>2012-12-11 17:00:08 +0000</bug_when>
    <thetext>No further comments at TPAC 2012. Please make the change.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81297</commentid>
    <comment_count>6</comment_count>
    <who name="David Dorwin">ddorwin</who>
    <bug_when>2013-01-12 03:02:24 +0000</bug_when>
    <thetext>Changed in https://dvcs.w3.org/hg/html-media/rev/ac33b782ee55.

We never discussed the parameter name, which is still |key|. It could be |message|, but I would rather avoid ambiguity for that word. Changing the API is the important part, so I consider this fixed for FPWD. We can change the parameter name at any time.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>