取消定时切换
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3m57s

This commit is contained in:
宋居成 2025-08-12 12:12:16 +08:00
parent 4d14ff72c2
commit 5c407a52a4
2 changed files with 16 additions and 16 deletions

View File

@ -1,3 +1,3 @@
{ {
"currentSceneIndex": 2 "currentSceneIndex": 0
} }

View File

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