diff --git a/server.js b/server.js index c975b8a..302de30 100644 --- a/server.js +++ b/server.js @@ -329,21 +329,21 @@ io.on('connection', (socket) => { }); // 如果是交互类型,设置定时器回到默认视频 - if (type === 'text' || type === 'voice') { - setTimeout(() => { - console.log(`交互超时,用户 ${socket.id} 回到默认视频`); - if (client) { - client.currentVideo = getDefaultVideo(); - client.isInInteraction = false; - } - // 广播回到默认视频的指令 - io.emit('video-stream-switched', { - videoFile: getDefaultVideo(), - type: 'default', - from: socket.id - }); - }, INTERACTION_TIMEOUT); - } + // if (type === 'text' || type === 'voice') { + // setTimeout(() => { + // console.log(`交互超时,用户 ${socket.id} 回到默认视频`); + // if (client) { + // client.currentVideo = getDefaultVideo(); + // client.isInInteraction = false; + // } + // // 广播回到默认视频的指令 + // io.emit('video-stream-switched', { + // videoFile: getDefaultVideo(), + // type: 'default', + // from: socket.id + // }); + // }, INTERACTION_TIMEOUT); + // } }); // 处理通话开始