Browse Source

视频聊天功能-开发中

master
xie.bx 3 years ago
parent
commit
ba8f507168
  1. 30
      im-ui/src/components/chat/ChatPrivateVideo.vue

30
im-ui/src/components/chat/ChatPrivateVideo.vue

@ -49,10 +49,27 @@
candidates: [], candidates: [],
configuration: { configuration: {
iceServers: [{ iceServers: [{
'url': 'turn:www.boxim.online:3478', 'url': 'turn:www.boxim.online:3478',
'credential': 'admin123', 'credential': 'admin123',
'username': 'admin' 'username': 'admin'
}] },
{
url: 'stun:stun.l.google.com:19302'
},
{
url: 'stun:stun.anyfirewall.com:3478'
},
{
url: 'turn:turn.bistri.com:80',
credential: 'homeo',
username: 'homeo'
},
{
url: 'turn:turn.anyfirewall.com:443?transport=tcp',
credential: 'webrtc',
username: 'webrtc'
}
]
} }
} }
}, },
@ -134,7 +151,10 @@
this.peerConnection.addTrack(track, stream); this.peerConnection.addTrack(track, stream);
}); });
} }
this.peerConnection.IceConnectionStateChange this.peerConnection.oniceconnectionstatechange = function(event) {
console.log("ICE connection status changed : " + event.target.iceConnectionState)
};
}, },
handleMessage(msg) { handleMessage(msg) {
if (msg.type == this.$enums.MESSAGE_TYPE.RTC_ACCEPT) { if (msg.type == this.$enums.MESSAGE_TYPE.RTC_ACCEPT) {

Loading…
Cancel
Save