forked from w3c/encrypted-media
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
4292 lines (3824 loc) · 469 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en" dir="ltr" typeof="bibo:Document " prefix="bibo: http://purl.org/ontology/bibo/ w3p: http://www.w3.org/2001/02pd/rec54#">
<head><meta lang="" property="dc:language" content="en">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Encrypted Media Extensions</title>
<!-- script to register bugs -->
<!-- Disabled unless/until it supports GitHub issues.
<script src="https://w3c.github.io/webcomponents/assets/scripts/bug-assist.js"></script>
<meta name="bug.product" content="HTML WG"/>
<meta name="bug.component" content="Encrypted Media Extensions"/>
-->
<style>/* --- EXAMPLES --- */
div.example-title {
min-width: 7.5em;
color: #b9ab2d;
}
div.example-title span {
text-transform: uppercase;
}
aside.example, div.example, div.illegal-example {
padding: 0.5em;
margin: 1em 0;
position: relative;
clear: both;
}
div.illegal-example { color: red }
div.illegal-example p { color: black }
aside.example, div.example {
padding: .5em;
border-left-width: .5em;
border-left-style: solid;
border-color: #e0cb52;
background: #fcfaee;
}
aside.example div.example {
border-left-width: .1em;
border-color: #999;
background: #fff;
}
aside.example div.example div.example-title {
color: #999;
}
</style><style>/* --- ISSUES/NOTES --- */
div.issue-title, div.note-title , div.ednote-title, div.warning-title {
padding-right: 1em;
min-width: 7.5em;
color: #b9ab2d;
}
div.issue-title { color: #e05252; }
div.note-title, div.ednote-title { color: #2b2; }
div.warning-title { color: #f22; }
div.issue-title span, div.note-title span, div.ednote-title span, div.warning-title span {
text-transform: uppercase;
}
div.note, div.issue, div.ednote, div.warning {
margin-top: 1em;
margin-bottom: 1em;
}
.note > p:first-child, .ednote > p:first-child, .issue > p:first-child, .warning > p:first-child { margin-top: 0 }
.issue, .note, .ednote, .warning {
padding: .5em;
border-left-width: .5em;
border-left-style: solid;
}
div.issue, div.note , div.ednote, div.warning {
padding: 1em 1.2em 0.5em;
margin: 1em 0;
position: relative;
clear: both;
}
span.note, span.ednote, span.issue, span.warning { padding: .1em .5em .15em; }
.issue {
border-color: #e05252;
background: #fbe9e9;
}
.note, .ednote {
border-color: #52e052;
background: #e9fbe9;
}
.warning {
border-color: #f11;
border-right-width: .2em;
border-top-width: .2em;
border-bottom-width: .2em;
border-style: solid;
background: #fbe9e9;
}
.warning-title:before{
content: "⚠"; /*U+26A0 WARNING SIGN*/
font-size: 3em;
float: left;
height: 100%;
padding-right: .3em;
vertical-align: top;
margin-top: -0.5em;
}
li.task-list-item {
list-style: none;
}
input.task-list-item-checkbox {
margin: 0 0.35em 0.25em -1.6em;
vertical-align: middle;
}
</style><style>/* HIGHLIGHTS */
code.prettyprint {
color: inherit;
}
/* this from google-code-prettify */
.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
</style><style>/* --- WEB IDL --- */
pre.idl {
border-top: 1px solid #90b8de;
border-bottom: 1px solid #90b8de;
padding: 1em;
line-height: 120%;
}
pre.idl::before {
content: "WebIDL";
display: block;
width: 150px;
background: #90b8de;
color: #fff;
font-family: sans-serif;
padding: 3px;
font-weight: bold;
margin: -1em 0 1em -1em;
}
.idlType {
color: #ff4500;
font-weight: bold;
text-decoration: none;
}
/*.idlModule*/
/*.idlModuleID*/
/*.idlInterface*/
.idlInterfaceID, .idlDictionaryID, .idlCallbackID, .idlEnumID {
font-weight: bold;
color: #005a9c;
}
a.idlEnumItem {
color: #000;
border-bottom: 1px dotted #ccc;
text-decoration: none;
}
.idlSuperclass {
font-style: italic;
color: #005a9c;
}
/*.idlAttribute*/
.idlAttrType, .idlFieldType, .idlMemberType {
color: #005a9c;
}
.idlAttrName, .idlFieldName, .idlMemberName {
color: #ff4500;
}
.idlAttrName a, .idlFieldName a, .idlMemberName a {
color: #ff4500;
border-bottom: 1px dotted #ff4500;
text-decoration: none;
}
/*.idlMethod*/
.idlMethType, .idlCallbackType {
color: #005a9c;
}
.idlMethName {
color: #ff4500;
}
.idlMethName a {
color: #ff4500;
border-bottom: 1px dotted #ff4500;
text-decoration: none;
}
/*.idlCtor*/
.idlCtorName {
color: #ff4500;
}
.idlCtorName a {
color: #ff4500;
border-bottom: 1px dotted #ff4500;
text-decoration: none;
}
/*.idlParam*/
.idlParamType {
color: #005a9c;
}
.idlParamName, .idlDefaultValue {
font-style: italic;
}
.extAttr {
color: #666;
}
/*.idlSectionComment*/
.idlSectionComment {
color: gray;
}
/*.idlIterable*/
.idlIterableKeyType, .idlIterableValueType {
color: #005a9c;
}
/*.idlMaplike*/
.idlMaplikeKeyType, .idlMaplikeValueType {
color: #005a9c;
}
/*.idlConst*/
.idlConstType {
color: #005a9c;
}
.idlConstName {
color: #ff4500;
}
.idlConstName a {
color: #ff4500;
border-bottom: 1px dotted #ff4500;
text-decoration: none;
}
/*.idlException*/
.idlExceptionID {
font-weight: bold;
color: #c00;
}
.idlTypedefID, .idlTypedefType {
color: #005a9c;
}
.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
color: #c00;
font-weight: normal;
}
.excName a {
font-family: monospace;
}
.idlRaises a.idlType, .excName a.idlType {
border-bottom: 1px dotted #c00;
}
.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
width: 45px;
text-align: center;
}
.excGetSetTrue, .prmNullTrue, .prmOptTrue { color: #0c0; }
.excGetSetFalse, .prmNullFalse, .prmOptFalse { color: #c00; }
.idlImplements a {
font-weight: bold;
}
dl.attributes, dl.methods, dl.constants, dl.constructors, dl.fields, dl.dictionary-members {
margin-left: 2em;
}
.attributes dt, .methods dt, .constants dt, .constructors dt, .fields dt, .dictionary-members dt {
font-weight: normal;
}
.attributes dt code, .methods dt code, .constants dt code, .constructors dt code, .fields dt code, .dictionary-members dt code {
font-weight: bold;
color: #000;
font-family: monospace;
}
.attributes dt code, .fields dt code, .dictionary-members dt code {
background: #ffffd2;
}
.attributes dt .idlAttrType code, .fields dt .idlFieldType code, .dictionary-members dt .idlMemberType code {
color: #005a9c;
background: transparent;
font-family: inherit;
font-weight: normal;
font-style: italic;
}
.methods dt code {
background: #d9e6f8;
}
.constants dt code {
background: #ddffd2;
}
.constructors dt code {
background: #cfc;
}
.attributes dd, .methods dd, .constants dd, .constructors dd, .fields dd, .dictionary-members dd {
margin-bottom: 1em;
}
table.parameters, table.exceptions {
border-spacing: 0;
border-collapse: collapse;
margin: 0.5em 0;
width: 100%;
}
table.parameters { border-bottom: 1px solid #90b8de; }
table.exceptions { border-bottom: 1px solid #deb890; }
.parameters th, .exceptions th {
color: #fff;
padding: 3px 5px;
text-align: left;
font-weight: normal;
text-shadow: #666 1px 1px 0;
}
.parameters th { background: #90b8de; }
.exceptions th { background: #deb890; }
.parameters td, .exceptions td {
padding: 3px 10px;
border-top: 1px solid #ddd;
vertical-align: top;
}
.parameters tr:first-child td, .exceptions tr:first-child td {
border-top: none;
}
.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
width: 100px;
}
.parameters td.prmType {
width: 120px;
}
table.exceptions table {
border-spacing: 0;
border-collapse: collapse;
width: 100%;
}
</style><link rel="stylesheet" href="eme.css">
<style>/*****************************************************************
* ReSpec 3 CSS
* Robin Berjon - http://berjon.com/
*****************************************************************/
/* --- INLINES --- */
em.rfc2119 {
text-transform: lowercase;
font-variant: small-caps;
font-style: normal;
color: #900;
}
h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
border: none;
}
dfn {
font-weight: bold;
}
a.internalDFN {
color: inherit;
border-bottom: 1px solid #99c;
text-decoration: none;
}
a.externalDFN {
color: inherit;
border-bottom: 1px dotted #ccc;
text-decoration: none;
}
a.bibref {
text-decoration: none;
}
cite .bibref {
font-style: normal;
}
code {
color: #C83500;
}
/* --- TOC --- */
.toc a, .tof a {
text-decoration: none;
}
a .secno, a .figno {
color: #000;
}
ul.tof, ol.tof {
list-style: none outside none;
}
.caption {
margin-top: 0.5em;
font-style: italic;
}
/* --- TABLE --- */
table.simple {
border-spacing: 0;
border-collapse: collapse;
border-bottom: 3px solid #005a9c;
}
.simple th {
background: #005a9c;
color: #fff;
padding: 3px 5px;
text-align: left;
}
.simple th[scope="row"] {
background: inherit;
color: inherit;
border-top: 1px solid #ddd;
}
.simple td {
padding: 3px 10px;
border-top: 1px solid #ddd;
}
.simple tr:nth-child(even) {
background: #f0f6ff;
}
/* --- DL --- */
.section dd > p:first-child {
margin-top: 0;
}
.section dd > p:last-child {
margin-bottom: 0;
}
.section dd {
margin-bottom: 1em;
}
.section dl.attrs dd, .section dl.eldef dd {
margin-bottom: 0;
}
@media print {
.removeOnSave {
display: none;
}
}
</style><link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/W3C-ED"><!--[if lt IE 9]><script src='https://www.w3.org/2008/site/js/html5shiv.js'></script><![endif]--><script id="initialUserConfig" type="application/json">{
"specStatus": "ED",
"previousMaturity": "WD",
"shortName": "encrypted-media",
"edDraftURI": "https://w3c.github.io/encrypted-media/",
"editors": [
{
"name": "David Dorwin",
"w3cid": "52505",
"company": "Google Inc.",
"companyURL": "https://www.google.com/"
},
{
"name": "Jerry Smith",
"w3cid": "60176",
"company": "Microsoft Corporation",
"companyURL": "https://www.microsoft.com/"
},
{
"name": "Mark Watson",
"url": "",
"w3cid": "46379",
"company": "Netflix Inc.",
"companyURL": "https://www.netflix.com/"
},
{
"name": "Adrian Bateman",
"note": "Until May 2014",
"w3cid": "42763",
"company": "Microsoft Corporation",
"companyURL": "https://www.microsoft.com/"
}
],
"otherLinks": [
{
"key": "Repository",
"data": [
{
"value": "We are on GitHub.",
"href": "https://github.com/w3c/encrypted-media/"
},
{
"value": "File a bug.",
"href": "https://github.com/w3c/encrypted-media/issues"
},
{
"value": "Commit history.",
"href": "https://github.com/w3c/encrypted-media/commits/gh-pages/encrypted-media-respec.html"
}
]
}
],
"emeDefGroupName": "encrypted-media",
"emeUnusedGroupNameExcludeList": [
"eme-references-from-registry"
],
"wg": "HTML Working Group",
"wgURI": "http://www.w3.org/html/wg/",
"wgPublicList": "public-html-media",
"wgPatentURI": "https://www.w3.org/2004/01/pp-impl/40318/status",
"noIDLIn": true,
"scheme": "https",
"preProcess": [
null
],
"definitionMap": {
"initialization data type": [
"initialization-data-type"
],
"record of key usage": [
"record-of-key-usage"
],
"first decryption time": [
"first-decryption-time"
],
"latest decryption time": [
"latest-decryption-time"
],
"key usage accuracy": [
"key-usage-accuracy"
],
"record of license destruction": [
"record-of-license-destruction"
],
"notsupportederror": [
"dfn-NotSupportedError"
],
"invalidstateerror": [
"dfn-InvalidStateError"
],
"typeerror": [
"dfn-TypeError"
],
"rangeerror": [
"dfn-RangeError"
],
"quotaexceedederror": [
"dfn-QuotaExceededError"
]
},
"postProcess": [
null
],
"localBiblio": {
"EME-REGISTRY": {
"title": "Encrypted Media Extensions Stream Format and Initialization Data Format Registry",
"href": "initdata-format-registry.html",
"authors": [
"David Dorwin",
"Adrian Bateman",
"Mark Watson"
],
"publisher": "W3C"
}
}
}</script></head>
<body class="h-entry" role="document" id="respecDocument"><div class="head" role="contentinfo" id="respecHeader">
<p>
<a class="logo" href="http://www.w3.org/"><img width="72" height="48" src="https://www.w3.org/Icons/w3c_home" alt="W3C"></a>
</p>
<h1 class="title p-name" id="title" property="dcterms:title">Encrypted Media Extensions</h1>
<h2 id="w3c-editor-s-draft-16-december-2015"><abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft <time property="dcterms:issued" class="dt-published" datetime="2015-12-16">16 December 2015</time></h2>
<dl>
<dt>This version:</dt>
<dd><a class="u-url" href="https://w3c.github.io/encrypted-media/">https://w3c.github.io/encrypted-media/</a></dd>
<dt>Latest published version:</dt>
<dd><a href="http://www.w3.org/TR/encrypted-media/">http://www.w3.org/TR/encrypted-media/</a></dd>
<dt>Latest editor's draft:</dt>
<dd><a href="https://w3c.github.io/encrypted-media/">https://w3c.github.io/encrypted-media/</a></dd>
<dt>Editors:</dt>
<dd class="p-author h-card vcard" property="bibo:editor" resource="_:editor0" data-editor-id="52505"><span property="rdf:first" typeof="foaf:Person"><span property="foaf:name" class="p-name fn">David Dorwin</span>, <a property="foaf:workplaceHomepage" class="p-org org h-org h-card" href="https://www.google.com/">Google Inc.</a></span>
<span property="rdf:rest" resource="_:editor1"></span>
</dd>
<dd class="p-author h-card vcard" resource="_:editor1" data-editor-id="60176"><span property="rdf:first" typeof="foaf:Person"><span property="foaf:name" class="p-name fn">Jerry Smith</span>, <a property="foaf:workplaceHomepage" class="p-org org h-org h-card" href="https://www.microsoft.com/">Microsoft Corporation</a></span>
<span property="rdf:rest" resource="_:editor2"></span>
</dd>
<dd class="p-author h-card vcard" resource="_:editor2" data-editor-id="46379"><span property="rdf:first" typeof="foaf:Person"><span property="foaf:name" class="p-name fn">Mark Watson</span>, <a property="foaf:workplaceHomepage" class="p-org org h-org h-card" href="https://www.netflix.com/">Netflix Inc.</a></span>
<span property="rdf:rest" resource="_:editor3"></span>
</dd>
<dd class="p-author h-card vcard" resource="_:editor3" data-editor-id="42763"><span property="rdf:first" typeof="foaf:Person"><span property="foaf:name" class="p-name fn">Adrian Bateman</span>, <a property="foaf:workplaceHomepage" class="p-org org h-org h-card" href="https://www.microsoft.com/">Microsoft Corporation</a> (Until May 2014)</span>
<span property="rdf:rest" resource="rdf:nil"></span>
</dd>
<dt>Repository:</dt>
<dd>
<a href="https://github.com/w3c/encrypted-media/">
We are on GitHub.
</a>
</dd>
<dd>
<a href="https://github.com/w3c/encrypted-media/issues">
File a bug.
</a>
</dd>
<dd>
<a href="https://github.com/w3c/encrypted-media/commits/gh-pages/encrypted-media-respec.html">
Commit history.
</a>
</dd>
</dl>
<p class="copyright">
<a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> ©
2015
<a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup>
(<a href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>,
<a href="http://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>,
<a href="http://www.keio.ac.jp/">Keio</a>, <a href="http://ev.buaa.edu.cn/">Beihang</a>).
<abbr title="World Wide Web Consortium">W3C</abbr> <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
<a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and
<a rel="license" href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a>
rules apply.
</p>
<hr title="Separator for header">
</div>
<section id="abstract" class="introductory" property="dc:abstract"><h2 id="h-abstract" resource="#h-abstract"><span property="xhv:role" resource="xhv:heading">Abstract</span></h2>
<p>This proposal extends <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#htmlmediaelement">HTMLMediaElement</a></code> [<cite><a class="bibref" href="#bib-HTML5">HTML5</a></cite>] providing APIs to control playback of protected content.</p>
<p>The API supports use cases ranging from simple clear key decryption to high value video (given an appropriate user agent implementation).
License/key exchange is controlled by the application, facilitating the development of robust playback applications supporting a range of content decryption and protection technologies.</p>
<p>This specification does not define a content protection or Digital Rights Management system. Rather, it defines a common API that may be used to discover, select and interact with
such systems as well as with simpler content encryption systems. Implementation of Digital Rights Management is not required for compliance with this specification: only the
Clear Key system is required to be implemented as a common baseline.</p>
<p>The common API supports a simple set of content encryption capabilities, leaving application functions such as authentication and authorization to page authors. This is achieved by
requiring content protection system-specific messaging to be mediated by the page rather than assuming out-of-band communication between the encryption system and a license
or other server.</p>
</section><section id="sotd" class="introductory"><h2 id="h-sotd" resource="#h-sotd"><span property="xhv:role" resource="xhv:heading">Status of This Document</span></h2>
<p>
<em>This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current <abbr title="World Wide Web Consortium">W3C</abbr> publications and the latest revision of this technical report can be found in the <a href="http://www.w3.org/TR/"><abbr title="World Wide Web Consortium">W3C</abbr> technical reports index</a> at http://www.w3.org/TR/.</em>
</p>
<p>The working group maintains <a href="https://github.com/w3c/encrypted-media/issues">a list of all bug reports that the editors have not yet tried to address</a>; there are also open bugs in the <a href="https://www.w3.org/brief/MjY5">previous bug tracker</a>. This draft highlights some of the pending issues that are still to be discussed in the working group. No decision has been taken on the outcome of these issues including whether they are valid.</p>
<p>Implementors should be aware that this specification is not stable. <strong>Implementors who are not taking part in the discussions are likely to find the specification changing out from under them in incompatible ways.</strong> Vendors interested in implementing this specification before it eventually reaches the Candidate Recommendation stage should join the mailing list mentioned below and take part in the discussions.</p>
<div class="issue" id="issue-1"><div class="issue-title" aria-level="3" role="heading" id="h-issue1"><span>Issue 1</span></div><p class=""><a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=20944">Bug 20944</a> - The specification should do more to encourage/ensure CDM-level interoperability.</p></div>
<div class="issue" id="issue-2"><div class="issue-title" aria-level="3" role="heading" id="h-issue2"><span>Issue 2</span></div><p class="">This specification contains sections for describing <a href="#security">security</a> and <a href="#privacy">privacy</a> considerations. These sections are not final and review is welcome.</p></div>
<!-- This will be populated when addressing https://www.w3.org/Bugs/Public/show_bug.cgi?id=23827.
<p>The following features are <strong>at risk</strong> and may be removed due to lack of implementation.
</p>
<ul>
<li><a def-id=""></a></li>
</ul>
-->
<p>
This document was published by the <a href="http://www.w3.org/html/wg/">HTML Working Group</a> as an Editor's Draft.
If you wish to make comments regarding this document, please send them to
<a href="mailto:public-html-media@w3.org">public-html-media@w3.org</a>
(<a href="mailto:public-html-media-request@w3.org?subject=subscribe">subscribe</a>,
<a href="http://lists.w3.org/Archives/Public/public-html-media/">archives</a>).
All comments are welcome.
</p>
<p>
Publication as an Editor's Draft does not imply endorsement by the <abbr title="World Wide Web Consortium">W3C</abbr>
Membership. This is a draft document and may be updated, replaced or obsoleted by other
documents at any time. It is inappropriate to cite this document as other than work in
progress.
</p>
<p>
This document was produced by
a group
operating under the
<a id="sotd_patent" property="w3p:patentRules" href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 <abbr title="World Wide Web Consortium">W3C</abbr> Patent
Policy</a>.
<abbr title="World Wide Web Consortium">W3C</abbr> maintains a <a href="https://www.w3.org/2004/01/pp-impl/40318/status" rel="disclosure">public list of any patent
disclosures</a>
made in connection with the deliverables of
the group; that page also includes
instructions for disclosing a patent. An individual who has actual knowledge of a patent
which the individual believes contains
<a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential
Claim(s)</a> must disclose the information in accordance with
<a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section
6 of the <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
</p>
<p>This document is governed by the <a id="w3c_process_revision" href="http://www.w3.org/2015/Process-20150901/">1 September 2015 <abbr title="World Wide Web Consortium">W3C</abbr> Process Document</a>.
</p>
</section><section id="toc"><h2 class="introductory" id="h-toc" resource="#h-toc"><span property="xhv:role" resource="xhv:heading">Table of Contents</span></h2><ul class="toc" role="directory"><li class="tocline"><a href="#introduction" class="tocxref"><span class="secno">1. </span>Introduction</a></li><li class="tocline"><a href="#definitions" class="tocxref"><span class="secno">2. </span>Definitions</a></li><li class="tocline"><a href="#obtaining-access-to-key-systems" class="tocxref"><span class="secno">3. </span>Obtaining Access to Key Systems</a><ul class="toc"><li class="tocline"><a href="#navigator-extension-requestmediakeysystemaccess" class="tocxref"><span class="secno">3.1 </span><span class="formerLink"><code>Navigator</code></span> Extension: <code>requestMediaKeySystemAccess()</code></a><ul class="toc"><li class="tocline"><a href="#methods" class="tocxref"><span class="secno">3.1.1 </span>Methods</a></li><li class="tocline"><a href="#algorithms" class="tocxref"><span class="secno">3.1.2 </span>Algorithms</a><ul class="toc"><li class="tocline"><a href="#get-supported-configuration" class="tocxref"><span class="secno">3.1.2.1 </span>Get Supported Configuration</a></li><li class="tocline"><a href="#get-supported-capabilities-for-audio-video-type" class="tocxref"><span class="secno">3.1.2.2 </span>Get Supported Capabilities for Audio/Video Type</a></li><li class="tocline"><a href="#are-insecure-contexts-allowed---deprecated" class="tocxref"><span class="secno">3.1.2.3 </span>Are insecure contexts allowed? - DEPRECATED</a></li><li class="tocline"><a href="#get-distinctive-identifier-consent-status" class="tocxref"><span class="secno">3.1.2.4 </span>Get Distinctive Identifier Consent Status</a></li></ul></li></ul></li><li class="tocline"><a href="#mediakeysystemconfiguration-dictionary" class="tocxref"><span class="secno">3.2 </span><span class="formerLink"><code>MediaKeySystemConfiguration</code></span> dictionary</a><ul class="toc"><li class="tocline"><a href="#dictionary-mediakeysystemconfiguration-members" class="tocxref"><span class="secno">3.2.1 </span>Dictionary <span class="formerLink"><code>MediaKeySystemConfiguration</code></span> Members</a></li></ul></li><li class="tocline"><a href="#mediakeysystemmediacapability-dictionary" class="tocxref"><span class="secno">3.3 </span><span class="formerLink"><code>MediaKeySystemMediaCapability</code></span> dictionary</a><ul class="toc"><li class="tocline"><a href="#dictionary-mediakeysystemmediacapability-members" class="tocxref"><span class="secno">3.3.1 </span>Dictionary <span class="formerLink"><code>MediaKeySystemMediaCapability</code></span> Members</a></li></ul></li></ul></li><li class="tocline"><a href="#mediakeysystemaccess-interface" class="tocxref"><span class="secno">4. </span><span class="formerLink"><code>MediaKeySystemAccess</code></span> Interface</a><ul class="toc"><li class="tocline"><a href="#attributes" class="tocxref"><span class="secno">4.1 </span>Attributes</a></li><li class="tocline"><a href="#methods-1" class="tocxref"><span class="secno">4.2 </span>Methods</a></li></ul></li><li class="tocline"><a href="#mediakeys-interface" class="tocxref"><span class="secno">5. </span><span class="formerLink"><code>MediaKeys</code></span> Interface</a><ul class="toc"><li class="tocline"><a href="#methods-2" class="tocxref"><span class="secno">5.1 </span>Methods</a></li><li class="tocline"><a href="#algorithms-1" class="tocxref"><span class="secno">5.2 </span>Algorithms</a><ul class="toc"><li class="tocline"><a href="#is-persistent-session-type" class="tocxref"><span class="secno">5.2.1 </span>Is persistent session type?</a></li></ul></li></ul></li><li class="tocline"><a href="#mediakeysession-interface" class="tocxref"><span class="secno">6. </span><span class="formerLink"><code>MediaKeySession</code></span> Interface</a><ul class="toc"><li class="tocline"><a href="#attributes-1" class="tocxref"><span class="secno">6.1 </span>Attributes</a></li><li class="tocline"><a href="#methods-3" class="tocxref"><span class="secno">6.2 </span>Methods</a></li><li class="tocline"><a href="#mediakeystatusmap-interface" class="tocxref"><span class="secno">6.3 </span><span class="formerLink"><code>MediaKeyStatusMap</code></span> Interface</a><ul class="toc"><li class="tocline"><a href="#attributes-2" class="tocxref"><span class="secno">6.3.1 </span>Attributes</a></li><li class="tocline"><a href="#methods-4" class="tocxref"><span class="secno">6.3.2 </span>Methods</a></li><li class="tocline"><a href="#callback-foreachcallback-parameters" class="tocxref"><span class="secno">6.3.3 </span>Callback <span class="formerLink"><code>ForEachCallback</code></span> Parameters</a></li></ul></li><li class="tocline"><a href="#mediakeymessageevent" class="tocxref"><span class="secno">6.4 </span><span class="formerLink"><code>MediaKeyMessageEvent</code></span></a><ul class="toc"><li class="tocline"><a href="#constructors" class="tocxref"><span class="secno">6.4.1 </span>Constructors</a></li><li class="tocline"><a href="#attributes-3" class="tocxref"><span class="secno">6.4.2 </span>Attributes</a></li><li class="tocline"><a href="#mediakeymessageeventinit" class="tocxref"><span class="secno">6.4.3 </span><span class="formerLink"><code>MediaKeyMessageEventInit</code></span></a><ul class="toc"><li class="tocline"><a href="#dictionary-mediakeymessageeventinit-members" class="tocxref"><span class="secno">6.4.3.1 </span>Dictionary <span class="formerLink"><code>MediaKeyMessageEventInit</code></span> Members</a></li></ul></li></ul></li><li class="tocline"><a href="#mediakeysession-events" class="tocxref"><span class="secno">6.5 </span>Event Summary</a></li><li class="tocline"><a href="#mediakeysession-algorithms" class="tocxref"><span class="secno">6.6 </span>Algorithms</a><ul class="toc"><li class="tocline"><a href="#queue-message" class="tocxref"><span class="secno">6.6.1 </span>Queue a "message" Event</a></li><li class="tocline"><a href="#update-key-statuses" class="tocxref"><span class="secno">6.6.2 </span>Update Key Statuses</a></li><li class="tocline"><a href="#update-expiration" class="tocxref"><span class="secno">6.6.3 </span>Update Expiration</a></li><li class="tocline"><a href="#session-close" class="tocxref"><span class="secno">6.6.4 </span>Session Close</a></li></ul></li><li class="tocline"><a href="#exceptions" class="tocxref"><span class="secno">6.7 </span>Exceptions</a></li><li class="tocline"><a href="#session-storage" class="tocxref"><span class="secno">6.8 </span>Session Storage and Persistence</a></li></ul></li><li class="tocline"><a href="#htmlmediaelement-extensions" class="tocxref"><span class="secno">7. </span><span class="formerLink"><code>HTMLMediaElement</code></span> Extensions</a><ul class="toc"><li class="tocline"><a href="#attributes-4" class="tocxref"><span class="secno">7.1 </span>Attributes</a></li><li class="tocline"><a href="#methods-5" class="tocxref"><span class="secno">7.2 </span>Methods</a></li><li class="tocline"><a href="#mediaencryptedevent" class="tocxref"><span class="secno">7.3 </span><span class="formerLink"><code>MediaEncryptedEvent</code></span></a><ul class="toc"><li class="tocline"><a href="#constructors-1" class="tocxref"><span class="secno">7.3.1 </span>Constructors</a></li><li class="tocline"><a href="#attributes-5" class="tocxref"><span class="secno">7.3.2 </span>Attributes</a></li><li class="tocline"><a href="#mediaencryptedeventinit" class="tocxref"><span class="secno">7.3.3 </span><span class="formerLink"><code>MediaEncryptedEventInit</code></span></a><ul class="toc"><li class="tocline"><a href="#dictionary-mediaencryptedeventinit-members" class="tocxref"><span class="secno">7.3.3.1 </span>Dictionary <span class="formerLink"><code>MediaEncryptedEventInit</code></span> Members</a></li></ul></li></ul></li><li class="tocline"><a href="#htmlmediaelement-events" class="tocxref"><span class="secno">7.4 </span>Event Summary</a></li><li class="tocline"><a href="#htmlmediaelement-algorithms" class="tocxref"><span class="secno">7.5 </span>Algorithms</a><ul class="toc"><li class="tocline"><a href="#initdata-encountered" class="tocxref"><span class="secno">7.5.1 </span>Initialization Data Encountered</a></li><li class="tocline"><a href="#encrypted-block-encountered" class="tocxref"><span class="secno">7.5.2 </span>Encrypted Block Encountered</a></li><li class="tocline"><a href="#queue-waitingforkey" class="tocxref"><span class="secno">7.5.3 </span>Queue a "waitingforkey" Event</a></li><li class="tocline"><a href="#resume-playback" class="tocxref"><span class="secno">7.5.4 </span>Attempt to Resume Playback If Necessary</a></li></ul></li><li class="tocline"><a href="#media-element-restictions" class="tocxref"><span class="secno">7.6 </span>Media Element Restrictions</a></li></ul></li><li class="tocline"><a href="#implementation-requirements" class="tocxref"><span class="secno">8. </span>Implementation Requirements</a><ul class="toc"><li class="tocline"><a href="#identifier-requirements" class="tocxref"><span class="secno">8.1 </span>Identifiers</a><ul class="toc"><li class="tocline"><a href="#limit-or-avoid-use-of-distinctive-identifiers" class="tocxref"><span class="secno">8.1.1 </span>Limit or Avoid use of Distinctive Identifiers</a></li><li class="tocline"><a href="#encrypt-identifiers" class="tocxref"><span class="secno">8.1.2 </span>Encrypt Identifiers</a></li><li class="tocline"><a href="#per-origin-identifiers" class="tocxref"><span class="secno">8.1.3 </span>Use Per-Origin Identifiers</a></li><li class="tocline"><a href="#allow-identifiers-cleared" class="tocxref"><span class="secno">8.1.4 </span>Allow Identifiers to be Cleared</a></li></ul></li><li class="tocline"><a href="#support-multiple-keys" class="tocxref"><span class="secno">8.2 </span>Support Multiple Keys</a></li><li class="tocline"><a href="#initialization-data-type-support-requirements" class="tocxref"><span class="secno">8.3 </span>Initialization Data Type Support</a><ul class="toc"><li class="tocline"><a href="#licenses-generated-are-independent-of-content-type" class="tocxref"><span class="secno">8.3.1 </span>Licenses Generated are Independent of Content Type</a></li><li class="tocline"><a href="#support-extraction-from-media-data" class="tocxref"><span class="secno">8.3.2 </span>Support Extraction From Media Data</a></li></ul></li><li class="tocline"><a href="#media-requirements" class="tocxref"><span class="secno">8.4 </span>Supported Media</a><ul class="toc"><li class="tocline"><a href="#unencrypted-container" class="tocxref"><span class="secno">8.4.1 </span>Unencrypted Container</a></li><li class="tocline"><a href="#interoperably-encrypted" class="tocxref"><span class="secno">8.4.2 </span>Interoperably Encrypted</a></li><li class="tocline"><a href="#unencrypted-in-band-support-content" class="tocxref"><span class="secno">8.4.3 </span>Unencrypted In-band Support Content</a></li></ul></li></ul></li><li class="tocline"><a href="#common-key-systems" class="tocxref"><span class="secno">9. </span>Common Key Systems</a><ul class="toc"><li class="tocline"><a href="#clear-key" class="tocxref"><span class="secno">9.1 </span>Clear Key</a><ul class="toc"><li class="tocline"><a href="#clear-key-capabilities" class="tocxref"><span class="secno">9.1.1 </span>Capabilities</a></li><li class="tocline"><a href="#clear-key-behavior" class="tocxref"><span class="secno">9.1.2 </span>Behavior</a></li><li class="tocline"><a href="#clear-key-request-format" class="tocxref"><span class="secno">9.1.3 </span>License Request Format</a><ul class="toc"><li class="tocline"><a href="#clear-key-request-format-example" class="tocxref"><span class="secno">9.1.3.1 </span>Example</a></li></ul></li><li class="tocline"><a href="#clear-key-license-format" class="tocxref"><span class="secno">9.1.4 </span>License Format</a><ul class="toc"><li class="tocline"><a href="#clear-key-license-format-example" class="tocxref"><span class="secno">9.1.4.1 </span>Example</a></li></ul></li><li class="tocline"><a href="#clear-key-release-format" class="tocxref"><span class="secno">9.1.5 </span>License Release Format</a><ul class="toc"><li class="tocline"><a href="#clear-key-release-format-example" class="tocxref"><span class="secno">9.1.5.1 </span>Example</a></li></ul></li><li class="tocline"><a href="#clear-key-release-ack-format" class="tocxref"><span class="secno">9.1.6 </span>License Release Acknowledgement Format</a><ul class="toc"><li class="tocline"><a href="#clear-key-release-ack-format-example" class="tocxref"><span class="secno">9.1.6.1 </span>Example</a></li></ul></li><li class="tocline"><a href="#using-base64url" class="tocxref"><span class="secno">9.1.7 </span>Using base64url</a></li></ul></li></ul></li><li class="tocline"><a href="#security" class="tocxref"><span class="secno">10. </span>Security</a><ul class="toc"><li class="tocline"><a href="#input-data-security" class="tocxref"><span class="secno">10.1 </span>Input Data Attacks and Vulnerabilities</a></li><li class="tocline"><a href="#cdm-security" class="tocxref"><span class="secno">10.2 </span>CDM Attacks and Vulnerabilities</a></li><li class="tocline"><a href="#network-attacks" class="tocxref"><span class="secno">10.3 </span>Network Attacks</a><ul class="toc"><li class="tocline"><a href="#potential-attacks" class="tocxref"><span class="secno">10.3.1 </span>Potential Attacks</a></li><li class="tocline"><a href="#mitigations" class="tocxref"><span class="secno">10.3.2 </span>Mitigations</a></li></ul></li><li class="tocline"><a href="#iframe-attacks" class="tocxref"><span class="secno">10.4 </span><code>iframe</code> Attacks</a><ul class="toc"><li class="tocline"><a href="#potential-attacks-1" class="tocxref"><span class="secno">10.4.1 </span>Potential Attacks</a></li><li class="tocline"><a href="#mitigations-1" class="tocxref"><span class="secno">10.4.2 </span>Mitigations</a></li></ul></li><li class="tocline"><a href="#cross-directory-attacks" class="tocxref"><span class="secno">10.5 </span>Cross-Directory Attacks</a></li></ul></li><li class="tocline"><a href="#privacy" class="tocxref"><span class="secno">11. </span>Privacy</a><ul class="toc"><li class="tocline"><a href="#privacy-disclosure" class="tocxref"><span class="secno">11.1 </span>Information Disclosed by EME and Key Systems</a></li><li class="tocline"><a href="#privacy-fingerprinting" class="tocxref"><span class="secno">11.2 </span>Fingerprinting</a></li><li class="tocline"><a href="#privacy-leakage" class="tocxref"><span class="secno">11.3 </span>Information Leakage</a><ul class="toc"><li class="tocline"><a href="#concerns" class="tocxref"><span class="secno">11.3.1 </span>Concerns</a></li><li class="tocline"><a href="#mitigations-2" class="tocxref"><span class="secno">11.3.2 </span>Mitigations</a></li></ul></li><li class="tocline"><a href="#user-tracking" class="tocxref"><span class="secno">11.4 </span>User Tracking</a><ul class="toc"><li class="tocline"><a href="#concerns-1" class="tocxref"><span class="secno">11.4.1 </span>Concerns</a></li><li class="tocline"><a href="#mitigations-3" class="tocxref"><span class="secno">11.4.2 </span>Mitigations</a></li><li class="tocline"><a href="#privacy-individualization" class="tocxref"><span class="secno">11.4.3 </span>Individualization</a><ul class="toc"><li class="tocline"><a href="#origin-independent-individualization" class="tocxref"><span class="secno">11.4.3.1 </span>Origin-Independent Individualization</a></li><li class="tocline"><a href="#per-origin-individualization" class="tocxref"><span class="secno">11.4.3.2 </span>Per-Origin Individualization</a></li></ul></li></ul></li><li class="tocline"><a href="#privacy-storedinfo" class="tocxref"><span class="secno">11.5 </span>Information Stored on User Devices</a><ul class="toc"><li class="tocline"><a href="#concerns-2" class="tocxref"><span class="secno">11.5.1 </span>Concerns</a></li><li class="tocline"><a href="#mitigations-4" class="tocxref"><span class="secno">11.5.2 </span>Mitigations</a></li></ul></li><li class="tocline"><a href="#incomplete-clearing" class="tocxref"><span class="secno">11.6 </span>Incomplete Clearing of Data</a><ul class="toc"><li class="tocline"><a href="#concerns-3" class="tocxref"><span class="secno">11.6.1 </span>Concerns</a></li><li class="tocline"><a href="#mitigations-5" class="tocxref"><span class="secno">11.6.2 </span>Mitigations</a></li></ul></li><li class="tocline"><a href="#private-browsing" class="tocxref"><span class="secno">11.7 </span>Private Browsing Modes</a></li><li class="tocline"><a href="#privacy-secureorigin" class="tocxref"><span class="secno">11.8 </span>Secure Origin and Transport</a></li></ul></li><li class="tocline"><a href="#examples" class="tocxref"><span class="secno">12. </span>Examples</a><ul class="toc"><li class="tocline"><a href="#example-source-and-key-known" class="tocxref"><span class="secno">12.1 </span>Source and Key Known at Page Load (Clear Key)</a></li><li class="tocline"><a href="#example-selecting-key-system" class="tocxref"><span class="secno">12.2 </span>Selecting a Supported Key System and Using Initialization Data from the "encrypted" Event</a></li><li class="tocline"><a href="#example-mediakeys-before-source" class="tocxref"><span class="secno">12.3 </span>Create MediaKeys Before Loading Media</a></li><li class="tocline"><a href="#example-using-all-events" class="tocxref"><span class="secno">12.4 </span>Using All Events</a></li><li class="tocline"><a href="#example-stored-license" class="tocxref"><span class="secno">12.5 </span>Stored License</a></li></ul></li><li class="tocline"><a href="#revision-history" class="tocxref"><span class="secno">13. </span>Revision History</a></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">A. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">A.1 </span>Normative references</a></li><li class="tocline"><a href="#informative-references" class="tocxref"><span class="secno">A.2 </span>Informative references</a></li></ul></li></ul></section>
<section id="introduction" class="informative" typeof="bibo:Chapter" resource="#introduction" property="bibo:hasPart">
<!--OddPage--><h2 id="h-introduction" resource="#h-introduction"><span property="xhv:role" resource="xhv:heading"><span class="secno">1. </span>Introduction</span></h2><p><em>This section is non-normative.</em></p>
<p>
This specification enables script to select content protection mechanisms, control license/key exchange, and implement custom license management algorithms.
It supports a wide range of use cases without requiring client-side modifications in each user agent for each use case.
This enables content providers to develop a single application solution for all devices.
</p>
<p>
Supported content is encrypted per container-specific "common encryption" specifications, enabling use across key systems.
Supported content has an unencrypted container, enabling metadata to be provided to the application and maintaining compatibility with other <code><a href="http://www.w3.org/TR/html5/embedded-content-0.html#htmlmediaelement">HTMLMediaElement</a></code> features.
</p>
<p>
A generic stack implemented using the API is shown below.
This diagram shows an example flow; other combinations of API calls and events are possible.
</p>
<img src="stack_overview.svg" alt="A generic stack implemented using the proposed APIs" height="700">
</section>
<section id="definitions" typeof="bibo:Chapter" resource="#definitions" property="bibo:hasPart">
<!--OddPage--><h2 id="h-definitions" resource="#h-definitions"><span property="xhv:role" resource="xhv:heading"><span class="secno">2. </span>Definitions</span></h2>
<dl>
<dt id="cdm">Content Decryption Module (CDM)</dt>
<dd>
<p>Content Decryption Module (CDM) is the client component that provides the functionality, including decryption, for one or more <a href="#key-system">Key Systems</a>.</p>
<div class="note"><div class="note-title" aria-level="3" role="heading" id="h-note1"><span>Note</span></div><p class="">Implementations may or may not separate the implementations of CDMs or treat them as separate from the user agent.
This is transparent to the API and application.</p></div>
<p>All messages and communication to and from the CDM, such as between the CDM and a license server, <em class="rfc2119" title="MUST">MUST</em> be passed through the user agent.
The CDM <em class="rfc2119" title="MUST NOT">MUST NOT</em> make direct out-of band network requests.
All messages and communication other than those described in <a href="#origin-independent-individualization">Origin-Independent Individualization</a> <em class="rfc2119" title="MUST">MUST</em> be passed through the application via the APIs defined in this specification.
Specifically, all communication that contains application-, <a href="http://www.w3.org/TR/html5/browsers.html#origin-0">origin</a>-, or content-specific information or is sent to a URL specified by the application or based on its origin, <em class="rfc2119" title="MUST">MUST</em> pass through the APIs.
This includes all license exchange messages.
</p>
<p>
</p>
</dd>
<dt id="key-system">Key System</dt>
<dd>
<p>A Key System is a generic term for a decryption mechanism and/or content protection provider.
Key System strings provide unique identification of a Key System.
They are used by the user agent to select a <a href="#cdm">CDM</a> and identify the source of a key-related event.
User agents <em class="rfc2119" title="MUST">MUST</em> support the <a href="#common-key-systems">Common Key Systems</a>.
User agents <em class="rfc2119" title="MAY">MAY</em> also provide additional CDMs with corresponding Key System strings.
</p>
<p>A Key System string is always a reverse domain name.
Key System strings are compared using case-sensitive matching. It is <em class="rfc2119" title="RECOMMENDED">RECOMMENDED</em> that CDMs use simple lower-case ASCII key system strings.</p>
<div class="note"><div class="note-title" aria-level="3" role="heading" id="h-note2"><span>Note</span></div><p class="">For example, "com.example.somesystem".</p></div>
<div class="note"><div class="note-title" aria-level="3" role="heading" id="h-note3"><span>Note</span></div><p class="">
Within a given system ("somesystem" in the example), subsystems may be defined as determined by the key system provider.
For example, "com.example.somesystem.1" and "com.example.somesystem.1_5".
Key System providers should keep in mind that these will be used for comparison and discovery, so they should be easy to compare and the structure should remain reasonably simple.
</p></div>
</dd>
<dt id="key-session">Key Session</dt>
<dd>
<p>A Key Session, or simply Session, provides a context for message exchange with the CDM as a result of which key(s) are made available to the <a href="#cdm">CDM</a>.
Sessions are embodied as <a href="#idl-def-MediaKeySession" class="idlType"><code>MediaKeySession</code></a> objects.
Each Key session is associated with a single instance of <a href="#initialization-data">Initialization Data</a> provided in the <code><a href="#widl-MediaKeySession-generateRequest-Promise-void--DOMString-initDataType-BufferSource-initData">generateRequest()</a></code> call.
</p>
<p>Each Key Session is associated with a single <a href="#idl-def-MediaKeys" class="idlType"><code>MediaKeys</code></a> object, and only media element(s) associated with that object may access key(s) associated with the session.
Other <a href="#idl-def-MediaKeys" class="idlType"><code>MediaKeys</code></a> objects, <a href="#cdm">CDM</a> instances, and media elements <em class="rfc2119" title="MUST NOT">MUST NOT</em> access the key session or use its key(s).
Key sessions and the keys they contain are no longer usable by the CDM for decryption when the <a href="#session-close">session is closed</a>, including when the <a href="#idl-def-MediaKeySession" class="idlType"><code>MediaKeySession</code></a> object is destroyed.
</p>
<p><a href="#decryption-key-id">Key IDs</a> <em class="rfc2119" title="MUST">MUST</em> be unique within a session.</p>
</dd>
<dt id="session-id">Session ID</dt>
<dd>
<p>A Session ID is a unique string identifier generated by the <a href="#cdm">CDM</a> that can be used by the application to identify <a href="#idl-def-MediaKeySession" class="idlType"><code>MediaKeySession</code></a> objects.</p>
<p>A new Session ID is generated each time the user agent and CDM successfully create a new session.</p>
<p>Each Session ID <em class="rfc2119" title="SHALL">SHALL</em> be unique within the browsing context in which it was created.
For session types for which the <a href="#is-persistent-session-type">Is persistent session type?</a> algorithm returns <code>true</code>, Session IDs <em class="rfc2119" title="MUST">MUST</em> be unique within the <a href="http://www.w3.org/TR/html5/browsers.html#origin-0">origin</a> over time, including across browsing sessions.
</p>
<div class="note"><div class="note-title" aria-level="3" role="heading" id="h-note4"><span>Note</span></div><p class="">The underlying content protection protocol does not necessarily need to support Session IDs.</p></div>
</dd>
<dt id="decryption-key">Key</dt>
<dd>
<p>Unless otherwise stated, key refers to a decryption key that can be used to decrypt blocks within <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a>.
Each such key is uniquely identified by a <a href="#decryption-key-id">key ID</a>.
A key is associated with the <a href="#key-session">session</a> used to provide it to the CDM. (The same key may be present in multiple sessions.)
Such keys <em class="rfc2119" title="MUST">MUST</em> only be provided to the <a href="#cdm">CDM</a> via an <code><a href="#widl-MediaKeySession-update-Promise-void--BufferSource-response">update()</a></code> call. (They may later be loaded by <code><a href="#widl-MediaKeySession-load-Promise-boolean--DOMString-sessionId">load()</a></code> as part of the stored session data.)
</p>
<p>A key is considered <em>usable</em> if the CDM is certain the key is currently usable to decrypt <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a></p>
<div class="note"><div class="note-title" aria-level="3" role="heading" id="h-note5"><span>Note</span></div><p class="">For example, a key is not usable if its license has expired.</p></div>
<div class="note"><div class="note-title" aria-level="3" role="heading" id="h-note6"><span>Note</span></div><p class="">Authors <em class="rfc2119" title="SHOULD">SHOULD</em> encrypt each set of stream(s) that requires enforcement of a meaningfully different policy with a distinct key (and key ID).
For example, if policies may differ between two video resolutions, stream(s) containing one resolution should not be encrypted with the key used to encrypt stream(s) containing the other resolution.
When encrypted, audio streams <em class="rfc2119" title="SHOULD NOT">SHOULD NOT</em> use the same key as any video stream.
This is the only way to ensure enforcement and compatibility across clients.
</p></div>
</dd>
<dt id="decryption-key-id">Key ID</dt>
<dd>
<p>A <a href="#decryption-key">key</a> is associated with a key ID that is a sequence of octets and which uniquely identifies the key.
The container specifies the ID of the key that can decrypt a block or set of blocks within the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a>.
<a href="#initialization-data">Initialization Data</a> <em class="rfc2119" title="MAY">MAY</em> contain key ID(s) to identify the keys that are needed to decrypt the media data.
However, there is no requirement that Initialization Data contain any or all key IDs used in the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a> or <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-resource">media resource</a>.
<a href="#license">Licenses</a> provided to the CDM associate each key with a key ID so the <a href="#cdm">CDM</a> can select the appropriate key when decrypting an encrypted block of media data.
</p>
</dd>
<dt id="known-key">Known Key</dt>
<dd>
<p>A key is considered to be known to a session if the CDM's implementation of the session contains any information - specifically the <a href="#decryption-key-id">key ID</a> - about it, regardless of whether the actual <a href="#decryption-key">key</a> is usable or its value is known.
Known keys are exposed via the <code><a href="#widl-MediaKeySession-keyStatuses">keyStatuses</a></code> attribute.
</p>
<p>Keys are considered known even after they become unusable, such as due to expiration or if they are removed but a <a href="#record-of-license-destruction">record of license destruction</a> or <a href="#record-of-key-usage">record of key usage</a> is available.
Keys only become unknown when they are explicitly removed from a session and any license release message is acknowledged.
</p>
<div class="note"><div class="note-title" aria-level="3" role="heading" id="h-note7"><span>Note</span></div><p class="">For example, a key could become unknown if an <code><a href="#widl-MediaKeySession-update-Promise-void--BufferSource-response">update()</a></code> call provides a new license that does not include the key and includes instructions to replace the license(s) that previously contained the key.</p></div>
</dd>
<dt id="license">License</dt>
<dd>
<p>A license is key system-specific state information that includes one or more <a href="#decryption-key">key(s)</a> - each associated with a <a href="#decryption-key-id">key ID</a> - and potentially other information about key usage.</p>
</dd>
<dt id="initialization-data">Initialization Data</dt>
<dd>
<div class="note"><div class="note-title" aria-level="3" role="heading" id="h-note8"><span>Note</span></div><p class="">
<a href="#key-system">Key Systems</a> usually require a block of initialization data containing information about the stream to be decrypted before they can construct a license request message.
This block could be a simple key or content ID or a more complex structure containing such information.
It <em class="rfc2119" title="SHOULD">SHOULD</em> always allow unique identification of the <a href="#decryption-key">key(s)</a> needed to decrypt the content.
This initialization information <em class="rfc2119" title="MAY">MAY</em> be obtained in some application-specific way or provided with the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a>.
</p></div>
<p>
Initialization Data is a generic term for container-specific data that is used by a <a href="#cdm">CDM</a> to generate a license request.
</p>
<p>
The format of the initialization data depends upon the type of container, and containers <em class="rfc2119" title="MAY">MAY</em> support more than one format
of initialization data. The <dfn id="initialization-data-type" data-dfn-type="dfn">Initialization Data Type</dfn> is a string that indicates the
format of the accompanying Initialization Data. Initialization Data Type strings are always matched case-sensitively. It is
<em class="rfc2119" title="RECOMMENDED">RECOMMENDED</em> that Initialization Data Type strings are lower-case ASCII strings.
</p>
<p>
The Encrypted Media Extensions Stream Format and Initialization Data Format Registry [<cite><a class="bibref" href="#bib-EME-REGISTRY">EME-REGISTRY</a></cite>]
provides the mapping from <a href="#initialization-data-type">Initialization Data Type</a> string to the specification for each format.
</p>
<p>
When the user agent encounters Initialization Data in the <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a>, it provides that Initialization Data to the application in the <code><a href="#widl-MediaEncryptedEventInit-initData">initData</a></code> attribute of the <code><a href="#dom-evt-encrypted">encrypted</a></code> event.
The user agent <em class="rfc2119" title="MUST NOT">MUST NOT</em> store the Initialization Data or use its <em>content</em> at the time it is encountered.
The application provides Initialization Data to the <a href="#cdm">CDM</a> via <code><a href="#widl-MediaKeySession-generateRequest-Promise-void--DOMString-initDataType-BufferSource-initData">generateRequest()</a></code>.
The user agent <em class="rfc2119" title="MUST NOT">MUST NOT</em> provide Initialization Data to the CDM by other means.
</p>
<p>Initialization Data <em class="rfc2119" title="MUST">MUST</em> be a fixed value for a given set of stream(s) or <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a>.
It <em class="rfc2119" title="MUST">MUST</em> only contain information related to the keys required to play a given set of stream(s) or <a href="http://www.w3.org/TR/html5/embedded-content-0.html#media-data">media data</a>.
It <em class="rfc2119" title="MUST NOT">MUST NOT</em> contain application data, client-specific data, user-specific data, or executable code.
</p>
<p>Initialization Data <em class="rfc2119" title="SHOULD NOT">SHOULD NOT</em> contain Key System-specific data or values.
Implementations <em class="rfc2119" title="MUST">MUST</em> support the common formats defined [<cite><a class="bibref" href="#bib-EME-REGISTRY">EME-REGISTRY</a></cite>] for each <a href="#initialization-data-type">Initialization Data Type</a> they support.
</p>
<div class="note"><div class="note-title" aria-level="3" role="heading" id="h-note9"><span>Note</span></div><p class="">
Use of proprietary formats/contents is discouraged, and supporting or using <em>only</em> proprietary formats is strongly discouraged.
Proprietary formats should only be used with pre-existing content or on pre-existing devices that do not support the common formats.
</p></div>
</dd>
<dt id="distinctive-identifier">Distinctive Identifier</dt>
<dd>
<p>A distinctive identifier is a piece of data, implication of the possession of a piece of data, or an observable behavior or timing for which all of the following criteria hold:</p>
<ul>
<li><p>It is not shared across a large population of users or devices.</p></li>
<li><p>It is exposed outside the client device or exposed to the application such that the application has the opportunity to send it (even if in encrypted form if decryptable outside the device) or information about it outside the client device.</p></li>
<li><p>It is used in more than one session or <!-- TODO: Get clarity on this: -->is potentially used in one persistent session across the point of persistence.</p></li>
</ul>
<div class="note"><div class="note-title" aria-level="3" role="heading" id="h-note10"><span>Note</span></div><p class="">A distinctive identifier is typically unique to a user or device, but an identifier does not need to be strictly unique to be distinctive.
For example, an identifier shared among a small number of users could still be distinctive.
</p></div>
<div class="note"><div class="note-title" aria-level="3" role="heading" id="h-note11"><span>Note</span></div><div class="">
<p>Examples of distinctive identifiers include but are not limited to:</p>