File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -124,15 +124,6 @@ senderStreams.readable
124
124
<pre >
125
125
let pc = new RTCPeerConnection({forceEncodedVideoInsertableStreams: true});
126
126
pc.ontrack = e => {
127
- let receivers = pc.getReceivers();
128
- let videoReceiver = null;
129
- for (const r of receivers) {
130
- if (r.track.kind == 'video')
131
- videoReceiver = r;
132
- }
133
- if (!videoReceiver)
134
- return;
135
-
136
127
let receiverTransform = new TransformStream({
137
128
start() {},
138
129
flush() {},
@@ -154,7 +145,7 @@ pc.ontrack = e => {
154
145
},
155
146
});
156
147
157
- let receiverStreams = videoReceiver .createEncodedVideoStreams();
148
+ let receiverStreams = e.receiver .createEncodedVideoStreams();
158
149
receiverStreams.readable
159
150
.pipeThrough(receiverTransform)
160
151
.pipeTo(receiverStreams.writable);
You can’t perform that action at this time.
0 commit comments