From 9b73252f62b873229e1f36a13b489138151bd61d Mon Sep 17 00:00:00 2001 From: Nikita Konev Date: Wed, 25 Dec 2024 04:07:32 +0300 Subject: [PATCH] deprioritize local tracks on presenter --- frontend/src/ChatVideo.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/frontend/src/ChatVideo.vue b/frontend/src/ChatVideo.vue index c0c5cb8a8..78184101d 100644 --- a/frontend/src/ChatVideo.vue +++ b/frontend/src/ChatVideo.vue @@ -235,13 +235,18 @@ export default { if (!pub) { return -1 } + for (const t of this.room.localParticipant.getTrackPublications().values()) { + if (t.trackSid === pub.trackSid) { + return 0 + } + } switch (pub.source) { case "camera": - return isSpeaking ? 2 : 1; + return isSpeaking ? 3 : 2; case "screen_share": - return 3 + return 4 default: - return 0 + return 1 } }, // TODO pin to presenter an element from UserVideo