Skip to content

Commit 03f3983

Browse files
authored
Update README.md
1 parent 4439250 commit 03f3983

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ import { WHIPClient } from "whip.js"
1212
const stream = await navigator.mediaDevices.getUserMedia({audio:true, video:true});
1313
1414
//Create peerconnection
15-
const pc = new RTCPeerConnection();
15+
const pc = new RTCPeerConnection({ bundlePolicy: "max-bundle" });
1616
1717
//Send all tracks
1818
for (const track of stream.getTracks()) {
1919
//You could add simulcast too here
20-
pc.addTrack(track);
20+
pc.addTrack(track, { 'direction': 'sendonly' });
2121
}
2222
2323
//Create whip client
@@ -40,7 +40,7 @@ WHEP client javascript module
4040
import { WHEPClient } from "whep.js"
4141
4242
//Create peerconnection
43-
const pc = window.pc = new RTCPeerConnection();
43+
const pc = window.pc = new RTCPeerConnection({ bundlePolicy: "max-bundle" });
4444
4545
//Add recv only transceivers
4646
pc.addTransceiver("audio");

0 commit comments

Comments
 (0)