This commit is contained in:
parent
45acafb06c
commit
3558944c3f
@ -3,6 +3,19 @@ import { createGlobalState } from '@vueuse/core'
|
|||||||
import * as mediasoupClient from 'mediasoup-client'
|
import * as mediasoupClient from 'mediasoup-client'
|
||||||
import { io } from 'socket.io-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(() => {
|
export const useMediasoup = createGlobalState(() => {
|
||||||
const socket: Socket = io('https://api.koptilnya.xyz', {
|
const socket: Socket = io('https://api.koptilnya.xyz', {
|
||||||
path: '/chad/ws/',
|
path: '/chad/ws/',
|
||||||
@ -46,7 +59,7 @@ export const useMediasoup = createGlobalState(() => {
|
|||||||
sendTransport = device.createSendTransport({
|
sendTransport = device.createSendTransport({
|
||||||
...params,
|
...params,
|
||||||
iceServers: [
|
iceServers: [
|
||||||
{ urls: 'stun:stun.sipnet.ru:3478' },
|
...ICE_SERVERS,
|
||||||
...(params.iceServers ?? []),
|
...(params.iceServers ?? []),
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
@ -92,7 +105,7 @@ export const useMediasoup = createGlobalState(() => {
|
|||||||
recvTransport = device.createRecvTransport({
|
recvTransport = device.createRecvTransport({
|
||||||
...params,
|
...params,
|
||||||
iceServers: [
|
iceServers: [
|
||||||
{ urls: 'stun:stun.sipnet.ru:3478' },
|
...ICE_SERVERS,
|
||||||
...(params.iceServers ?? []),
|
...(params.iceServers ?? []),
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user