|
|
@@ -62,6 +62,7 @@ function close(err?: string) {
|
|
|
// 初始化rtc
|
|
|
function initRTC() {
|
|
|
try {
|
|
|
+ console.log('start RTC')
|
|
|
Peer.value = new RTCPeerConnection({
|
|
|
iceServers,
|
|
|
bundlePolicy: 'max-bundle'
|
|
|
@@ -102,9 +103,9 @@ function initRTC() {
|
|
|
sendContrlData()
|
|
|
}
|
|
|
}
|
|
|
- console.log('rtc 初始化成功')
|
|
|
+ console.log('RTC SUCCESS')
|
|
|
} catch (error) {
|
|
|
- close('webrtc初始化失败')
|
|
|
+ close('RTC 初始化失败')
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -134,6 +135,7 @@ function sendAudio(blob: Blob) {
|
|
|
function titleEvent(type: string) {
|
|
|
if (type === 'maxWin') winMaxOrMin.value = !winMaxOrMin.value
|
|
|
if (type === 'loginOut') {
|
|
|
+ console.log('mqtt close')
|
|
|
close()
|
|
|
} else {
|
|
|
window.$electron?.send(type, winMaxOrMin.value)
|
|
|
@@ -144,7 +146,7 @@ function titleEvent(type: string) {
|
|
|
window.$electron.on('message', async (msg: any) => {
|
|
|
switch (msg.type) {
|
|
|
case 'connect':
|
|
|
- console.log('mqtt connected start rtc')
|
|
|
+ console.log('mqtt connected')
|
|
|
isLogin.value = true
|
|
|
showLoading.value = true
|
|
|
initRTC()
|