import { Room } from "./room"; import { Connection } from "./connection"; import { AddRemoveTracks, ConferenceType, CreatedRoom, InternalMessage, ParticipantRole, RoomExtendedConfig, UserId, UserNickname, WaitingRoomUpdate } from "./constants"; import { PrefixFunction } from "./logger"; import { RTCMetricsServerDescription } from "@flashphoner/web-sdk-metrics"; export declare class RoomExtended extends Room { #private; constructor(connection: Connection, id: string, owner: string, name: string, pin: string, userId: UserId, nickname: UserNickname, creationTime: number, config: RoomExtendedConfig, waitingRoomEnabled: boolean, loggerPrefix?: PrefixFunction, conferenceType?: ConferenceType, webRTCMetricsServerDescription?: RTCMetricsServerDescription); config(): RoomExtendedConfig; waitingRoomEnabled(): boolean; createRoom(): Promise; /** * Sending control message inside the room * * Recipients will receive {@link RoomEvent.CONTROL_MESSAGE} with {@link ControlMessageEvent} * * @param broadcast - sending for all room participants, if true * @param to - sending for user. Should use with broadcast = false */ sendControlMessage(msg: string, broadcast: boolean, to?: UserId): Promise; /** * Authorize or fail authorization for user from waiting List * * Room owner will receive {@link RoomEvent.WAITING_LIST} with {@link WaitingListEvent} * * If authorized = true - user will join to the room and other participants will receive {@link RoomEvent.JOINED} with {@link JoinedRoom}. * If authorized = false - user will receive error {@link RoomError.AUTHORIZATION_FAILED} */ authorizeWaitingList(userId: UserId, authorized: boolean): Promise; /** * Move user to waiting room * * User will receive {@link RoomEvent.DETACHED}. * Other participants will receive {@link RoomEvent.LEFT} with {@link LeftRoom} * * Room owner will receive {@link RoomEvent.WAITING_LIST} with {@link WaitingListEvent} */ moveToWaitingRoom(userId: UserId): Promise; /** * Configure waiting room * * Waiting room configuration, on/off switch for now * * Waiting room must be empty * * @param enabled - flag indicates whether it's enabled or not */ configureWaitingRoom(enabled: boolean): Promise; /** * Assign role * * Used to transfer the role. The room owner will have the {@link ParticipantRole.PARTICIPANT} role. * * Participants will receive {@link RoomEvent.ROLE_ASSIGNED} with {@link RoleAssigned} * * New owner will receive {@link RoomEvent.PARTICIPANT_CONFIG} with {@link ParticipantConfigEvent} for each participant. * The previous owner will receive {@link RoomEvent.PARTICIPANT_CONFIG} with {@link ParticipantConfigEvent}. */ assignRole(userId: UserId, role: ParticipantRole): Promise; /** * Reclaim owner rights * * Participants will receive {@link RoomEvent.ROLE_ASSIGNED} with {@link RoleAssigned} */ reclaimOwnerRights(): Promise; /** * Subscribe to waiting participant * * Used to check waiting participant's tracks. * * Subscriber will receive {@link RoomEvent.ADD_TRACKS} with {@link AddRemoveTracks} */ subscribeToWaitingParticipant(userId: UserId): Promise; /** * Unsubscribe from waiting participant * * Subscriber will receive {@link RoomEvent.REMOVE_TRACKS} with {@link AddRemoveTracks} */ unsubscribeFromWaitingParticipant(userId: UserId): Promise; /** * Set room lock * * Participants will receive {@link RoomEvent.ROOM_LOCKED} with boolean value */ setLock(locked: boolean): Promise; /** * Set room initial audio muted * * Participants will receive {@link RoomEvent.ROOM_INITIAL_AUDIO_MUTED} with boolean value * * Waiting participants will receive {@link RoomEvent.STOP_TRACK} with {@link StopTrackEvent} */ setInitialAudioMuted(muted: boolean): Promise; /** * Set room initial video muted * * Participants will receive {@link RoomEvent.ROOM_INITIAL_VIDEO_MUTED} with boolean value * * Waiting participants will receive {@link RoomEvent.STOP_TRACK} with {@link StopTrackEvent} */ setInitialVideoMuted(muted: boolean): Promise; /** * Set room initial screen sharing muted */ setInitialScreenSharingMuted(muted: boolean): Promise; /** * Set room audio muted * * Participants will receive {@link RoomEvent.ROOM_AUDIO_MUTED} with boolean value and {@link RoomEvent.PARTICIPANT_CONFIG} with {@link ParticipantConfigEvent} */ setAudioMuted(muted: boolean): Promise; /** * Set room audio muted * * Participants will receive {@link RoomEvent.ROOM_VIDEO_MUTED} with boolean value and {@link RoomEvent.PARTICIPANT_CONFIG} with {@link ParticipantConfigEvent} */ setVideoMuted(muted: boolean): Promise; /** * Set room screen sharing muted * * Participants will receive {@link RoomEvent.ROOM_SCREEN_SHARING_MUTED} with boolean value. * * Participants that started screen sharing will receive {@link RoomEvent.STOP_SCREEN_SHARING} with {@link StopScreenSharingEvent} * * All participants will receive {@link RoomEvent.PARTICIPANT_CONFIG} with {@link ParticipantConfigEvent} and {@link RoomEvent.PARTICIPANT_SCREEN_SHARING_MUTED} with boolean value. */ setScreenSharingMuted(muted: boolean): Promise; /** * Set room chat muted * * Participants will receive {@link RoomEvent.ROOM_CHAT_MUTED} with boolean value and {@link RoomEvent.PARTICIPANT_CONFIG} with {@link ParticipantConfigEvent} * * Chat receive policy will be {@link ChatReceivePolicy.EVERYONE} or {@link ChatReceivePolicy.NOBODY}. * * Chat members will receive {@link SfuEvent.CHAT_UPDATED} with {@link UpdateChatEvent} */ setChatMuted(muted: boolean): Promise; /** * Set room can change nickname * * Participants will receive {@link RoomEvent.ROOM_CAN_CHANGE_NICKNAME} with boolean value. */ setCanChangeNickname(canChange: boolean): Promise; /** * Set room screen sharing multiple shares * * Participants will receive {@link RoomEvent.SCREEN_SHARING_CONFIG} with {@link RoomScreenSharingConfigEvent} * * @param multipleShares - if false, participants with screen sharing will receive {@link RoomEvent.STOP_SCREEN_SHARING} with {@link StopScreenSharingEvent} */ setScreenSharingMultipleShares(multipleShares: boolean): Promise; /** * Set room screen sharing everyone can share * * Participants will receive {@link RoomEvent.SCREEN_SHARING_CONFIG} with {@link RoomScreenSharingConfigEvent} */ setScreenSharingEveryoneCanShare(everyoneCanShare: boolean): Promise; /** * Set room screen sharing everyone can do subsequent share * * Participants will receive {@link RoomEvent.SCREEN_SHARING_CONFIG} with {@link RoomScreenSharingConfigEvent} * * @param canDoSubsequentShare - if false, participants with screen sharing will receive {@link RoomEvent.STOP_SCREEN_SHARING} with {@link StopScreenSharingEvent} */ setScreenSharingEveryoneCanDoSubsequentShare(canDoSubsequentShare: boolean): Promise; /** * Set participant's audio muted * * Participant will receive {@link RoomEvent.PARTICIPANT_AUDIO_MUTED} with {@link ParticipantAVSMutedEvent} */ setParticipantAudioMuted(userId: UserId, muted: boolean): Promise; /** * Set participant's video muted * * Participant will receive {@link RoomEvent.PARTICIPANT_VIDEO_MUTED} with {@link ParticipantAVSMutedEvent} */ setParticipantVideoMuted(userId: UserId, muted: boolean): Promise; /** * Set participant's screen sharing muted * * Participant will receive {@link RoomEvent.PARTICIPANT_SCREEN_SHARING_MUTED} with {@link ParticipantAVSMutedEvent} */ setParticipantScreenSharingMuted(userId: UserId, muted: boolean): Promise; /** * Turn off participant's screen sharing * * Participant(s) will receive {@link RoomEvent.STOP_SCREEN_SHARING} with {@link StopScreenSharingEvent} */ turnOffParticipantScreenSharing(userId?: UserId, reason?: string): Promise; startRecord(): Promise; stopRecord(): Promise; processEvent(e: InternalMessage): Promise; owner(): string; conferenceType(): ConferenceType; }