You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<pclass="issue"><ahref="https://github.com/w3c/encrypted-media/issues/85">Issue 85</a> - There are concerns about the architectural implications of <code>"tracked"</code> sessions that are pending a TAG discussion. The outcome of this discussion could result in modification (including removal) of the feature.</p>
923
923
<p>
924
-
A session for which the license and any key(s) it contains SHALL NOT be persisted and for which a <var>record of key usage times</var> SHALL be persisted.
925
-
The <var>record of key usage times</var> consists of a record of the key IDs of the keys used in the session, the <var>first decryption time</var> for each key and the <var>latest decryption time</var> for each key.
926
-
A <adef-id="message"></a> of type <adef-id="message-type-license-release"></a> containing a record of key usage will be generated when <adef-id="remove"></a> is called and on every <adef-id="load"></a> call until the record is acknowledged by a response passed to <adef-id="update"></a>. Because the license and keys are not persisted, this record implicitly proves that the keys are no longer available in the session.
924
+
A session for which the license and any key(s) it contains SHALL NOT be persisted and for which a <var>record of key usage</var> SHALL be persisted.
925
+
The <var>record of key usage</var> consists of a record of the key IDs of the keys available in the session, the time at which the session was first used
926
+
to decrypt content, the <var>first decryption time</var> and the latest time at which the session was used to decrypt content, the <var>latest decryption time</var>.
927
+
A <adef-id="message"></a> of type <adef-id="message-type-license-release"></a> containing the <var>record of key usage</var> will be generated when <adef-id="remove"></a> is called and on every <adef-id="load"></a> call until the record is acknowledged by a response passed to <adef-id="update"></a>. Because the license and keys are not persisted, this record implicitly proves that the keys are no longer available in the session.
927
928
</p>
928
-
<pclass="issue"><ahref="https://github.com/w3c/encrypted-media/issues/80">Issue 80</a> - It has been proposed that usage should be recorded by session, not key.</p>
929
929
<p>
930
930
The session MUST be loadable via its <adef-id="session-id"></a> once <adef-id="update"></a> is called successfully.
931
931
The application is responsible for managing any such storage that may be generated by the CDM.
<dt>If <var>sessionType</var> is <adef-id="temporary-session"></a> and <var>sanitized response</var> does not specify that session data, including any license, key(s), or similar session data it contains, should be stored</dt>
1297
1304
<dd>Process <var>sanitized response</var>, not storing any session data.</dd>
1298
1305
<dt>If <var>sessionType</var> is <adef-id="tracked-session"></a> and <var>sanitized response</var> contains a non-persistable license</dt>
1299
-
<dd>Process <var>sanitized response</var>, not storing any session data.
1306
+
<dd>
1307
+
<ol>
1308
+
<li>
1309
+
<p>
1310
+
Process <var>sanitized response</var>, not storing any session data.
1311
+
</p>
1312
+
</li>
1313
+
<li>
1314
+
<p>
1315
+
If processing <var>sanitized response</var> resulting in the addition of keys to the set of <ahref="#known-key">known keys</a>, add these new keys to the session's <var>record of key usage</var>.
1316
+
</p>
1317
+
</li>
1318
+
</ol>
1300
1319
</dd><dt>If <var>sessionType</var> is <adef-id="persistent-license-session"></a> and <var>sanitized response</var> contains a persistable license</dt>
1301
1320
<dd>Process <var>sanitized response</var>, storing the license/key(s) and related session data contained in <var>sanitized response</var>.
1302
1321
Such data MUST be stored such that only the <adef-id="origin"></a> of this object's <adef-id="document-concept"></a> can access it.
<li><p>Clear all stored session data associated with this object, including the <adef-id="sessionId"></a> and <var>record of key usage</var>.</p>
1353
+
<li><p>Clear all stored session data associated with this object, including the <adef-id="sessionId"></a> and the <var>record of key usage</var>.</p>
1335
1354
<pclass="note">A subsequent call to <adef-id="load"></a> with the value of this object's <adef-id="sessionId"></a> would fail because there is no data stored for that session ID.</p>
If the <var>record of key usage</var>does not contain an entry for <var>block key ID</var>, add a new entry for <var>block key ID</var> with<var>first decrypt time</var> set to the current time.
2066
+
If the session's <var>record of key usage</var>is <code>null</code>, initialize the <var>record of key usage</var> to contain the key ids for all <ahref="#known-key">known keys</a>, setting<var>first decrypt time</var> to the current time.
2048
2067
</p>
2049
2068
</li>
2050
2069
<li>
2051
2070
<p>
2052
-
Set the <var>latest decrypt time</var> of the entry for <var>block key ID</var> in the <var>record of key use</var> to the current time.
2071
+
Set the <var>latest decrypt time</var> of the <var>record of key usage</var> to the current time.
2053
2072
</p>
2054
2073
</li>
2055
2074
</ol>
@@ -2360,7 +2379,7 @@ <h4>Behavior</h4>
2360
2379
<li>
2361
2380
<p>
2362
2381
For sessions of type <adef-id="tracked-session"></a>, in the <adef-id="remove"></a> and <adef-id="load"></a> algorithms, the <var>message</var> reflecting
2363
-
the <var>record of key usage times</var> is a JSON object encoded in UTF-8 as described in <ahref="#clear-key-release-format">License Release Format</a>.
2382
+
the <var>record of key usage</var> is a JSON object encoded in UTF-8 as described in <ahref="#clear-key-release-format">License Release Format</a>.
<p>This section describes the format of the license release message to be provided via the <adef-id="message-event-message-attribute"></a> attribute of the <adef-id="message"></a> event.</p>
2458
2477
<p>The format is a JSON object containing the following members:</p>
2459
2478
<dl>
2460
-
<dt>"keys"</dt>
2461
-
<dd>
2462
-
An array of objects, each object containing the following members:
2463
-
<dl>
2464
-
<dt>"kid"</dt>
2465
-
<dd>The base64url encoding of the octet sequence containing a key ID value.</dd>
2466
-
<dt>"tfirst"</dt>
2467
-
<dd>The <var>first decrypt time</var> for this key ID expressed as a number giving the time, in milliseconds since 01 January, 1970 UTC.</dd>
2468
-
<dt>"tlatest"</dt>
2469
-
<dd>The <var>latest decrypt time</var> for this key ID expressed as a number giving the time, in milliseconds since 01 January, 1970 UTC.</dd>
2470
-
</dl>
2471
-
</dd>
2479
+
<dt>"kids"</dt>
2480
+
<dd>An array of <adef-id="key-id">key IDs</a>. Each element of the array is the base64url encoding of the octet sequence containing the key ID value.</dd>
2481
+
<dt>"tfirst"</dt>
2482
+
<dd>The <var>first decrypt time</var> expressed as a number giving the time, in milliseconds since 01 January, 1970 UTC.</dd>
2483
+
<dt>"tlatest"</dt>
2484
+
<dd>The <var>latest decrypt time</var> expressed as a number giving the time, in milliseconds since 01 January, 1970 UTC.</dd>
2472
2485
</dl>
2473
2486
2474
2487
<p>When contained in the ArrayBuffer <adef-id="message-event-message-attribute"></a> attribute of a <a>MediaKeyMessageEvent</a> object, the JSON string is encoded in UTF-8 as specified in the Encoding specification [[!ENCODING]].
@@ -2480,14 +2493,9 @@ <h5>Example</h5>
2480
2493
<p>The following example is a license release for a temporary license for a single key ID. (Line breaks are for readability only.)</p>
0 commit comments