mirror of
https://github.com/Shik3i/KoalaSync.git
synced 2026-09-02 22:17:55 +00:00
fix: suppress video heartbeat PEER_STATUS when alone in room
This commit is contained in:
@@ -1664,7 +1664,8 @@ async function handleAsyncMessage(message, sender, sendResponse) {
|
|||||||
markRoomUseful();
|
markRoomUseful();
|
||||||
getSettings().then(settings => {
|
getSettings().then(settings => {
|
||||||
const statusPayload = { ...message.payload, peerId, username: settings.username, tabTitle: currentTabTitle };
|
const statusPayload = { ...message.payload, peerId, username: settings.username, tabTitle: currentTabTitle };
|
||||||
emit(EVENTS.PEER_STATUS, statusPayload);
|
const otherCount = currentRoom && Array.isArray(currentRoom.peers) ? currentRoom.peers.filter(p => (typeof p === 'object' ? p.peerId : p) !== peerId).length : 0;
|
||||||
|
if (otherCount > 0) emit(EVENTS.PEER_STATUS, statusPayload);
|
||||||
|
|
||||||
if (currentRoom && Array.isArray(currentRoom.peers)) {
|
if (currentRoom && Array.isArray(currentRoom.peers)) {
|
||||||
const me = currentRoom.peers.find(p => (p.peerId || p) === peerId);
|
const me = currentRoom.peers.find(p => (p.peerId || p) === peerId);
|
||||||
|
|||||||
Reference in New Issue
Block a user