typings: update OpenViduMeetPermissions to remove canPublishScreen and organize comments

This commit is contained in:
juancarmore 2025-07-10 00:28:54 +02:00
parent 299e6b0e75
commit 2e623fe24e
2 changed files with 61 additions and 67 deletions

View File

@ -1,85 +1,85 @@
const enum TrackSource { export const enum TrackSource {
/** /**
* @generated from enum value: UNKNOWN = 0; * @generated from enum value: UNKNOWN = 0;
*/ */
UNKNOWN = 0, UNKNOWN = 0,
/** /**
* @generated from enum value: CAMERA = 1; * @generated from enum value: CAMERA = 1;
*/ */
CAMERA = 1, CAMERA = 1,
/** /**
* @generated from enum value: MICROPHONE = 2; * @generated from enum value: MICROPHONE = 2;
*/ */
MICROPHONE = 2, MICROPHONE = 2,
/** /**
* @generated from enum value: SCREEN_SHARE = 3; * @generated from enum value: SCREEN_SHARE = 3;
*/ */
SCREEN_SHARE = 3, SCREEN_SHARE = 3,
/** /**
* @generated from enum value: SCREEN_SHARE_AUDIO = 4; * @generated from enum value: SCREEN_SHARE_AUDIO = 4;
*/ */
SCREEN_SHARE_AUDIO = 4, SCREEN_SHARE_AUDIO = 4
} }
interface VideoGrant { interface VideoGrant {
/** permission to create a room */ /** permission to create a room */
roomCreate?: boolean; roomCreate?: boolean;
/** permission to join a room as a participant, room must be set */ /** permission to join a room as a participant, room must be set */
roomJoin?: boolean; roomJoin?: boolean;
/** permission to list rooms */ /** permission to list rooms */
roomList?: boolean; roomList?: boolean;
/** permission to start a recording */ /** permission to start a recording */
roomRecord?: boolean; roomRecord?: boolean;
/** permission to control a specific room, room must be set */ /** permission to control a specific room, room must be set */
roomAdmin?: boolean; roomAdmin?: boolean;
/** name of the room, must be set for admin or join permissions */ /** name of the room, must be set for admin or join permissions */
room?: string; room?: string;
/** permissions to control ingress, not specific to any room or ingress */ /** permissions to control ingress, not specific to any room or ingress */
ingressAdmin?: boolean; ingressAdmin?: boolean;
/** /**
* allow participant to publish. If neither canPublish or canSubscribe is set, * allow participant to publish. If neither canPublish or canSubscribe is set,
* both publish and subscribe are enabled * both publish and subscribe are enabled
*/ */
canPublish?: boolean; canPublish?: boolean;
/** /**
* TrackSource types that the participant is allowed to publish * TrackSource types that the participant is allowed to publish
* When set, it supersedes CanPublish. Only sources explicitly set here can be published * When set, it supersedes CanPublish. Only sources explicitly set here can be published
*/ */
canPublishSources?: TrackSource[]; canPublishSources?: TrackSource[];
/** allow participant to subscribe to other tracks */ /** allow participant to subscribe to other tracks */
canSubscribe?: boolean; canSubscribe?: boolean;
/** /**
* allow participants to publish data, defaults to true if not set * allow participants to publish data, defaults to true if not set
*/ */
canPublishData?: boolean; canPublishData?: boolean;
/** /**
* by default, a participant is not allowed to update its own metadata * by default, a participant is not allowed to update its own metadata
*/ */
canUpdateOwnMetadata?: boolean; canUpdateOwnMetadata?: boolean;
/** participant isn't visible to others */ /** participant isn't visible to others */
hidden?: boolean; hidden?: boolean;
/** participant is recording the room, when set, allows room to indicate it's being recorded */ /** participant is recording the room, when set, allows room to indicate it's being recorded */
recorder?: boolean; recorder?: boolean;
/** participant allowed to connect to LiveKit as Agent Framework worker */ /** participant allowed to connect to LiveKit as Agent Framework worker */
agent?: boolean; agent?: boolean;
} }
/** /**

View File

@ -2,14 +2,8 @@
* Defines OpenVidu-specific permissions for a participant. * Defines OpenVidu-specific permissions for a participant.
*/ */
export interface OpenViduMeetPermissions { export interface OpenViduMeetPermissions {
canPublishScreen: boolean; // Can publish screen sharing.
// Permissions for recording
canRecord: boolean; // Can start/stop recording the room. canRecord: boolean; // Can start/stop recording the room.
// Permissions for chat
canChat: boolean; // Can send chat messages in the room. canChat: boolean; // Can send chat messages in the room.
canChangeVirtualBackground: boolean; // Can change the virtual background. canChangeVirtualBackground: boolean; // Can change the virtual background.
} }