diff --git a/app/utils/rxjs/RxjsPeer.client.ts b/app/utils/rxjs/RxjsPeer.client.ts index dc1179cd..fe1a59e2 100644 --- a/app/utils/rxjs/RxjsPeer.client.ts +++ b/app/utils/rxjs/RxjsPeer.client.ts @@ -60,8 +60,9 @@ export class RxjsPeer { let peerConnection: RTCPeerConnection const setup = () => { peerConnection?.close() - peerConnection = createPeerConnection({ + peerConnection = new RTCPeerConnection({ iceServers: config.iceServers, + bundlePolicy: 'max-bundle', }) peerConnection.addEventListener('connectionstatechange', () => { if ( @@ -526,17 +527,6 @@ export class RxjsPeer { } } -function createPeerConnection( - configuration: RTCConfiguration = { - iceServers: [{ urls: 'stun:stun.cloudflare.com:3478' }], - bundlePolicy: 'max-bundle', - } -) { - const pc = new RTCPeerConnection(configuration) - - return pc -} - async function resolveTrack( peerConnection: RTCPeerConnection, compare: (t: RTCRtpTransceiver) => boolean,