From 3558944c3fa6ee42347ecfd2b8b8cdb621c10b0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9A=D1=80=D1=83?= =?UTF-8?q?=D0=B3=D0=BB=D0=B8=D1=86=D0=BA=D0=B8=D0=B9?= Date: Wed, 1 Oct 2025 22:58:15 +0600 Subject: [PATCH] #3 update --- client/app/composables/use-mediasoup.ts | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/client/app/composables/use-mediasoup.ts b/client/app/composables/use-mediasoup.ts index 8ad0e1e..d478e23 100644 --- a/client/app/composables/use-mediasoup.ts +++ b/client/app/composables/use-mediasoup.ts @@ -3,6 +3,19 @@ import { createGlobalState } from '@vueuse/core' import * as mediasoupClient from 'mediasoup-client' import { io } from 'socket.io-client' +const ICE_SERVERS: RTCIceServer[] = [ + { urls: 'stun:stun.l.google.com:19302' }, + { urls: 'stun:stun.l.google.com:5349' }, + { urls: 'stun:stun1.l.google.com:3478' }, + { urls: 'stun:stun1.l.google.com:5349' }, + { urls: 'stun:stun2.l.google.com:19302' }, + { urls: 'stun:stun2.l.google.com:5349' }, + { urls: 'stun:stun3.l.google.com:3478' }, + { urls: 'stun:stun3.l.google.com:5349' }, + { urls: 'stun:stun4.l.google.com:19302' }, + { urls: 'stun:stun4.l.google.com:5349' }, +] + export const useMediasoup = createGlobalState(() => { const socket: Socket = io('https://api.koptilnya.xyz', { path: '/chad/ws/', @@ -46,7 +59,7 @@ export const useMediasoup = createGlobalState(() => { sendTransport = device.createSendTransport({ ...params, iceServers: [ - { urls: 'stun:stun.sipnet.ru:3478' }, + ...ICE_SERVERS, ...(params.iceServers ?? []), ], }) @@ -92,7 +105,7 @@ export const useMediasoup = createGlobalState(() => { recvTransport = device.createRecvTransport({ ...params, iceServers: [ - { urls: 'stun:stun.sipnet.ru:3478' }, + ...ICE_SERVERS, ...(params.iceServers ?? []), ], })