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 {
|
import {
|
||||||
AudioCaptureOptions,
|
AudioCaptureOptions,
|
||||||
DataPublishOptions,
|
DataPublishOptions,
|
||||||
|
|
@ -11,9 +10,9 @@ import {
|
||||||
Track,
|
Track,
|
||||||
TrackPublication,
|
TrackPublication,
|
||||||
TrackPublishOptions,
|
TrackPublishOptions,
|
||||||
VideoCaptureOptions,
|
VideoCaptureOptions
|
||||||
VideoPresets
|
|
||||||
} from 'livekit-client';
|
} from 'livekit-client';
|
||||||
|
import { DeviceType } from './device.model';
|
||||||
|
|
||||||
export interface ParticipantLeftEvent {
|
export interface ParticipantLeftEvent {
|
||||||
roomName: string;
|
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
|
* 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 source The source of the track to be pinned or unpinned (e.g., 'camera', 'screenShare').
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue