mirror of https://github.com/OpenVidu/openvidu.git
ov-components: add isPinned getter to determine if participant's video is fixed in UI
parent
f300788c1e
commit
ff492a1f22
|
|
@ -1,4 +1,3 @@
|
|||
import { DeviceType } from './device.model';
|
||||
import {
|
||||
AudioCaptureOptions,
|
||||
DataPublishOptions,
|
||||
|
|
@ -11,9 +10,9 @@ import {
|
|||
Track,
|
||||
TrackPublication,
|
||||
TrackPublishOptions,
|
||||
VideoCaptureOptions,
|
||||
VideoPresets
|
||||
VideoCaptureOptions
|
||||
} from 'livekit-client';
|
||||
import { DeviceType } from './device.model';
|
||||
|
||||
export interface ParticipantLeftEvent {
|
||||
roomName: string;
|
||||
|
|
@ -508,6 +507,15 @@ export class ParticipantModel {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets whether this participant is pinned.
|
||||
* This indicates that the participant's video is fixed in place in the UI.
|
||||
* @returns boolean
|
||||
*/
|
||||
get isPinned(): boolean {
|
||||
return this.tracks.some((track) => track.isPinned);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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').
|
||||
|
|
|
|||
Loading…
Reference in New Issue