@@ -23,6 +23,24 @@ spec: WEBRTC; urlPrefix: https://w3c.github.io/webrtc-pc/
23
23
24
24
# Introduction
25
25
26
+ The [[WEBRTC-NV-USE-CASES]] document describes several functions that
27
+ can only be achieved by access to media (requirements N20-N22),
28
+ including, but not limited to:
29
+ * Funny Hats
30
+ * Machine Learning
31
+ * Virtual Reality Gaming
32
+ These use cases further require that processing can be done in worker
33
+ threads (requirement N23-N24).
34
+
35
+ Furthermore, the "trusted JavaScript cloud conferencing" use case
36
+ requires such processing to be done on encoded media, not just the raw
37
+ media.
38
+
39
+ This specification gives an interface that builds on [[WEB-CODECS]] to
40
+ provide access to such functionality while retaining the setup flow of
41
+ RTCPeerConnection.
42
+
43
+
26
44
# IDL specification
27
45
28
46
The Streams definition doesn't use WebIDL much, but the WebRTC spec does.
@@ -37,3 +55,33 @@ partial dictionary RTCConfiguration {
37
55
DecoderDecorator decoderFactory;
38
56
};
39
57
</pre>
58
+
59
+ ## Additional operation
60
+ At creation of an RTCPeerConnection, the following steps are added to
61
+ the creation algorithm:
62
+
63
+ * Let the RTCPeerConnection object have two internal slots
64
+ [[\EncoderFactory]] and [[\DecoderFactory]] , initialized to null.
65
+ * If the RTCConfiguration parameter contains a value for
66
+ "encoderFactory", store that in [[\EncoderFactory]] .
67
+ * If the RTCConfiguration parameter contains a value for
68
+ "decoderFactory", store that in [[\DecoderFactory]] .
69
+
70
+ At the time when a codec is initialized as part of the encoder, run
71
+ the following steps:
72
+
73
+ * If [[\EncoderFactory]] is null,
74
+
75
+ # Privacy and security considerations
76
+
77
+ This API gives Javascript access to the content of media streams. This
78
+ is also available from other sources, such as Canvas and WebAudio.
79
+
80
+ However, streams that are isolated (as specified in
81
+ [[WEBRTC-IDENTITY]] ) or tainted with another origin, cannot be
82
+ accessed using this API, since that would break the isolation rule.
83
+
84
+
85
+ # Examples
86
+
87
+
0 commit comments