轮询播放,去掉超时处理
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 2m53s

This commit is contained in:
Song367 2025-08-12 12:10:13 +08:00
parent 9a1bd0acfd
commit e0ee7606a0

View File

@ -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);
// }
});
// 处理通话开始