取消定时切换
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3m57s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3m57s
This commit is contained in:
parent
4d14ff72c2
commit
5c407a52a4
@ -1,3 +1,3 @@
|
||||
{
|
||||
"currentSceneIndex": 2
|
||||
"currentSceneIndex": 0
|
||||
}
|
||||
30
server.js
30
server.js
@ -319,21 +319,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);
|
||||
// }
|
||||
});
|
||||
|
||||
// 处理通话开始
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user