This repository was archived by the owner on Feb 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathindex.html
1638 lines (1536 loc) · 115 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 dir="ltr" lang="en"><head>
<meta charset="utf-8">
<meta name="generator" content="ReSpec 29.0.1">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<style>
span.example-title{text-transform:none}
:is(aside,div).example,div.illegal-example{padding:.5em;margin:1em 0;position:relative;clear:both}
div.illegal-example{color:red}
div.illegal-example p{color:#000}
:is(aside,div).example{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}
.example pre{background-color:rgba(0,0,0,.03)}
</style>
<style>
.issue-label{text-transform:initial}
.warning>p:first-child{margin-top:0}
.warning{padding:.5em;border-left-width:.5em;border-left-style:solid}
span.warning{padding:.1em .5em .15em}
.issue.closed span.issue-number{text-decoration:line-through}
.warning{border-color:#f11;border-width:.2em;border-style:solid;background:#fbe9e9}
.warning-title:before{content:"⚠";font-size:1.3em;float:left;padding-right:.3em;margin-top:-.3em}
li.task-list-item{list-style:none}
input.task-list-item-checkbox{margin:0 .35em .25em -1.6em;vertical-align:middle}
.issue a.respec-gh-label{padding:5px;margin:0 2px 0 2px;font-size:10px;text-transform:none;text-decoration:none;font-weight:700;border-radius:4px;position:relative;bottom:2px;border:none;display:inline-block}
</style>
<style>
pre.idl{padding:1em;position:relative}
pre.idl>code{color:#000}
@media print{
pre.idl{white-space:pre-wrap}
}
.idlHeader{display:block;width:150px;background:#8ccbf2;color:#fff;font-family:sans-serif;font-weight:700;margin:-1em 0 1em -1em;height:28px;line-height:28px}
.idlHeader a.self-link{margin-left:.3cm;text-decoration:none;border-bottom:none}
.idlID{font-weight:700;color:#005a9c}
.idlType{color:#005a9c}
.idlName{color:#ff4500}
.idlName a{color:#ff4500;border-bottom:1px dotted #ff4500;text-decoration:none}
a.idlEnumItem{color:#000;border-bottom:1px dotted #ccc;text-decoration:none}
.idlSuperclass{font-style:italic;color:#005a9c}
.idlDefaultValue,.idlParamName{font-style:italic}
.extAttr{color:#666}
.idlSectionComment{color:gray}
.idlIncludes a{font-weight:700}
.respec-button-copy-paste:focus{text-decoration:none;border-color:#51a7e8;outline:0;box-shadow:0 0 5px rgba(81,167,232,.5)}
.respec-button-copy-paste:is(:focus:hover,.selected:focus){border-color:#51a7e8}
.respec-button-copy-paste:is(:hover,:active,.zeroclipboard-is-hover,.zeroclipboard-is-active){text-decoration:none;background-color:#ddd;background-image:linear-gradient(#eee,#ddd);border-color:#ccc}
.respec-button-copy-paste:is(:active,.selected,.zeroclipboard-is-active){background-color:#dcdcdc;background-image:none;border-color:#b5b5b5;box-shadow:inset 0 2px 4px rgba(0,0,0,.15)}
.respec-button-copy-paste.selected:hover{background-color:#cfcfcf}
.respec-button-copy-paste:is(:disabled,:disabled:hover,.disabled,.disabled:hover){color:rgba(102,102,102,.5);cursor:default;background-color:rgba(229,229,229,.5);background-image:none;border-color:rgba(197,197,197,.5);box-shadow:none}
@media print{
.respec-button-copy-paste{visibility:hidden}
}
</style>
<style>
dfn{cursor:pointer}
.dfn-panel{position:absolute;z-index:35;min-width:300px;max-width:500px;padding:.5em .75em;margin-top:.6em;font:small Helvetica Neue,sans-serif,Droid Sans Fallback;background:#fff;color:#000;box-shadow:0 1em 3em -.4em rgba(0,0,0,.3),0 0 1px 1px rgba(0,0,0,.05);border-radius:2px}
.dfn-panel:not(.docked)>.caret{position:absolute;top:-9px}
.dfn-panel:not(.docked)>.caret::after,.dfn-panel:not(.docked)>.caret::before{content:"";position:absolute;border:10px solid transparent;border-top:0;border-bottom:10px solid #fff;top:0}
.dfn-panel:not(.docked)>.caret::before{border-bottom:9px solid #a2a9b1}
.dfn-panel *{margin:0}
.dfn-panel b{display:block;color:#000;margin-top:.25em}
.dfn-panel ul a[href]{color:#333}
.dfn-panel>div{display:flex}
.dfn-panel a.self-link{font-weight:700;margin-right:auto}
.dfn-panel .marker{padding:.1em;margin-left:.5em;border-radius:.2em;text-align:center;white-space:nowrap;font-size:90%;color:#040b1c}
.dfn-panel .marker.dfn-exported{background:#d1edfd;box-shadow:0 0 0 .125em #1ca5f940}
.dfn-panel .marker.idl-block{background:#8ccbf2;box-shadow:0 0 0 .125em #0670b161}
.dfn-panel a:not(:hover){text-decoration:none!important;border-bottom:none!important}
.dfn-panel a[href]:hover{border-bottom-width:1px}
.dfn-panel ul{padding:0}
.dfn-panel li{margin-left:1em}
.dfn-panel.docked{position:fixed;left:.5em;top:unset;bottom:2em;margin:0 auto;max-width:calc(100vw - .75em * 2 - .5em - .2em * 2);max-height:30vh;overflow:auto}
</style>
<title>Media Capture Depth Stream Extensions</title>
<style id="respec-mainstyle">
@keyframes pop{
0%{transform:scale(1,1)}
25%{transform:scale(1.25,1.25);opacity:.75}
100%{transform:scale(1,1)}
}
:is(h1,h2,h3,h4,h5,h6,a) abbr{border:none}
dfn{font-weight:700}
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}
.respec-offending-element:target{animation:pop .25s ease-in-out 0s 1}
.respec-offending-element,a[href].respec-offending-element{text-decoration:red wavy underline}
@supports not (text-decoration:red wavy underline){
.respec-offending-element:not(pre){display:inline-block}
.respec-offending-element{background:url(data:image/gif;base64,R0lGODdhBAADAPEAANv///8AAP///wAAACwAAAAABAADAEACBZQjmIAFADs=) bottom repeat-x}
}
#references :target{background:#eaf3ff;animation:pop .4s ease-in-out 0s 1}
cite .bibref{font-style:normal}
code{color:#c63501}
th code{color:inherit}
a[href].orcid{padding-left:4px;padding-right:4px}
a[href].orcid>svg{margin-bottom:-2px}
.toc a,.tof a{text-decoration:none}
a .figno,a .secno{color:#000}
ol.tof,ul.tof{list-style:none outside none}
.caption{margin-top:.5em;font-style:italic}
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 a{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}
.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}
#issue-summary>ul{column-count:2}
#issue-summary li{list-style:none;display:inline-block}
details.respec-tests-details{margin-left:1em;display:inline-block;vertical-align:top}
details.respec-tests-details>*{padding-right:2em}
details.respec-tests-details[open]{z-index:999999;position:absolute;border:thin solid #cad3e2;border-radius:.3em;background-color:#fff;padding-bottom:.5em}
details.respec-tests-details[open]>summary{border-bottom:thin solid #cad3e2;padding-left:1em;margin-bottom:1em;line-height:2em}
details.respec-tests-details>ul{width:100%;margin-top:-.3em}
details.respec-tests-details>li{padding-left:1em}
a[href].self-link:hover{opacity:1;text-decoration:none;background-color:transparent}
aside.example .marker>a.self-link{color:inherit}
:is(h2,h3,h4,h5,h6)+a.self-link{border:none;color:inherit;position:relative;top:-2.75em;left:-1.4em;margin-bottom:-2em;display:block;font-size:100%}
:is(h2,h3,h4,h5,h6)+a.self-link::before{content:"§";opacity:.5;text-decoration:none;line-height:1.2em;vertical-align:middle}
@media (max-width:767px){
dd{margin-left:0}
:is(h2,h3,h4,h5,h6)+a.self-link{left:101%}
}
@media print{
.removeOnSave{display:none}
}
</style>
<script src="https://www.w3.org/scripts/MathJax/2.7.5/MathJax.js?config=AM_CHTML">
</script>
<style>
/* workaround to hide redundant dfns */
p.related { visibility: hidden; height: 0px; }
</style>
<style type="text/css">
.MathJax_Hover_Frame {border-radius: .25em; -webkit-border-radius: .25em; -moz-border-radius: .25em; -khtml-border-radius: .25em; box-shadow: 0px 0px 15px #83A; -webkit-box-shadow: 0px 0px 15px #83A; -moz-box-shadow: 0px 0px 15px #83A; -khtml-box-shadow: 0px 0px 15px #83A; border: 1px solid #A6D ! important; display: inline-block; position: absolute}
.MathJax_Menu_Button .MathJax_Hover_Arrow {position: absolute; cursor: pointer; display: inline-block; border: 2px solid #AAA; border-radius: 4px; -webkit-border-radius: 4px; -moz-border-radius: 4px; -khtml-border-radius: 4px; font-family: 'Courier New',Courier; font-size: 9px; color: #F0F0F0}
.MathJax_Menu_Button .MathJax_Hover_Arrow span {display: block; background-color: #AAA; border: 1px solid; border-radius: 3px; line-height: 0; padding: 4px}
.MathJax_Hover_Arrow:hover {color: white!important; border: 2px solid #CCC!important}
.MathJax_Hover_Arrow:hover span {background-color: #CCC!important}
</style>
<style type="text/css">
#MathJax_About {position: fixed; left: 50%; width: auto; text-align: center; border: 3px outset; padding: 1em 2em; background-color: #DDDDDD; color: black; cursor: default; font-family: message-box; font-size: 120%; font-style: normal; text-indent: 0; text-transform: none; line-height: normal; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; z-index: 201; border-radius: 15px; -webkit-border-radius: 15px; -moz-border-radius: 15px; -khtml-border-radius: 15px; box-shadow: 0px 10px 20px #808080; -webkit-box-shadow: 0px 10px 20px #808080; -moz-box-shadow: 0px 10px 20px #808080; -khtml-box-shadow: 0px 10px 20px #808080; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')}
#MathJax_About.MathJax_MousePost {outline: none}
.MathJax_Menu {position: absolute; background-color: white; color: black; width: auto; padding: 5px 0px; border: 1px solid #CCCCCC; margin: 0; cursor: default; font: menu; text-align: left; text-indent: 0; text-transform: none; line-height: normal; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; z-index: 201; border-radius: 5px; -webkit-border-radius: 5px; -moz-border-radius: 5px; -khtml-border-radius: 5px; box-shadow: 0px 10px 20px #808080; -webkit-box-shadow: 0px 10px 20px #808080; -moz-box-shadow: 0px 10px 20px #808080; -khtml-box-shadow: 0px 10px 20px #808080; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')}
.MathJax_MenuItem {padding: 1px 2em; background: transparent}
.MathJax_MenuArrow {position: absolute; right: .5em; padding-top: .25em; color: #666666; font-size: .75em}
.MathJax_MenuActive .MathJax_MenuArrow {color: white}
.MathJax_MenuArrow.RTL {left: .5em; right: auto}
.MathJax_MenuCheck {position: absolute; left: .7em}
.MathJax_MenuCheck.RTL {right: .7em; left: auto}
.MathJax_MenuRadioCheck {position: absolute; left: .7em}
.MathJax_MenuRadioCheck.RTL {right: .7em; left: auto}
.MathJax_MenuLabel {padding: 1px 2em 3px 1.33em; font-style: italic}
.MathJax_MenuRule {border-top: 1px solid #DDDDDD; margin: 4px 3px}
.MathJax_MenuDisabled {color: GrayText}
.MathJax_MenuActive {background-color: #606872; color: white}
.MathJax_MenuDisabled:focus, .MathJax_MenuLabel:focus {background-color: #E8E8E8}
.MathJax_ContextMenu:focus {outline: none}
.MathJax_ContextMenu .MathJax_MenuItem:focus {outline: none}
#MathJax_AboutClose {top: .2em; right: .2em}
.MathJax_Menu .MathJax_MenuClose {top: -10px; left: -10px}
.MathJax_MenuClose {position: absolute; cursor: pointer; display: inline-block; border: 2px solid #AAA; border-radius: 18px; -webkit-border-radius: 18px; -moz-border-radius: 18px; -khtml-border-radius: 18px; font-family: 'Courier New',Courier; font-size: 24px; color: #F0F0F0}
.MathJax_MenuClose span {display: block; background-color: #AAA; border: 1.5px solid; border-radius: 18px; -webkit-border-radius: 18px; -moz-border-radius: 18px; -khtml-border-radius: 18px; line-height: 0; padding: 8px 0 6px}
.MathJax_MenuClose:hover {color: white!important; border: 2px solid #CCC!important}
.MathJax_MenuClose:hover span {background-color: #CCC!important}
.MathJax_MenuClose:hover:focus {outline: none}
</style>
<style type="text/css">
.MathJax_Preview .MJXf-math {color: inherit!important}
</style>
<style type="text/css">
.MJX_Assistive_MathML {position: absolute!important; top: 0; left: 0; clip: rect(1px, 1px, 1px, 1px); padding: 1px 0 0 0!important; border: 0!important; height: 1px!important; width: 1px!important; overflow: hidden!important; display: block!important; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none}
.MJX_Assistive_MathML.MJX_Assistive_MathML_Block {width: 100%!important}
</style>
<style type="text/css">
#MathJax_Zoom {position: absolute; background-color: #F0F0F0; overflow: auto; display: block; z-index: 301; padding: .5em; border: 1px solid black; margin: 0; font-weight: normal; font-style: normal; text-align: left; text-indent: 0; text-transform: none; line-height: normal; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; box-shadow: 5px 5px 15px #AAAAAA; -webkit-box-shadow: 5px 5px 15px #AAAAAA; -moz-box-shadow: 5px 5px 15px #AAAAAA; -khtml-box-shadow: 5px 5px 15px #AAAAAA; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')}
#MathJax_ZoomOverlay {position: absolute; left: 0; top: 0; z-index: 300; display: inline-block; width: 100%; height: 100%; border: 0; padding: 0; margin: 0; background-color: white; opacity: 0; filter: alpha(opacity=0)}
#MathJax_ZoomFrame {position: relative; display: inline-block; height: 0; width: 0}
#MathJax_ZoomEventTrap {position: absolute; left: 0; top: 0; z-index: 302; display: inline-block; border: 0; padding: 0; margin: 0; background-color: white; opacity: 0; filter: alpha(opacity=0)}
</style>
<style type="text/css">
.MathJax_Preview {color: #888}
#MathJax_Message {position: fixed; left: 1px; bottom: 2px; background-color: #E6E6E6; border: 1px solid #959595; margin: 0px; padding: 2px 8px; z-index: 102; color: black; font-size: 80%; width: auto; white-space: nowrap}
#MathJax_MSIE_Frame {position: absolute; top: 0; left: 0; width: 0px; z-index: 101; border: 0px; margin: 0px; padding: 0px}
.MathJax_Error {color: #CC0000; font-style: italic}
</style>
<style type="text/css">
.MJXp-script {font-size: .8em}
.MJXp-right {-webkit-transform-origin: right; -moz-transform-origin: right; -ms-transform-origin: right; -o-transform-origin: right; transform-origin: right}
.MJXp-bold {font-weight: bold}
.MJXp-italic {font-style: italic}
.MJXp-scr {font-family: MathJax_Script,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-frak {font-family: MathJax_Fraktur,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-sf {font-family: MathJax_SansSerif,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-cal {font-family: MathJax_Caligraphic,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-mono {font-family: MathJax_Typewriter,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-largeop {font-size: 150%}
.MJXp-largeop.MJXp-int {vertical-align: -.2em}
.MJXp-math {display: inline-block; line-height: 1.2; text-indent: 0; font-family: 'Times New Roman',Times,STIXGeneral,serif; white-space: nowrap; border-collapse: collapse}
.MJXp-display {display: block; text-align: center; margin: 1em 0}
.MJXp-math span {display: inline-block}
.MJXp-box {display: block!important; text-align: center}
.MJXp-box:after {content: " "}
.MJXp-rule {display: block!important; margin-top: .1em}
.MJXp-char {display: block!important}
.MJXp-mo {margin: 0 .15em}
.MJXp-mfrac {margin: 0 .125em; vertical-align: .25em}
.MJXp-denom {display: inline-table!important; width: 100%}
.MJXp-denom > * {display: table-row!important}
.MJXp-surd {vertical-align: top}
.MJXp-surd > * {display: block!important}
.MJXp-script-box > * {display: table!important; height: 50%}
.MJXp-script-box > * > * {display: table-cell!important; vertical-align: top}
.MJXp-script-box > *:last-child > * {vertical-align: bottom}
.MJXp-script-box > * > * > * {display: block!important}
.MJXp-mphantom {visibility: hidden}
.MJXp-munderover {display: inline-table!important}
.MJXp-over {display: inline-block!important; text-align: center}
.MJXp-over > * {display: block!important}
.MJXp-munderover > * {display: table-row!important}
.MJXp-mtable {vertical-align: .25em; margin: 0 .125em}
.MJXp-mtable > * {display: inline-table!important; vertical-align: middle}
.MJXp-mtr {display: table-row!important}
.MJXp-mtd {display: table-cell!important; text-align: center; padding: .5em 0 0 .5em}
.MJXp-mtr > .MJXp-mtd:first-child {padding-left: 0}
.MJXp-mtr:first-child > .MJXp-mtd {padding-top: 0}
.MJXp-mlabeledtr {display: table-row!important}
.MJXp-mlabeledtr > .MJXp-mtd:first-child {padding-left: 0}
.MJXp-mlabeledtr:first-child > .MJXp-mtd {padding-top: 0}
.MJXp-merror {background-color: #FFFF88; color: #CC0000; border: 1px solid #CC0000; padding: 1px 3px; font-style: normal; font-size: 90%}
.MJXp-scale0 {-webkit-transform: scaleX(.0); -moz-transform: scaleX(.0); -ms-transform: scaleX(.0); -o-transform: scaleX(.0); transform: scaleX(.0)}
.MJXp-scale1 {-webkit-transform: scaleX(.1); -moz-transform: scaleX(.1); -ms-transform: scaleX(.1); -o-transform: scaleX(.1); transform: scaleX(.1)}
.MJXp-scale2 {-webkit-transform: scaleX(.2); -moz-transform: scaleX(.2); -ms-transform: scaleX(.2); -o-transform: scaleX(.2); transform: scaleX(.2)}
.MJXp-scale3 {-webkit-transform: scaleX(.3); -moz-transform: scaleX(.3); -ms-transform: scaleX(.3); -o-transform: scaleX(.3); transform: scaleX(.3)}
.MJXp-scale4 {-webkit-transform: scaleX(.4); -moz-transform: scaleX(.4); -ms-transform: scaleX(.4); -o-transform: scaleX(.4); transform: scaleX(.4)}
.MJXp-scale5 {-webkit-transform: scaleX(.5); -moz-transform: scaleX(.5); -ms-transform: scaleX(.5); -o-transform: scaleX(.5); transform: scaleX(.5)}
.MJXp-scale6 {-webkit-transform: scaleX(.6); -moz-transform: scaleX(.6); -ms-transform: scaleX(.6); -o-transform: scaleX(.6); transform: scaleX(.6)}
.MJXp-scale7 {-webkit-transform: scaleX(.7); -moz-transform: scaleX(.7); -ms-transform: scaleX(.7); -o-transform: scaleX(.7); transform: scaleX(.7)}
.MJXp-scale8 {-webkit-transform: scaleX(.8); -moz-transform: scaleX(.8); -ms-transform: scaleX(.8); -o-transform: scaleX(.8); transform: scaleX(.8)}
.MJXp-scale9 {-webkit-transform: scaleX(.9); -moz-transform: scaleX(.9); -ms-transform: scaleX(.9); -o-transform: scaleX(.9); transform: scaleX(.9)}
</style>
<meta name="description" content="This specification extends
the Media Capture and Streams specification [GETUSERMEDIA]
to allow a depth-only stream or combined depth+color
stream to be requested from the web platform using APIs familiar to
web authors.">
<link rel="canonical" href="https://www.w3.org/TR/mediacapture-depth/">
<style>
.hljs{display:block;overflow-x:auto;padding:.5em;color:#383a42;background:#fafafa}
.hljs-comment,.hljs-quote{color:#717277;font-style:italic}
.hljs-doctag,.hljs-formula,.hljs-keyword{color:#a626a4}
.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#ca4706;font-weight:700}
.hljs-literal{color:#0b76c5}
.hljs-addition,.hljs-attribute,.hljs-meta-string,.hljs-regexp,.hljs-string{color:#42803c}
.hljs-built_in,.hljs-class .hljs-title{color:#9a6a01}
.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#986801}
.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#336ae3}
.hljs-emphasis{font-style:italic}
.hljs-strong{font-weight:700}
.hljs-link{text-decoration:underline}
</style>
<style>
var{position:relative;cursor:pointer}
var[data-type]::after,var[data-type]::before{position:absolute;left:50%;top:-6px;opacity:0;transition:opacity .4s;pointer-events:none}
var[data-type]::before{content:"";transform:translateX(-50%);border-width:4px 6px 0 6px;border-style:solid;border-color:transparent;border-top-color:#000}
var[data-type]::after{content:attr(data-type);transform:translateX(-50%) translateY(-100%);background:#000;text-align:center;font-family:"Dank Mono","Fira Code",monospace;font-style:normal;padding:6px;border-radius:3px;color:#daca88;text-indent:0;font-weight:400}
var[data-type]:hover::after,var[data-type]:hover::before{opacity:1}
</style>
<script id="initialUserConfig" type="application/json">{
"publishDate": "2022-02-01",
"specStatus": "DISC",
"shortName": "mediacapture-depth",
"edDraftURI": "https://w3c.github.io/mediacapture-depth/",
"editors": [
{
"w3cid": "41974",
"name": "Anssi Kostiainen",
"company": "Intel",
"companyURL": "https://www.intel.com/"
},
{
"w3cid": "68202",
"name": "Ningxin Hu",
"company": "Intel",
"companyURL": "https://www.intel.com/"
},
{
"w3cid": "80407",
"name": "Rijubrata Bhaumik",
"company": "Intel",
"companyURL": "https://www.intel.com/"
},
{
"w3cid": "76096",
"name": "Rob Manson",
"company": "Invited Expert"
}
],
"formerEditors": [
{
"w3cid": "95320",
"name": "Aleksandar Stojiljkovic",
"company": "Intel",
"companyURL": "https://www.intel.com/"
}
],
"group": "webrtc",
"wgPublicList": "public-webrtc",
"github": "https://github.com/w3c/mediacapture-depth/",
"otherLinks": [
{
"key": "Participate",
"data": [
{
"value": "[email protected]",
"href": "https://lists.w3.org/Archives/Public/public-webrtc/"
}
]
},
{
"key": "Implementation status",
"data": [
{
"value": "Blink",
"href": "https://crbug.com/616098"
}
]
}
],
"localBiblio": {
"WEBGL2": {
"title": "WebGL 2 Specification",
"href": "https://www.khronos.org/registry/webgl/specs/2.0.0/",
"authors": [
"Dean Jackson (Apple Inc.)",
"Jeff Gilbert (Mozilla Corp.)"
],
"date": "1 December 2016",
"publisher": "Khronos",
"id": "webgl2"
},
"OpenGL ES 3.0.5": {
"title": "OpenGL ES 3.0.5 Specification",
"href": "http://www.khronos.org/registry/gles/specs/3.0/es_spec_3.0.5.pdf",
"authors": [
"Jon Leech",
"Benj Lipchak"
],
"date": "3 November 2016",
"publisher": "Khronos"
}
},
"publishISODate": "2022-02-01T00:00:00.000Z",
"generatedSubtitle": "Discontinued Draft 01 February 2022"
}</script>
<link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/2021/W3C-DISC"></head>
<body class="h-entry toc-inline" data-cite="WEBIDL"><div id="MathJax_Message" style="display: none;"></div><div class="head">
<a class="logo" href="https://www.w3.org/"><img crossorigin="" alt="W3C" src="https://www.w3.org/StyleSheets/TR/2021/logos/W3C" width="72" height="48">
</a> <h1 id="title" class="title">Media Capture Depth Stream Extensions</h1>
<p id="w3c-state"><a href="https://www.w3.org/standards/types#DISC">W3C Discontinued Draft</a> <time class="dt-published" datetime="2022-02-01">01 February 2022</time></p>
<details open="">
<summary>More details about this document</summary>
<dl>
<dt>This version:</dt><dd>
<a class="u-url" href="https://www.w3.org/TR/2022/DISC-mediacapture-depth-20220201/">https://www.w3.org/TR/2022/DISC-mediacapture-depth-20220201/</a>
</dd><dt>Latest published version:</dt><dd>
<a href="https://www.w3.org/TR/mediacapture-depth/">https://www.w3.org/TR/mediacapture-depth/</a>
</dd>
<dt>Latest editor's draft:</dt><dd><a href="https://w3c.github.io/mediacapture-depth/">https://w3c.github.io/mediacapture-depth/</a></dd>
<dt>History:</dt><dd>
<a href="https://www.w3.org/standards/history/mediacapture-depth">https://www.w3.org/standards/history/mediacapture-depth</a>
</dd><dd>
<a href="https://github.com/w3c/mediacapture-depth/commits/">Commit history</a>
</dd>
<dt>Editors:</dt>
<dd class="editor p-author h-card vcard" data-editor-id="41974">
<span class="p-name fn">Anssi Kostiainen</span> (<a class="p-org org h-org" href="https://www.intel.com/">Intel</a>)
</dd><dd class="editor p-author h-card vcard" data-editor-id="68202">
<span class="p-name fn">Ningxin Hu</span> (<a class="p-org org h-org" href="https://www.intel.com/">Intel</a>)
</dd><dd class="editor p-author h-card vcard" data-editor-id="80407">
<span class="p-name fn">Rijubrata Bhaumik</span> (<a class="p-org org h-org" href="https://www.intel.com/">Intel</a>)
</dd><dd class="editor p-author h-card vcard" data-editor-id="76096">
<span class="p-name fn">Rob Manson</span> (<span class="p-org org h-org">Invited Expert</span>)
</dd>
<dt>
Former editor:
</dt><dd class="editor p-author h-card vcard" data-editor-id="95320">
<span class="p-name fn">Aleksandar Stojiljkovic</span> (<a class="p-org org h-org" href="https://www.intel.com/">Intel</a>)
</dd>
<dt>Feedback:</dt><dd>
<a href="https://github.com/w3c/mediacapture-depth/">GitHub w3c/mediacapture-depth</a>
(<a href="https://github.com/w3c/mediacapture-depth/pulls/">pull requests</a>,
<a href="https://github.com/w3c/mediacapture-depth/issues/new/choose">new issue</a>,
<a href="https://github.com/w3c/mediacapture-depth/issues/">open issues</a>)
</dd><dd><a href="mailto:[email protected]?subject=%5Bmediacapture-depth%5D%20YOUR%20TOPIC%20HERE">[email protected]</a> with subject line <kbd>[mediacapture-depth] <em>… message topic …</em></kbd> (<a rel="discussion" href="https://lists.w3.org/Archives/Public/public-webrtc">archives</a>)</dd>
<dt>Participate</dt><dd>
<a href="https://lists.w3.org/Archives/Public/public-webrtc/">[email protected]</a>
</dd><dt>Implementation status</dt><dd>
<a href="https://crbug.com/616098">Blink</a>
</dd>
</dl>
</details>
<p class="copyright">
<a href="https://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a>
©
2022
<a href="https://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="https://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>,
<a href="https://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href="https://www.keio.ac.jp/">Keio</a>,
<a href="https://ev.buaa.edu.cn/">Beihang</a>). W3C
<a href="https://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
<a href="https://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and
<a rel="license" href="https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document" title="W3C Software and Document Notice and License">permissive document license</a> rules apply.
</p>
<hr title="Separator for header">
</div>
<section id="abstract" class="introductory"><h2 id="abstract-0">Abstract</h2><a class="self-link" href="#abstract" aria-label="Permalink for this Section"></a>
<p>
This specification <a href="https://w3c.github.io/mediacapture-main/#extensibility">extends</a>
the <em>Media Capture and Streams</em> specification [<cite><a class="bibref" data-link-type="biblio" href="#bib-getusermedia" title="Media Capture and Streams">GETUSERMEDIA</a></cite>]
to allow a <a href="#dfn-depth-only-stream" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-depth-only-stream-1">depth-only stream</a> or combined <a href="#dfn-depth-color-stream" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-depth-color-stream-1">depth+color
stream</a> to be requested from the web platform using APIs familiar to
web authors.
</p>
</section>
<section id="sotd" class="introductory"><h2 id="status-of-this-document">Status of This Document</h2><a class="self-link" href="#sotd" aria-label="Permalink for this Section"></a><p><em>This section describes the status of this
document at the time of its publication. 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="https://www.w3.org/TR/"><abbr title="World Wide Web Consortium">W3C</abbr> technical reports index</a> at
https://www.w3.org/TR/.</em></p>
<p>
This document was published by the <a href="https://www.w3.org/groups/wg/webrtc">Web Real-Time Communications Working Group</a> as
a Discontinued Draft using the
<a href="https://www.w3.org/2021/Process-20211102/#recs-and-notes">Recommendation track</a>.
</p><p>Publication as a Discontinued Draft implies that this document is no longer intended to advance or to be maintained. It is inappropriate to cite this document as other than abandoned work.
</p>
<p>The Working Group has decided to discontinue work on this specification due to lack of implementation momentum.</p>
<p>
This document was produced by a group
operating under the
<a href="https://www.w3.org/Consortium/Patent-Policy/"><abbr title="World Wide Web Consortium">W3C</abbr> Patent
Policy</a>.
<abbr title="World Wide Web Consortium">W3C</abbr> maintains a
<a rel="disclosure" href="https://www.w3.org/groups/wg/webrtc/ipr">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="https://www.w3.org/Consortium/Patent-Policy/#def-essential">Essential Claim(s)</a>
must disclose the information in accordance with
<a href="https://www.w3.org/Consortium/Patent-Policy/#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="https://www.w3.org/2021/Process-20211102/">2 November 2021 <abbr title="World Wide Web Consortium">W3C</abbr> Process Document</a>.
</p></section><nav id="toc"><h2 class="introductory" id="table-of-contents">Table of Contents</h2><ol class="toc"><li class="tocline"><a class="tocxref" href="#abstract">Abstract</a></li><li class="tocline"><a class="tocxref" href="#sotd">Status of This Document</a></li><li class="tocline"><a class="tocxref" href="#introduction"><bdi class="secno">1. </bdi>
Introduction
</a></li><li class="tocline"><a class="tocxref" href="#use-cases-and-requirements"><bdi class="secno">2. </bdi>
Use cases and requirements
</a></li><li class="tocline"><a class="tocxref" href="#conformance"><bdi class="secno">3. </bdi>Conformance</a></li><li class="tocline"><a class="tocxref" href="#dependencies"><bdi class="secno">4. </bdi>
Dependencies
</a></li><li class="tocline"><a class="tocxref" href="#terminology"><bdi class="secno">5. </bdi>
Terminology
</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#depth-map"><bdi class="secno">5.1 </bdi>
Depth map
</a></li></ol></li><li class="tocline"><a class="tocxref" href="#extensions"><bdi class="secno">6. </bdi>
Extensions
</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#mediatracksupportedconstraints-dictionary"><bdi class="secno">6.1 </bdi>
<span data-cite="!GETUSERMEDIA#idl-def-MediaTrackSupportedConstraints" data-link-type="idl" class="formerLink"><code>MediaTrackSupportedConstraints</code></span> dictionary
</a></li><li class="tocline"><a class="tocxref" href="#mediatrackcapabilities-dictionary"><bdi class="secno">6.2 </bdi>
<span data-cite="!GETUSERMEDIA#idl-def-MediaTrackCapabilities" data-link-type="idl" class="formerLink"><code>MediaTrackCapabilities</code></span> dictionary
</a></li><li class="tocline"><a class="tocxref" href="#mediatrackconstraintset-dictionary"><bdi class="secno">6.3 </bdi>
<code>MediaTrackConstraintSet</code> dictionary
</a></li><li class="tocline"><a class="tocxref" href="#mediatracksettings-dictionary"><bdi class="secno">6.4 </bdi>
<code>MediaTrackSettings</code> dictionary
</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#def-constraint-videoKind"><bdi class="secno">6.4.1 </bdi>
Video kind constrainable property
</a></li><li class="tocline"><a class="tocxref" href="#webgl-implementation-considerations"><bdi class="secno">6.4.2 </bdi>
WebGL implementation considerations
</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#upload-video-frame-to-webgl-texture"><bdi class="secno">6.4.2.1 </bdi>
Upload video frame to WebGL texture
</a></li><li class="tocline"><a class="tocxref" href="#read-the-data-from-a-webgl-texture"><bdi class="secno">6.4.2.2 </bdi>
Read the data from a WebGL texture
</a></li></ol></li></ol></li><li class="tocline"><a class="tocxref" href="#examples"><bdi class="secno">6.5 </bdi>
Examples
</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#playback-of-depth-and-color-streams-from-same-device-group"><bdi class="secno">6.5.1 </bdi>
Playback of depth and color streams from same device group.
</a></li><li class="tocline"><a class="tocxref" href="#webgl-upload-to-float-texture"><bdi class="secno">6.5.2 </bdi>
WebGL: <span>upload to float texture</span>
</a></li><li class="tocline"><a class="tocxref" href="#webgl-readpixels-from-float-texture"><bdi class="secno">6.5.3 </bdi>
WebGL: <span>readPixels from float</span> texture
</a></li></ol></li><li class="tocline"><a class="tocxref" href="#privacy-and-security-considerations"><bdi class="secno">6.6 </bdi>
Privacy and security considerations
</a></li><li class="tocline"><a class="tocxref" href="#acknowledgements"><bdi class="secno">6.7 </bdi>
Acknowledgements
</a></li></ol></li><li class="tocline"><a class="tocxref" href="#references"><bdi class="secno">A. </bdi>References</a><ol class="toc"><li class="tocline"><a class="tocxref" href="#normative-references"><bdi class="secno">A.1 </bdi>Normative references</a></li><li class="tocline"><a class="tocxref" href="#informative-references"><bdi class="secno">A.2 </bdi>Informative references</a></li></ol></li></ol></nav>
<section id="introduction"><h2 id="x1-introduction"><bdi class="secno">1. </bdi>
Introduction
</h2><a class="self-link" href="#introduction" aria-label="Permalink for Section 1."></a>
<p>
Depth cameras are increasingly being integrated into devices such as
phones, tablets, and laptops. Depth cameras provide a <a href="#dfn-depth-map" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-depth-map-1">depth map</a>,
which conveys the distance information between points on an object's
surface and the camera. With depth information, web content and
applications can be enhanced by, for example, the use of hand gestures
as an input mechanism, or by creating 3D models of real-world objects
that can interact and integrate with the web platform. Concrete
applications of this technology include more immersive gaming
experiences, more accessible 3D video conferences, and augmented
reality, to name a few.
</p>
<p>
To bring depth capability to the web platform, this specification
<a href="https://w3c.github.io/mediacapture-main/#extensibility">extends</a>
the <a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaStream"><code>MediaStream</code></a> interface [<cite><a class="bibref" data-link-type="biblio" href="#bib-getusermedia" title="Media Capture and Streams">GETUSERMEDIA</a></cite>] to enable it to also
contain depth-based <a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaStreamTrack"><code>MediaStreamTrack</code></a>s. A depth-based
<a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaStreamTrack"><code>MediaStreamTrack</code></a>, referred to as a <a href="#dfn-depth-stream-track" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-depth-stream-track-1">depth stream track</a>,
represents an abstraction of a stream of frames that can each be
converted to objects which contain an array of pixel data, where each
pixel represents the distance between the camera and the objects in the
scene for that point in the array. A <a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaStream"><code>MediaStream</code></a> object that
contains one or more <a href="#dfn-depth-stream-track" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-depth-stream-track-2">depth stream track</a>s is referred to as a
<a href="#dfn-depth-only-stream" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-depth-only-stream-2">depth-only stream</a> or <a href="#dfn-depth-color-stream" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-depth-color-stream-2">depth+color stream</a>.
</p>
</section>
<section id="use-cases-and-requirements"><h2 id="x2-use-cases-and-requirements"><bdi class="secno">2. </bdi>
Use cases and requirements
</h2><a class="self-link" href="#use-cases-and-requirements" aria-label="Permalink for Section 2."></a>
<p>
This specification attempts to address the <a href="https://www.w3.org/wiki/Media_Capture_Depth_Stream_Extension">Use
Cases and Requirements</a> for accessing depth stream from a depth
camera. See also the <a href="https://www.w3.org/wiki/Media_Capture_Depth_Stream_Extension#Examples">
Examples</a> section for concrete usage examples.
</p>
</section>
<section id="conformance"><h2 id="x3-conformance"><bdi class="secno">3. </bdi>Conformance</h2><a class="self-link" href="#conformance" aria-label="Permalink for Section 3."></a><p>As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.</p><p>
The key word <em class="rfc2119">MUST</em> in this document
is to be interpreted as described in
<a href="https://datatracker.ietf.org/doc/html/bcp14">BCP 14</a>
[<cite><a class="bibref" data-link-type="biblio" href="#bib-rfc2119" title="Key words for use in RFCs to Indicate Requirement Levels">RFC2119</a></cite>] [<cite><a class="bibref" data-link-type="biblio" href="#bib-rfc8174" title="Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words">RFC8174</a></cite>]
when, and only when, they appear in all capitals, as shown here.
</p>
<p>
This specification defines conformance criteria that apply to a single
product: the <dfn id="dfn-user-agent" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">user agent</dfn> that implements the interfaces that
it contains.
</p>
<p>
Implementations that use ECMAScript to implement the APIs defined in
this specification must implement them in a manner consistent with the
ECMAScript Bindings defined in the Web IDL specification [<cite><a class="bibref" data-link-type="biblio" href="#bib-webidl" title="Web IDL Standard">WEBIDL</a></cite>],
as this specification uses that specification and terminology.
</p>
</section>
<section id="dependencies"><h2 id="x4-dependencies"><bdi class="secno">4. </bdi>
Dependencies
</h2><a class="self-link" href="#dependencies" aria-label="Permalink for Section 4."></a>
<p>
The <dfn id="dfn-mediastreamtrack" class="externalDFN" data-no-export="" data-dfn-type="dfn"><a href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaStreamTrack"><code>MediaStreamTrack</code></a></dfn>
and <dfn id="dfn-mediastream" class="externalDFN" data-no-export="" data-dfn-type="dfn"><a href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaStream"><code>MediaStream</code></a></dfn>
interfaces this specification extends are defined in [<cite><a class="bibref" data-link-type="biblio" href="#bib-getusermedia" title="Media Capture and Streams">GETUSERMEDIA</a></cite>].
</p>
<p>
The concepts <dfn id="dfn-constraints" class="externalDFN" data-no-export="" data-dfn-type="dfn"><a href="https://www.w3.org/TR/mediacapture-streams/#dfn-constraints"><code>Constraints</code></a></dfn>,
<dfn id="dfn-capabilities" class="externalDFN" data-no-export="" data-dfn-type="dfn"><a href="https://www.w3.org/TR/mediacapture-streams/#dfn-capabilities"><code>Capabilities</code></a></dfn>,
<dfn id="dfn-constraintset" class="externalDFN" data-no-export="" data-dfn-type="dfn"><a href="https://www.w3.org/TR/mediacapture-streams/#idl-def-ConstraintSet"><code>ConstraintSet</code></a></dfn>,
and <dfn id="dfn-settings" class="externalDFN" data-no-export="" data-dfn-type="dfn"><a href="https://www.w3.org/TR/mediacapture-streams/#dfn-settings"><code>Settings</code></a></dfn>, and
<dfn id="dfn-types-of-constrainable-properties" class="externalDFN" data-no-export="" data-dfn-type="dfn"><a href="https://www.w3.org/TR/mediacapture-streams/#types-for-constrainable-properties">types
of constrainable properties</a></dfn> are defined in [<cite><a class="bibref" data-link-type="biblio" href="#bib-getusermedia" title="Media Capture and Streams">GETUSERMEDIA</a></cite>].
</p>
<p>
The <dfn id="dfn-constraindomstring" class="externalDFN" data-no-export="" data-dfn-type="dfn"><a href="https://www.w3.org/TR/mediacapture-streams/#idl-def-ConstrainDOMString"><code>ConstrainDOMString</code></a></dfn>
type is defined in [<cite><a class="bibref" data-link-type="biblio" href="#bib-getusermedia" title="Media Capture and Streams">GETUSERMEDIA</a></cite>].
</p>
<p>
<dfn id="dom-mediatracksettings" data-idl="dictionary" data-title="MediaTrackSettings" data-dfn-for="" class="externalDFN" data-no-export="" data-dfn-type="dfn"><a href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaTrackSettings"><code>MediaTrackSettings</code></a></dfn>,
<dfn id="dfn-mediatrackconstraints" class="externalDFN" data-no-export="" data-dfn-type="dfn"><a href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaTrackConstraints"><code>MediaTrackConstraints</code></a></dfn>,
<dfn id="dom-mediatracksupportedconstraints" data-idl="dictionary" data-title="MediaTrackSupportedConstraints" data-dfn-for="" class="externalDFN" data-no-export="" data-dfn-type="dfn"><a href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaTrackSupportedConstraints"><code>MediaTrackSupportedConstraints</code></a></dfn>,
<dfn id="dom-mediatrackcapabilities" data-idl="dictionary" data-title="MediaTrackCapabilities" data-dfn-for="" class="externalDFN" data-no-export="" data-dfn-type="dfn"><a href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaTrackCapabilities"><code>MediaTrackCapabilities</code></a></dfn>,
and <dfn id="dom-mediatrackconstraintset" data-idl="dictionary" data-title="MediaTrackConstraintSet" data-dfn-for="" class="externalDFN" data-no-export="" data-dfn-type="dfn"><a href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaTrackConstraintSet"><code>MediaTrackConstraintSet</code></a></dfn>
dictionaries this specification extends are defined in
[<cite><a class="bibref" data-link-type="biblio" href="#bib-getusermedia" title="Media Capture and Streams">GETUSERMEDIA</a></cite>].
</p>
<p>
The <dfn id="dfn-getusermedia" class="externalDFN" data-no-export="" data-dfn-type="dfn"><a href="https://www.w3.org/TR/mediacapture-streams/#dom-mediadevices-getusermedia"><code>getUserMedia()</code></a></dfn>
is defined in [<cite><a class="bibref" data-link-type="biblio" href="#bib-getusermedia" title="Media Capture and Streams">GETUSERMEDIA</a></cite>].
</p>
<p>
The concepts <dfn id="dfn-muted" class="externalDFN" data-no-export="" data-dfn-type="dfn"><a href="https://www.w3.org/TR/mediacapture-streams/#track-muted">muted</a></dfn> and
<dfn id="dfn-disabled" class="externalDFN" data-no-export="" data-dfn-type="dfn"><a href="https://www.w3.org/TR/mediacapture-streams/#track-enabled">disabled</a></dfn> as applied
to <a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaStreamTrack"><code>MediaStreamTrack</code></a> are defined in [<cite><a class="bibref" data-link-type="biblio" href="#bib-getusermedia" title="Media Capture and Streams">GETUSERMEDIA</a></cite>].
</p>
<p>
The terms <dfn id="dfn-source" class="externalDFN" data-no-export="" data-dfn-type="dfn"><a href="https://www.w3.org/TR/mediacapture-streams/#dfn-source">source</a></dfn> and
<dfn id="dfn-consumer" class="externalDFN" data-no-export="" data-dfn-type="dfn"><a href="https://www.w3.org/TR/mediacapture-streams/#dfn-consumer">consumer</a></dfn> are defined
in [<cite><a class="bibref" data-link-type="biblio" href="#bib-getusermedia" title="Media Capture and Streams">GETUSERMEDIA</a></cite>].
</p>
<p>
The <dfn id="dfn-mediadevicekind" class="externalDFN" data-no-export="" data-dfn-type="dfn"><a href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaDeviceKind"><code>MediaDeviceKind</code></a></dfn>
enumeration is defined in [<cite><a class="bibref" data-link-type="biblio" href="#bib-getusermedia" title="Media Capture and Streams">GETUSERMEDIA</a></cite>].
</p>
<p>
The <dfn id="dfn-video" class="externalDFN" data-no-export="" data-dfn-type="dfn"><a href="https://html.spec.whatwg.org/multipage/#the-video-element"><code>video</code></a></dfn>
element and <dfn id="dfn-canvas-pixel-arraybuffer" class="externalDFN" data-no-export="" data-dfn-type="dfn"><a href="https://html.spec.whatwg.org/multipage/#canvas-pixel-arraybuffer">Canvas
Pixel <code>ArrayBuffer</code></a></dfn> interfaces are defined in
[<cite><a class="bibref" data-link-type="biblio" href="#bib-html" title="HTML Standard">HTML</a></cite>].
</p>
<p>
The meaning of dictionary member being <dfn id="dfn-present" class="externalDFN" data-no-export="" data-dfn-type="dfn"><a href="https://webidl.spec.whatwg.org/#dfn-present">present</a></dfn> or <dfn id="dfn-not-present" class="externalDFN" data-no-export="" data-dfn-type="dfn"><a href="https://webidl.spec.whatwg.org/#dfn-present">not present</a></dfn> is defined in [<cite><a class="bibref" data-link-type="biblio" href="#bib-webidl" title="Web IDL Standard">WEBIDL</a></cite>].
</p>
</section>
<section id="terminology"><h2 id="x5-terminology"><bdi class="secno">5. </bdi>
Terminology
</h2><a class="self-link" href="#terminology" aria-label="Permalink for Section 5."></a>
<p>
The term <dfn id="dfn-depth-color-stream" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">depth+color stream</dfn> means a <a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaStream"><code>MediaStream</code></a>
object that contains one or more <a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaStreamTrack"><code>MediaStreamTrack</code></a> objects whose
<code>videoKind</code> of <code>Settings</code> is "<code>depth</code>"
(<a href="#dfn-depth-stream-track" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-depth-stream-track-3">depth stream track</a>) and one or more <a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaStreamTrack"><code>MediaStreamTrack</code></a>
objects whose <code>videoKind</code> of <code>Settings</code> is
"<code>color</code>" (<a href="#dfn-color-stream-track" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-color-stream-track-1">color stream track</a>).
</p>
<p>
The term <dfn id="dfn-depth-only-stream" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">depth-only stream</dfn> means a <a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaStream"><code>MediaStream</code></a> object
that contains one or more <a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaStreamTrack"><code>MediaStreamTrack</code></a> objects whose
<code>videoKind</code> of <code>Settings</code> is "<code>depth</code>"
(<a href="#dfn-depth-stream-track" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-depth-stream-track-4">depth stream track</a>) only.
</p>
<p>
The term <dfn id="dfn-color-only-stream" tabindex="0" aria-haspopup="dialog" class="respec-offending-element" title="Found definition for "color-only stream", but nothing links to it. This is usually a spec bug!" data-dfn-type="dfn">color-only stream</dfn> means a <a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaStream"><code>MediaStream</code></a> object
that contains one or more <a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaStreamTrack"><code>MediaStreamTrack</code></a> objects whose
<code>videoKind</code> of <code>Settings</code> is "<code>color</code>"
(<a href="#dfn-color-stream-track" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-color-stream-track-2">color stream track</a>) only, and optionally of kind
"<code>audio</code>".
</p>
<p>
The term <dfn id="dfn-depth-stream-track" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">depth stream track</dfn> means a <a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaStreamTrack"><code>MediaStreamTrack</code></a>
object whose <code>videoKind</code> of <code>Settings</code> is
"<code>depth</code>". It represents a media stream track whose
<a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#dfn-source">source</a> is a depth camera.
</p>
<p>
The term <dfn id="dfn-color-stream-track" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">color stream track</dfn> means a <a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaStreamTrack"><code>MediaStreamTrack</code></a>
object whose <code>videoKind</code> of <code>Settings</code> is
"<code>color</code>". It represents a media stream track whose
<a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#dfn-source">source</a> is a color camera.
</p>
<section id="depth-map"><h3 id="x5-1-depth-map"><bdi class="secno">5.1 </bdi>
Depth map
</h3><a class="self-link" href="#depth-map" aria-label="Permalink for Section 5.1"></a>
<p>
A <dfn id="dfn-depth-map" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">depth map</dfn> is an abstract representation of a frame of a
<a href="#dfn-depth-stream-track" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-depth-stream-track-5">depth stream track</a>. A <a href="#dfn-depth-map" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-depth-map-2">depth map</a> is a two-dimensional
array that contains information relating to the perpendicular
distance of the surfaces of scene objects to camera's <a href="#dfn-near-plane" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-near-plane-1">near
plane</a>. The numeric values in the <a href="#dfn-depth-map" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-depth-map-3">depth map</a> are referred to
as <dfn data-lt="depth map value|depth map values" id="dfn-depth-map-value" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">depth map values</dfn> and
represent distances to <a href="#dfn-near-plane" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-near-plane-2">near plane</a> <a href="#dfn-normalized" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-normalized-1">normalized</a> against
the distance between <a href="#dfn-far-plane" id="ref-for-dfn-far-plane-1">far</a> and <a href="#dfn-near-plane" id="ref-for-dfn-near-plane-3">near</a> plane.
</p>
<p>
<dfn id="dfn-normalized" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">Normalized</dfn> <a href="#dfn-depth-map-value" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-depth-map-value-1">depth map value</a> means that it's range is
from 0 to 1, where maximum <a href="#dfn-depth-map-value" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-depth-map-value-2">depth map value</a> of 1 corresponds to
distances equal to <a href="#dfn-far-plane" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-far-plane-2">far plane</a>. <a href="#dfn-normalized" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-normalized-2">Normalized</a> <a href="#dfn-depth-map-value" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-depth-map-value-3">depth map
value</a> is represented using <dfn id="dfn-floating-point" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">floating-point</dfn> or
<dfn id="dfn-unsigned-fixed-point" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">unsigned fixed-point</dfn> formats <a href="https://www.khronos.org/registry/gles/specs/3.0/es_spec_3.0.5.pdf#subsection.2.1.6">
[OpenGL ES 3.0.5]#subsection.2.1.6</a>.
</p>
<p>
<a href="#dfn-depth-map" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-depth-map-4">Depth map</a>'s <dfn id="dfn-near-plane" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">near plane</dfn> and <dfn id="dfn-far-plane" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">far plane</dfn> are
concepts of 3D graphics that define camera viewing volume (view
frustum). Their definition is outside the scope of this
specification.
</p>
</section>
</section>
<section id="extensions"><h2 id="x6-extensions"><bdi class="secno">6. </bdi>
Extensions
</h2><a class="self-link" href="#extensions" aria-label="Permalink for Section 6."></a>
<p>
If the implementation is unable to report the value represented by any
of the dictionary members, they are not <a data-link-type="dfn" href="https://webidl.spec.whatwg.org/#dfn-present">present</a> in the
dictionary.
</p>
<section id="mediatracksupportedconstraints-dictionary"><h3 id="x6-1-mediatracksupportedconstraints-dictionary"><bdi class="secno">6.1 </bdi>
<a data-link-type="idl" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaTrackSupportedConstraints"><code>MediaTrackSupportedConstraints</code></a> dictionary
</h3><a class="self-link" href="#mediatracksupportedconstraints-dictionary" aria-label="Permalink for Section 6.1"></a>
<p>
<a data-link-type="idl" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaTrackSupportedConstraints"><code>MediaTrackSupportedConstraints</code></a> dictionary represents the list
of <a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#dfn-constraints"><code>Constraints</code></a> recognized by a <a href="#dfn-user-agent" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-user-agent-1">user agent</a> for
controlling the <a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#dfn-capabilities"><code>Capabilities</code></a> of a <a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaStreamTrack"><code>MediaStreamTrack</code></a>
object.
</p>
<p>
Partial dictionary <a data-link-type="idl" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaTrackSupportedConstraints"><code>MediaTrackSupportedConstraints</code></a> extends the
original dictionary defined in [<cite><a class="bibref" data-link-type="biblio" href="#bib-getusermedia" title="Media Capture and Streams">GETUSERMEDIA</a></cite>]. The dictionary
value true represents an <a href="#dfn-applicable-constraint" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-applicable-constraint-1">applicable constraint</a>.
</p>
<p>
An <dfn id="dfn-applicable-constraint" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">applicable constraint</dfn> is not omitted by the <a href="#dfn-user-agent" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-user-agent-2">user
agent</a> in step 6.2.2 in the <a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#dom-mediadevices-getusermedia"><code>getUserMedia()</code></a> algorithm.
</p>
<pre class="idl def" id="webidl-289318473"><span class="idlHeader"><a class="self-link" href="#webidl-289318473">WebIDL</a></span><code><span data-idl="" class="idlDictionary" id="idl-def-mediatracksupportedconstraints-partial-1" data-title="MediaTrackSupportedConstraints">partial dictionary <a class="internalDFN idlID" data-link-type="dictionary" href="#dom-mediatracksupportedconstraints"><code>MediaTrackSupportedConstraints</code></a> {<span data-idl="" class="idlMember" id="idl-def-mediatracksupportedconstraints-videokind" data-title="videoKind" data-dfn-for="MediaTrackSupportedConstraints"><span class="idlType"><span class="idlSectionComment">
// Applies to both depth stream track and color stream track:
</span><a data-type="interface" href="https://webidl.spec.whatwg.org/#idl-boolean">boolean</a></span> <a class="internalDFN idlName" data-link-type="dict-member" href="#dom-mediatracksupportedconstraints-videokind" id="ref-for-dom-mediatracksupportedconstraints-videokind-1"><code>videoKind</code></a> = true;</span>
};</span></code></pre>
</section>
<section id="mediatrackcapabilities-dictionary"><h3 id="x6-2-mediatrackcapabilities-dictionary"><bdi class="secno">6.2 </bdi>
<a data-link-type="idl" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaTrackCapabilities"><code>MediaTrackCapabilities</code></a> dictionary
</h3><a class="self-link" href="#mediatrackcapabilities-dictionary" aria-label="Permalink for Section 6.2"></a>
<p>
<a data-link-type="idl" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaTrackCapabilities"><code>MediaTrackCapabilities</code></a> dictionary represents the
<a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#dfn-capabilities"><code>Capabilities</code></a> of a <a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaStreamTrack"><code>MediaStreamTrack</code></a> object.
</p>
<p>
Partial dictionary <a data-link-type="idl" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaTrackCapabilities"><code>MediaTrackCapabilities</code></a> extends the original
<a data-link-type="idl" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaTrackCapabilities"><code>MediaTrackCapabilities</code></a> dictionary defined in
[<cite><a class="bibref" data-link-type="biblio" href="#bib-getusermedia" title="Media Capture and Streams">GETUSERMEDIA</a></cite>].
</p>
<pre class="idl def" id="webidl-1788441543"><span class="idlHeader"><a class="self-link" href="#webidl-1788441543">WebIDL</a></span><code><span data-idl="" class="idlDictionary" id="idl-def-mediatrackcapabilities-partial-1" data-title="MediaTrackCapabilities">partial dictionary <a class="internalDFN idlID" data-link-type="dictionary" href="#dom-mediatrackcapabilities"><code>MediaTrackCapabilities</code></a> {<span data-idl="" class="idlMember" id="idl-def-mediatrackcapabilities-videokind" data-title="videoKind" data-dfn-for="MediaTrackCapabilities"><span class="idlType"><span class="idlSectionComment">
// Applies to both depth stream track and color stream track:
</span><a data-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString">DOMString</a></span> <a class="internalDFN idlName" data-link-type="dict-member" href="#dom-mediatrackcapabilities-videokind" id="ref-for-dom-mediatrackcapabilities-videokind-1"><code>videoKind</code></a>;</span>
};</span></code></pre>
</section>
<section id="mediatrackconstraintset-dictionary"><h3 id="x6-3-mediatrackconstraintset-dictionary"><bdi class="secno">6.3 </bdi>
<code>MediaTrackConstraintSet</code> dictionary
</h3><a class="self-link" href="#mediatrackconstraintset-dictionary" aria-label="Permalink for Section 6.3"></a>
<p>
<a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-ConstraintSet"><code>ConstraintSet</code></a> dictionary specifies each member's set of
<a href="#dfn-allowed-values" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-allowed-values-1">allowed values</a>.
</p>
<p>
The <dfn id="dfn-allowed-values" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">allowed values</dfn> for <a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-ConstrainDOMString"><code>ConstrainDOMString</code></a> type are
defined in [<cite><a class="bibref" data-link-type="biblio" href="#bib-getusermedia" title="Media Capture and Streams">GETUSERMEDIA</a></cite>].
</p>
<pre class="idl def" id="webidl-1637593537"><span class="idlHeader"><a class="self-link" href="#webidl-1637593537">WebIDL</a></span><code><span data-idl="" class="idlDictionary" id="idl-def-mediatrackconstraintset-partial-1" data-title="MediaTrackConstraintSet">partial dictionary <a class="internalDFN idlID" data-link-type="dictionary" href="#dom-mediatrackconstraintset"><code>MediaTrackConstraintSet</code></a> {<span data-idl="" class="idlMember" id="idl-def-mediatrackconstraintset-videokind" data-title="videoKind" data-dfn-for="MediaTrackConstraintSet"><span class="idlType"><span class="idlSectionComment">
// Applies to both depth stream track and color stream track:
</span><a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-ConstrainDOMString"><code>ConstrainDOMString</code></a></span> <a class="internalDFN idlName" data-link-type="dict-member" href="#dom-mediatrackconstraintset-videokind" id="ref-for-dom-mediatrackconstraintset-videokind-1"><code>videoKind</code></a>;</span>
};</span></code></pre>
</section>
<section id="mediatracksettings-dictionary"><h3 id="x6-4-mediatracksettings-dictionary"><bdi class="secno">6.4 </bdi>
<code>MediaTrackSettings</code> dictionary
</h3><a class="self-link" href="#mediatracksettings-dictionary" aria-label="Permalink for Section 6.4"></a>
<p>
<a data-link-type="idl" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaTrackSettings"><code>MediaTrackSettings</code></a> dictionary represents the <a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#dfn-settings"><code>Settings</code></a>
of a <a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaStreamTrack"><code>MediaStreamTrack</code></a> object.
</p>
<p>
Partial dictionary <a data-link-type="idl" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaTrackSettings"><code>MediaTrackSettings</code></a> extends the original
<a data-link-type="idl" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaTrackSettings"><code>MediaTrackSettings</code></a> dictionary.
</p>
<pre class="idl def" id="webidl-1569617356"><span class="idlHeader"><a class="self-link" href="#webidl-1569617356">WebIDL</a></span><code><span data-idl="" class="idlDictionary" id="idl-def-mediatracksettings-partial-1" data-title="MediaTrackSettings">partial dictionary <a class="internalDFN idlID" data-link-type="dictionary" href="#dom-mediatracksettings"><code>MediaTrackSettings</code></a> {<span data-idl="" class="idlMember" id="idl-def-mediatracksettings-videokind" data-title="videoKind" data-dfn-for="MediaTrackSettings"><span class="idlType"><span class="idlSectionComment">
// Applies to both depth stream track and color stream track:
</span><a data-type="interface" href="https://webidl.spec.whatwg.org/#idl-DOMString">DOMString</a></span> <a class="internalDFN idlName" data-link-type="dict-member" href="#dom-mediatracksettings-videokind" id="ref-for-dom-mediatracksettings-videokind-1"><code>videoKind</code></a>;</span>
};</span></code></pre>
<section id="def-constraint-videoKind"><h4 id="x6-4-1-video-kind-constrainable-property"><bdi class="secno">6.4.1 </bdi>
Video kind constrainable property
</h4><a class="self-link" href="#def-constraint-videoKind" aria-label="Permalink for Section 6.4.1"></a>
<p>
The <code>videoKind</code> constrainable property is defined to
apply to both <a href="#dfn-color-stream-track" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-color-stream-track-3">color stream track</a> and <a href="#dfn-depth-stream-track" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-depth-stream-track-6">depth stream
track</a>. The <code>videoKind</code> member specifies the
<dfn id="dfn-video-kind" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">video kind</dfn> of the <a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#dfn-source">source</a>.
</p>
<p class="related">
Related: <a data-link-type="idl" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaTrackSupportedConstraints"><code>MediaTrackSupportedConstraints</code></a>.<dfn data-dfn-for="MediaTrackSupportedConstraints" data-export="" data-dfn-type="dict-member" id="dom-mediatracksupportedconstraints-videokind" data-idl="field" data-title="videoKind" data-type="boolean" tabindex="0" aria-haspopup="dialog"><code>videoKind</code></dfn>,
<a data-link-type="idl" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaTrackCapabilities"><code>MediaTrackCapabilities</code></a>.<dfn data-dfn-for="MediaTrackCapabilities" data-export="" data-dfn-type="dict-member" id="dom-mediatrackcapabilities-videokind" data-idl="field" data-title="videoKind" data-type="DOMString" tabindex="0" aria-haspopup="dialog"><code>videoKind</code></dfn>,
<a data-link-type="idl" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaTrackConstraintSet"><code>MediaTrackConstraintSet</code></a>.<dfn data-dfn-for="MediaTrackConstraintSet" data-export="" data-dfn-type="dict-member" id="dom-mediatrackconstraintset-videokind" data-idl="field" data-title="videoKind" data-type="ConstrainDOMString" tabindex="0" aria-haspopup="dialog"><code>videoKind</code></dfn>,
<a data-link-type="idl" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaTrackSettings"><code>MediaTrackSettings</code></a>.<dfn data-dfn-for="MediaTrackSettings" data-export="" data-dfn-type="dict-member" id="dom-mediatracksettings-videokind" data-idl="field" data-title="videoKind" data-type="DOMString" tabindex="0" aria-haspopup="dialog"><code>videoKind</code></dfn>
</p>
<pre class="idl def" id="webidl-2119079806"><span class="idlHeader"><a class="self-link" href="#webidl-2119079806">WebIDL</a></span><code><span data-idl="" class="idlEnum" id="idl-def-videokindenum" data-title="VideoKindEnum">enum <a class="internalDFN idlID" data-link-type="enum" href="#dom-videokindenum" id="ref-for-dom-videokindenum-1"><code>VideoKindEnum</code></a> {
<span class="idlEnumItem">"<a class="internalDFN" data-link-type="enum-value" href="#dom-videokindenum-color" id="ref-for-dom-videokindenum-color-1"><code>color</code></a>"</span>,
<span class="idlEnumItem">"<a class="internalDFN" data-link-type="enum-value" href="#dom-videokindenum-depth" id="ref-for-dom-videokindenum-depth-1"><code>depth</code></a>"</span>
};</span></code></pre>
<p>
The <dfn data-export="" data-dfn-type="enum" id="dom-videokindenum" data-idl="enum" data-title="VideoKindEnum" data-dfn-for="" tabindex="0" aria-haspopup="dialog"><code>VideoKindEnum</code></dfn> enumeration defines the valid <a href="#dfn-video-kind" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-video-kind-1">video
kind</a>s: <dfn data-dfn-for="VideoKindEnum" data-export="" data-dfn-type="enum-value" id="dom-videokindenum-color" data-idl="enum-value" data-title="color" tabindex="0" aria-haspopup="dialog"><code>color</code></dfn> for
<a href="#dfn-color-stream-track" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-color-stream-track-4">color stream track</a> whose <a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#dfn-source">source</a> is a color camera,
and <dfn data-dfn-for="VideoKindEnum" data-export="" data-dfn-type="enum-value" id="dom-videokindenum-depth" data-idl="enum-value" data-title="depth" tabindex="0" aria-haspopup="dialog"><code>depth</code></dfn> for <a href="#dfn-depth-stream-track" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-depth-stream-track-7">depth
stream track</a> whose <a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#dfn-source">source</a> is a depth camera.
</p>
<p>
The <a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaStream"><code>MediaStream</code></a> <a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#dfn-consumer">consumer</a> for the <a href="#dfn-depth-only-stream" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-depth-only-stream-3">depth-only
stream</a> and <a href="#dfn-depth-color-stream" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-depth-color-stream-3">depth+color stream</a> is the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/#the-video-element"><code>video</code></a>
element [<cite><a class="bibref" data-link-type="biblio" href="#bib-html" title="HTML Standard">HTML</a></cite>].
</p>
<p>
If a <a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaStreamTrack"><code>MediaStreamTrack</code></a> whose <code>videoKind</code> is
<a href="#dom-videokindenum-depth" class="internalDFN" data-link-type="idl" id="ref-for-dom-videokindenum-depth-2"><code>depth</code></a> is <a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#track-muted">muted</a> or
<a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#track-enabled">disabled</a>, it <em class="rfc2119">MUST</em> render frames as if all the pixels would
be 0.
</p>
</section>
<section class="informative" id="webgl-implementation-considerations"><h4 id="x6-4-2-webgl-implementation-considerations"><bdi class="secno">6.4.2 </bdi>
WebGL implementation considerations
</h4><a class="self-link" href="#webgl-implementation-considerations" aria-label="Permalink for Section 6.4.2"></a><p><em>This section is non-normative.</em></p>
<div class="note" role="note" id="issue-container-generatedID"><div role="heading" class="note-title marker" id="h-note" aria-level="5"><span>Note</span></div><div class="">
This section is currently work in progress, and subject to change.
</div></div>
<p>
<a href="#dfn-depth-map" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-depth-map-5">Depth map</a> values that the camera produces are often in
16-bit <a href="#dfn-normalized" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-normalized-3">normalized</a> <a href="#dfn-unsigned-fixed-point" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-unsigned-fixed-point-1">unsigned fixed-point</a> format.
Application developer can access the data using <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/#canvas-pixel-arraybuffer">canvas pixel
arraybuffer</a> red color component, but that would cause a
precision loss given that it is in 8-bit <a href="#dfn-normalized" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-normalized-4">normalized</a>
<a href="#dfn-unsigned-fixed-point" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-unsigned-fixed-point-2">unsigned fixed-point</a> format.
</p>
<p>
The same precision loss is related to usage of [<cite><a class="bibref" data-link-type="biblio" href="#bib-webgl" title="WebGL 2.0 Specification">WEBGL</a></cite>]
<code>UNSIGNED_BYTE</code> textures. In order to access the full
precision, application developer <a href="#dfn-uploaded" id="ref-for-dfn-uploaded-1">can
use</a> [<cite><a class="bibref" data-link-type="biblio" href="#bib-webgl" title="WebGL 2.0 Specification">WEBGL</a></cite>] <a href="#dfn-floating-point" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-floating-point-1">floating-point</a> textures.
</p>
<p>
There are several use-cases which are a good fit to be, at least
partially, implemented on the GPU, such as motion recognition,
pattern recognition, background removal, as well as 3D point cloud.
</p>
<p>
This section explains which APIs can be used for some of these
mentioned use-cases; the concrete examples are provided in the
<a href="#examples">Examples</a> section.
</p>
<section id="upload-video-frame-to-webgl-texture"><h5 id="x6-4-2-1-upload-video-frame-to-webgl-texture"><bdi class="secno">6.4.2.1 </bdi>
Upload video frame to WebGL texture
</h5><a class="self-link" href="#upload-video-frame-to-webgl-texture" aria-label="Permalink for Section 6.4.2.1"></a>
<p>
A <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/#the-video-element"><code>video</code></a> element whose source is a <a data-link-type="dfn" href="https://www.w3.org/TR/mediacapture-streams/#idl-def-MediaStream"><code>MediaStream</code></a>
object containing a <a href="#dfn-depth-stream-track" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-depth-stream-track-8">depth stream track</a> may be
<dfn id="dfn-uploaded" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">uploaded</dfn> to a [<cite><a class="bibref" data-link-type="biblio" href="#bib-webgl" title="WebGL 2.0 Specification">WEBGL</a></cite>] texture of format
<code>RGBA</code> or <code>RED</code> and type
<code>FLOAT</code>. See the specification [<cite><a class="bibref" data-link-type="biblio" href="#bib-webgl" title="WebGL 2.0 Specification">WEBGL</a></cite>] and the
<a href="#dfn-upload-to-float-texture" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-upload-to-float-texture-1">upload to float texture</a> example code.
</p>
<p>
For each pixel of this WebGL texture, the R component represents
<a href="#dfn-normalized" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-normalized-5">normalized</a> <a href="#dfn-floating-point" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-floating-point-2">floating-point</a> <a href="#dfn-depth-map-value" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-depth-map-value-4">depth map value</a>.
</p>
</section>
<section id="read-the-data-from-a-webgl-texture"><h5 id="x6-4-2-2-read-the-data-from-a-webgl-texture"><bdi class="secno">6.4.2.2 </bdi>
Read the data from a WebGL texture
</h5><a class="self-link" href="#read-the-data-from-a-webgl-texture" aria-label="Permalink for Section 6.4.2.2"></a>
<p>
Here we list some of the possible approaches.
</p>
<ul>
<li>Synchronous readPixels usage requires the least amount of
code and it is available with WebGL 1.0. See the <a href="#dfn-readpixels-from-float" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-readpixels-from-float-1">readPixels
from float</a> example for further details.
</li>
<li>Using GetBufferSubData after WebGLSync's status signals that
readPixels (read to pixel buffer objects) or transform feedback
[<cite><a class="bibref" data-link-type="biblio" href="#bib-webgl2" title="WebGL 2 Specification">WEBGL2</a></cite>] is complete, enables asynchronous, non-blocking read
of depth data from GPU.
</li>
</ul>
</section>
</section>
</section>
<section class="informative" id="examples"><h3 id="x6-5-examples"><bdi class="secno">6.5 </bdi>
Examples
</h3><a class="self-link" href="#examples" aria-label="Permalink for Section 6.5"></a><p><em>This section is non-normative.</em></p>
<section id="playback-of-depth-and-color-streams-from-same-device-group"><h4 id="x6-5-1-playback-of-depth-and-color-streams-from-same-device-group"><bdi class="secno">6.5.1 </bdi>
Playback of depth and color streams from same device group.
</h4><a class="self-link" href="#playback-of-depth-and-color-streams-from-same-device-group" aria-label="Permalink for Section 6.5.1"></a>
<div class="example" id="example-1">
<div class="marker">
<a class="self-link" href="#example-1">Example<bdi> 1</bdi></a>
</div> <pre aria-busy="false"><code class="hljs javascript">navigator.mediaDevices.getUserMedia({
<span class="hljs-attr">video</span>: {<span class="hljs-attr">videoKind</span>: {<span class="hljs-attr">exact</span>: <span class="hljs-string">"color"</span>}, <span class="hljs-attr">groupId</span>: {<span class="hljs-attr">exact</span>: id}}
}).then(<span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">stream</span>) </span>{
<span class="hljs-comment">// Wire the media stream into a <video> element for playback.</span>
<span class="hljs-comment">// The RGB video is rendered.</span>
<span class="hljs-keyword">var</span> video = <span class="hljs-built_in">document</span>.querySelector(<span class="hljs-string">'#video'</span>);
video.srcObject = stream;
video.play();
}
);
navigator.mediaDevices.getUserMedia({
<span class="hljs-attr">video</span>: {<span class="hljs-attr">videoKind</span>: {<span class="hljs-attr">exact</span>: <span class="hljs-string">"depth"</span>}, <span class="hljs-attr">groupId</span>: {<span class="hljs-attr">exact</span>: id}}
}).then(<span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">stream</span>) </span>{
<span class="hljs-comment">// Wire the depth-only stream into another <video> element for playback.</span>
<span class="hljs-comment">// The depth information is rendered in its grayscale representation.</span>
<span class="hljs-keyword">var</span> depthVideo = <span class="hljs-built_in">document</span>.querySelector(<span class="hljs-string">'#depthVideo'</span>);
depthVideo.srcObject = stream;
depthVideo.play();
}
);</code></pre>
</div>
</section><section id="webgl-upload-to-float-texture"><h4 id="x6-5-2-webgl-upload-to-float-texture"><bdi class="secno">6.5.2 </bdi>
WebGL: <dfn id="dfn-upload-to-float-texture" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">upload to float texture</dfn>
</h4><a class="self-link" href="#webgl-upload-to-float-texture" aria-label="Permalink for Section 6.5.2"></a>
<p>
This code sets up a video element from a depth stream, uploads it to
a WebGL 2.0 float texture.
</p>
<div class="example" id="example-2">
<div class="marker">
<a class="self-link" href="#example-2">Example<bdi> 2</bdi></a>
</div> <pre aria-busy="false"><code class="hljs javascript">navigator.mediaDevices.getUserMedia({
<span class="hljs-attr">video</span>: {<span class="hljs-attr">videoKind</span>: {<span class="hljs-attr">exact</span>: <span class="hljs-string">"depth"</span>}}
}).then(<span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">stream</span>) </span>{
<span class="hljs-comment">// wire the stream into a <video> element for playback</span>
<span class="hljs-keyword">var</span> depthVideo = <span class="hljs-built_in">document</span>.querySelector(<span class="hljs-string">'#depthVideo'</span>);
depthVideo.srcObject = stream;
depthVideo.play();
}).catch(<span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">reason</span>) </span>{
<span class="hljs-comment">// handle gUM error here</span>
});
<span class="hljs-keyword">let</span> gl = canvas.getContext(<span class="hljs-string">"webgl2"</span>);
<span class="hljs-comment">// Activate the standard WebGL 2.0 extension for using single component R32F</span>
<span class="hljs-comment">// texture format.</span>
gl.getExtension(<span class="hljs-string">'EXT_color_buffer_float'</span>);
<span class="hljs-comment">// Later, in the rendering loop ...</span>
gl.bindTexture(gl.TEXTURE_2D, depthTexture);
gl.texImage2D(
gl.TEXTURE_2D,
<span class="hljs-number">0</span>,
gl.R32F,
gl.RED,
gl.FLOAT,
depthVideo);</code></pre>
</div>
</section><section id="webgl-readpixels-from-float-texture"><h4 id="x6-5-3-webgl-readpixels-from-float-texture"><bdi class="secno">6.5.3 </bdi>
WebGL: <dfn id="dfn-readpixels-from-float" tabindex="0" aria-haspopup="dialog" data-dfn-type="dfn">readPixels from float</dfn> texture
</h4><a class="self-link" href="#webgl-readpixels-from-float-texture" aria-label="Permalink for Section 6.5.3"></a>
<p>
This example extends <a href="#dfn-upload-to-float-texture" class="internalDFN" data-link-type="dfn" id="ref-for-dfn-upload-to-float-texture-2">upload to float texture</a> example.
</p>
<p>
This code creates the texture to which we will upload the depth video
frame. Then, it sets up a named framebuffer, attach the texture as
color attachment and, after uploading the depth video to the texture,
reads the texture content to Float32Array.
</p>
<div class="example" id="example-3">
<div class="marker">
<a class="self-link" href="#example-3">Example<bdi> 3</bdi></a>
</div> <pre aria-busy="false"><code class="hljs javascript"><span class="hljs-comment">// Initialize texture and framebuffer for reading back the texture.</span>
<span class="hljs-keyword">let</span> depthTexture = gl.createTexture();
gl.bindTexture(gl.TEXTURE_2D, depthTexture);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
<span class="hljs-keyword">let</span> framebuffer = gl.createFramebuffer();
gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);
gl.framebufferTexture2D(