This commit is contained in:
2023-10-03 21:11:13 +08:00
parent 6800b44e49
commit ab2e3e93da
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ export default class ClientList {
//console.log('取得在线对端列表:', data) //console.log('取得在线对端列表:', data)
const { webrtc, channels } = await webrtc_init() const { webrtc, channels } = await webrtc_init()
//console.log('发送给对方 offer') //console.log('发送给对方 offer')
const offer = await webrtc.createOffer({ offerToReceiveAudio: true, offerToReceiveVideo: true }) const offer = await webrtc.createOffer()
await webrtc.setLocalDescription(offer) await webrtc.setLocalDescription(offer)
this.clientlist.push({ id: data.id, name: data.name, webrtc, channels }) this.clientlist.push({ id: data.id, name: data.name, webrtc, channels })
websocket.send(JSON.stringify({ type: 'offer', id: data.id, offer })) websocket.send(JSON.stringify({ type: 'offer', id: data.id, offer }))