优化一起听被控端

This commit is contained in:
mtvpls
2026-05-28 00:06:13 +08:00
parent 6b85c4464d
commit c942c8c9ea
7 changed files with 238 additions and 98 deletions
+5
View File
@@ -575,6 +575,11 @@ export class WatchRoomServer {
this.rooms.forEach((room, roomId) => {
const timeSinceHeartbeat = now - room.lastOwnerHeartbeat;
const isScreenSharing = room.currentState?.type === 'screen' && room.currentState.status === 'sharing';
if (isScreenSharing) {
return;
}
// 如果房主心跳超过30秒,清除播放状态
if (timeSinceHeartbeat > clearStateTimeout && room.currentState !== null) {