ov-components: Add method to set video track elements pinned state by source

master
Carlos Santos 2025-09-08 12:07:55 +02:00
parent 5cf8a32190
commit 03962d21df
1 changed files with 13 additions and 0 deletions

View File

@ -507,6 +507,19 @@ export class ParticipantModel {
}
}
/**
* Sets all video track elements from a specific source to pinned or unpinned given a boolean value
* @param source The source of the track to be pinned or unpinned (e.g., 'camera', 'screenShare').
* @param pinned
* @internal
*/
setVideoPinnedBySource(source: Track.Source, pinned: boolean) {
this.tracks
.filter((track) => track.source === source && track.kind === Track.Kind.Video)
.forEach((track) => (track.isPinned = pinned));
}
/**
* Toggle the minimized status of a video track element
* @param trackSid