Skip to content

Commit 5aed804

Browse files
committed
e2ee: remove encodedInsertableStreams flag
which is no longer required since early 2024: https://issues.chromium.org/issues/40943169#comment21
1 parent aedb2ce commit 5aed804

File tree

2 files changed

+7
-16
lines changed

2 files changed

+7
-16
lines changed

src/content/insertable-streams/endtoend-encryption/js/videopipe.js

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,8 @@
2222
'use strict';
2323

2424
function VideoPipe(stream, forceSend, forceReceive, handler) {
25-
this.pc1 = new RTCPeerConnection({
26-
encodedInsertableStreams: forceSend,
27-
});
28-
this.pc2 = new RTCPeerConnection({
29-
encodedInsertableStreams: forceReceive,
30-
});
25+
this.pc1 = new RTCPeerConnection();
26+
this.pc2 = new RTCPeerConnection();
3127
this.pc2.ontrack = handler;
3228
stream.getTracks().forEach((track) => this.pc1.addTrack(track, stream));
3329
}
@@ -37,13 +33,10 @@ VideoPipe.prototype.negotiate = async function() {
3733
this.pc2.onicecandidate = e => this.pc1.addIceCandidate(e.candidate);
3834

3935
const offer = await this.pc1.createOffer();
40-
// Disable video/red to allow for easier inspection in Wireshark.
41-
await this.pc2.setRemoteDescription({type: 'offer', sdp: offer.sdp.replace('red/90000', 'green/90000')});
42-
await this.pc1.setLocalDescription(offer);
43-
44-
const answer = await this.pc2.createAnswer();
45-
await this.pc1.setRemoteDescription(answer);
46-
await this.pc2.setLocalDescription(answer);
36+
await this.pc1.setLocalDescription();
37+
await this.pc2.setRemoteDescription(this.pc1.localDescription);
38+
await this.pc2.setLocalDescription();
39+
await this.pc1.setRemoteDescription(this.pc2.localDescription);
4740
};
4841

4942
VideoPipe.prototype.close = function() {

src/content/insertable-streams/video-analyzer/js/main.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,7 @@ async function call() {
104104
pc1 = new RTCPeerConnection();
105105
console.log('Created local peer connection object pc1');
106106
pc1.addEventListener('icecandidate', e => onIceCandidate(pc1, e));
107-
pc2 = new RTCPeerConnection({
108-
encodedInsertableStreams: true,
109-
});
107+
pc2 = new RTCPeerConnection();
110108
console.log('Created remote peer connection object pc2');
111109
pc2.addEventListener('icecandidate', e => onIceCandidate(pc2, e));
112110
pc1.addEventListener('iceconnectionstatechange', e => onIceStateChange(pc1, e));

0 commit comments

Comments
 (0)