/** @module Webinar */ import { Subject, Subscription } from "rxjs"; import { Contact } from '../models/contact.model'; import { RBEvent } from '../models/event.model'; import { Bubble } from '../models/bubble.model'; import { JingleSession } from "../libs/strophe/strophe.jingle.session"; /** * Webinar status */ export declare enum WebinarStatus { UPCOMING = "upcoming", WAITING_ROOM = "waitingRoom", PRACTICE_ROOM = "practiceRoom", PRACTICE_WAITING_ROOM = "practiceWaitingRoom", IN_PROGRESS = "inProgress", TERMINATED = "terminated" } export declare enum WebinarSessionParticipantMedia { AUDIO = "audio", VIDEO = "video", SHARING = "sharing" } export declare enum WebinarMediaType { participant = "participant", sharing = "sharing", mix = "mix" } export interface WebinarCodecs { audio?: string; video?: string; sharing?: string; } export declare enum WebinarSessionParticipantEvents { UPDATE_PARTICIPANT = "updateParticipant", UPDATE_MEDIA = "updateMedia", UPDATE_ORIGINAL_STREAM = "updateOriginalStream", MUTE_PARTICIPANT = "muteParticipant", ACTIVE_SPEAKER = "activeSpeaker" } export interface WebinarSessionParticipantMedias { audio: boolean; video: boolean; sharing: boolean; } export interface WebinarSessionParticipantAvailableStreams { audioVideo: boolean; sharing: boolean; } export declare enum WebinarSessionParticipantType { USER = "USER", MCUBOT = "MCUBOT" } export declare class WebinarSessionParticipant { id: string; type: WebinarSessionParticipantType; contact: Contact; activeSpeaker: boolean; mute: boolean; muteSFU: boolean; muteMCU: boolean; onStage: boolean; sharingOnStage: boolean; trackedBackstage: boolean; searchString: string; role: string; raiseHand: boolean; raiseHandDate?: Date; raiseHandPosition?: number; allowedToTalk: boolean; invitedToGoOnStage?: any; audioConfig: string; audible: boolean; audioVideoSessionId?: string; audioVideoSession: JingleSession; originalAudioVideoStream: MediaStream; audioVideoStream?: MediaStream; mcuAudioSessionId?: string; mcuAudioStream?: MediaStream; sharingSessionId?: string; sharingSession: JingleSession; sharingStream?: MediaStream; medias: WebinarSessionParticipantMedias; availableStreams: WebinarSessionParticipantAvailableStreams; rxSubject: Subject; subStreamLevel: number; temporalLevel: number; nameAndEmail?: string; company?: string; private contactService?; static create(id: string): WebinarSessionParticipant; constructor(id: string); sendEvent(event: WebinarSessionParticipantEvents, data?: any): void; /** * Subscribe to events on the WebinarSessionParticipant (all events are of RBEvent type); * @param handler - The call-back function that will be subscribed to the RxJS subject * @param eventNames - a list of event names that the user wants to receive when subscribing (used a filter) */ subscribe(handler: (event: RBEvent) => any, eventNames?: WebinarSessionParticipantEvents | WebinarSessionParticipantEvents[], debounce?: number): Subscription; getSessionType(sessionId: string): string | null; onHold(media: 'video' | 'sharing'): boolean; isLocalParticipant(): boolean; setMedia(media: WebinarSessionParticipantMedia, value: boolean, clean?: boolean): void; toString(): string; } export declare class WebinarSessionService { id: string; type: string; sid?: string; audioVideoSession?: JingleSession; audioVideoStream?: MediaStream; static create(id: string, name: string): WebinarSessionService; constructor(id: string, type: string); } export declare class WebinarSession { jingleJid: string; activeSpeakerId: string; localParticipant: WebinarSessionParticipant; speakerParticipants: WebinarSessionParticipant[]; attendeeParticipants: WebinarSessionParticipant[]; mcuAudioSession?: any; raiseHandAttendeeParticipants: WebinarSessionParticipant[]; raiseHandSpeakers: WebinarSessionParticipant[]; service?: WebinarSessionService; connected: boolean; masterMedia: string; showMySharing: boolean; static create(): WebinarSession; getParticipantById(participantId: string): WebinarSessionParticipant; getParticipantBySession(session: JingleSession): WebinarSessionParticipant | undefined; getSpeakerBySessionId(sessionId: string): WebinarSessionParticipant; addOrUpdateParticipant(participant: WebinarSessionParticipant, action?: string): void; removeParticipant(participantId: string): void; addService(serviceId: string, serviceName: string): WebinarSessionService; } export declare class WebinarParticipant { email: string; lastName: string; firstName: string; company: string; jobTitle: string; state: string; userId: string; lastAvatarUpdateDate: string; country: string; static create(): WebinarParticipant; static createFromData(data: any): WebinarParticipant; getData(): string; } export declare class WebinarCSVStatus { errorDetails: string; okCount: number; errorCount: number; errorReport: any; static create(): WebinarCSVStatus; } export declare class WebinarCloneParams { /** * Cloned webinar name * If not specified, the former name will be used */ name?: string; /** * Cloned webinar subject * If not specified, the former subject will be used */ subject?: string; /** clone webinar start date */ startDate?: Date; /** clone webinar end date */ endDate?: Date; /** clone webinar timeZone */ timeZone?: string; /** clone or not the speakers even if some of them declined the previous invitation */ cloneSpeakers: boolean; /** param cloneAttendees - clone or not the attendees */ cloneAttendees: boolean; /** clone webinar waiting room start date */ waitingRoomStartDate?: string; /** licence profile identifier */ profileId: string; } /** * @eventProperty * `Webinar` specific events */ export declare enum WebinarEvents { /** * @eventProperty * This RBEvent is send when the webinar status change */ ON_STATUS_CHANGE = "ON_STATUS_CHANGE", /** * @eventProperty * This RBEvent is send when */ ON_DATA_UPDATE = "ON_DATA_UPDATED", /** * @eventProperty * This RBEvent is send when */ ON_AVATAR_UPDATE = "ON_AVATAR_UPDATE", /** * @eventProperty * This RBEvent is send when */ ON_LOGO_UPDATE = "ON_LOGO_UPDATE", /** * @eventProperty * This RBEvent is send when */ ON_CHAT_OPTIONS_UPDATE = "ON_CHAT_OPTIONS_UPDATE", /** * @eventProperty * This RBEvent is send when the number of raiseHand change */ ON_RAISEHAND_CHANGE = "ON_RAISEHAND_CHANGE" } /** * Represents a webinar with various properties and methods for managing its lifecycle, * participants, media, and other related functionalities. */ export interface Webinar { id: string; name: string; subject: string; webinarStartDate: string; webinarEndDate: string; webinarDuration: string; webinarLastDateCheck: string; waitingRoomStartDate: string; timeZone: string; roomId: string; roomModeratorsChatId: string; room: Bubble; practiceRoom: Bubble; organizers: any[]; speakers: any[]; participants: WebinarParticipant[]; profileId: string; pendingParticipantNumber: number; acceptedParticipantNumber: number; rejectedParticipantNumber: number; color: string; creatorId: string; creatorCompanyId: string; isCreator: boolean; isOrganizer: boolean; isSpeaker: boolean; isAttendee: boolean; isGuestAttendee: boolean; isGuest: boolean; isMCUBOT: boolean; password: string; approvalRegistrationMethod: string; registrationUuid: string; published: boolean; moderatorsNotified: boolean; status: WebinarStatus; webinarUrl: string; rxSubject: Subject; rxParticipantsSubject: Subject; rxServiceSubject: Subject; rxInfoSubject: Subject; isWebinarSync: boolean; session: WebinarSession | null; waitingRoomMultimediaURLs: string[]; stageBackground: string; reminderDates: string[]; subtitlesEnable: boolean; blur: boolean; bgReplaceUrl: string; chatOption: string; chatOptionExpired: boolean; chatOptionTimer: any; recorded?: string; hideRecordInfo: boolean; recordFileId: string; recordStatus: string; action: string; lastAvatarUpdate?: string; lastActorsInfo?: any; incomingStreamsDisabled: any; sendEvent(name: WebinarEvents, data?: any): void; subscribe(handler: any): Subscription; subscribe2(handler: (event: RBEvent) => any, eventNames?: WebinarEvents | WebinarEvents[]): Subscription; updateAttendeeCounters(): void; getData(): string; updateRaiseHandParticipants(): void; isTerminated(): boolean; isWaitingRoomStarted(): boolean; isInvitation(): boolean; /** * Asynchronous method to clone a webinar * @param params - The webinar parameters to clone */ clone(params: WebinarCloneParams): Promise; /** * Asynchronous method to update webinar avatar on server * @param avatarImg - base64 encoded webinar avatar */ updateAvatar(avatarImg?: string): Promise; /** * Asynchronous method to update webinar logo on server * @param logoSrc - base64 encoded webinar logo */ updateLogo(logoSrc?: string): Promise; /** * Allow a rainbow attendee to join the webinar room */ joinAsRainbowAttendee(): Promise; /** * Allow a rainbow user to join the webinar */ join(): Promise; /** * Allow to leave a webinar * - remove the user from the stage (if it was on the stage) * - remove the user from the conference (stop the session if last user) * @param forced - when set to true this method stop the session (even if not the last user connect in conf) * @param nowait - when set to true this method call async child methods without waiting the end of execution (used in last chance deconnection event mechanism (onunload event)) * @returns A promise that is resolved when the user has join the conference */ leave(forced?: boolean, nowait?: boolean, reason?: string): Promise; /** * Update existing webinar with server data * @param webinarData - server webinar data structure */ updateFromData(webinarData: any): void; /** * Accept webinar invitation (as a speaker) */ acceptInvitation(): Promise; /** * Add audio/video media * @param media - the media to add */ addAudioVideoMedia(media: string, stream?: MediaStream, replaceBg?: boolean): Promise; /** * Add a sharing media * @param stream - the mediaStream to add as sharing media */ addSharingMedia(stream: MediaStream): Promise; /** * Put local participant audio/video media on stage * @param master - when set to true the participant media is presented on master */ putLocalParticipantAudioVideoMediaOnStage(master?: boolean): Promise; /** @internal */ putLocalParticipantMixMediaOnStage(): Promise; /** * Put a participant sharing media on stage * @param master - when set to true the participant sharing is presented on master */ putParticipantSharingMediaOnStage(participant: WebinarSessionParticipant, master?: boolean): Promise; /** * Remove a participant audio/video media from the stage * @param participant - the participant to remove from the stage */ removeParticipantAudioVideoMediaFromStage(participant: WebinarSessionParticipant): Promise; /** * Remove a participant sharing media from the stage * @param participant - the participant to remove from the stage */ removeParticipantSharingMediaFromStage(participant: WebinarSessionParticipant): Promise; /** * Share the local participant audioConfig * @param audioConfig - the audioConfig "stage"|"backstage"|"stageAndBackstage"|a userId */ shareLocalParticipantAudioConfig(audioConfig: string): Promise; /** * Subscribe to participant media * @param participant - the publisher participant * @param media - the media */ subscribeToPublisher(participant: WebinarSessionParticipant, media: string): Promise; /** * Unsubscribe to participant media * @param participant - the publisher participant * @param media - the media */ unsubscribeToPublisher(participant: WebinarSessionParticipant, media: string, disableStream?: boolean): Promise; /** * Send an event to publisher for asking to go on stage * @param participant - the speaker participant * @param media - the media requested to stage */ askForStaging(participant: WebinarSessionParticipant, media: string): Promise; /** * Decline an "ask to go on stage" offer * @param participant - the speaker participant * @param media - the media requested to stage */ declineStagingInvitation(participant: WebinarSessionParticipant, media: string): Promise; muteParticipant(participant: WebinarSessionParticipant, mute?: boolean): Promise; declineUnmuteInvitation(fromParticipant: WebinarSessionParticipant): Promise; /** * Permit to known if it is possible to add more media audioVideo or sharing on scene */ isStageAvailable(): boolean; allowAttendeeToTalk(userId: string): Promise; disableAttendeeToTalk(userId: string): Promise; getConnectedUserRole(): string; sendCountdownMessage(): Promise; lowerHand(userId: string): Promise; /** * Downloads the recording of this webinar. * @returns A promise that resolves when the download is complete. */ downloadRecord(): Promise; } export declare class WebinarRB implements Webinar { private webinarService?; private xmppService?; id: string; name: string; subject: string; webinarStartDate: string; webinarEndDate: string; webinarDuration: string; webinarLastDateCheck: string; waitingRoomStartDate: string; timeZone: string; roomId: string; roomModeratorsChatId: string; room: Bubble; practiceRoom: Bubble; organizers: any[]; speakers: any[]; participants: WebinarParticipant[]; profileId: string; pendingParticipantNumber: number; acceptedParticipantNumber: number; rejectedParticipantNumber: number; color: string; creatorId: string; creatorCompanyId: string; isCreator: boolean; isOrganizer: boolean; isSpeaker: boolean; isAttendee: boolean; isGuestAttendee: boolean; isGuest: boolean; isMCUBOT: boolean; password: string; approvalRegistrationMethod: string; registrationUuid: string; published: boolean; moderatorsNotified: boolean; status: WebinarStatus; webinarUrl: string; rxSubject: Subject; rxParticipantsSubject: Subject; rxServiceSubject: Subject; rxInfoSubject: Subject; isWebinarSync: boolean; session: WebinarSession | null; waitingRoomMultimediaURLs: string[]; stageBackground: string; reminderDates: string[]; subtitlesEnable: boolean; blur: boolean; bgReplaceUrl: string; chatOption: string; chatOptionExpired: boolean; chatOptionTimer: any; recorded?: string; hideRecordInfo: boolean; recordFileId: string; recordStatus: string; action: string; lastAvatarUpdate?: string; lastActorsInfo?: any; incomingStreamsDisabled: any; private constructor(); static create(): WebinarRB; static createFromData(webinarData: any): WebinarRB; sendEvent(name: WebinarEvents, data?: any): void; subscribe2(handler: (event: RBEvent) => any, eventNames?: WebinarEvents | WebinarEvents[]): Subscription; /** * Update existing webinar with server data * @param webinarData - server webinar data structure */ updateFromData(webinarData: any): void; updateAttendeeCounters(): void; subscribe(handler: any): Subscription; getData(): string; updateRaiseHandParticipants(): void; isTerminated(): boolean; isWaitingRoomStarted(): boolean; isInvitation(): boolean; clone(params: WebinarCloneParams): Promise; /** * Asynchronous method to update webinar avatar on server * @param avatarImg - base64 encoded webinar avatar */ updateAvatar(avatarImg?: string): Promise; /** * Asynchronous method to update webinar logo on server * @param logoSrc - base64 encoded webinar logo */ updateLogo(logoSrc?: string): Promise; acceptInvitation(): Promise; join(): Promise; addAudioVideoMedia(media: string, stream?: MediaStream, replaceBg?: boolean): Promise; addSharingMedia(stream: MediaStream): Promise; leave(forced?: boolean, nowait?: boolean, reason?: string): Promise; joinAsRainbowAttendee(): Promise; putLocalParticipantMixMediaOnStage(): Promise; putLocalParticipantAudioVideoMediaOnStage(master?: boolean): Promise; putParticipantSharingMediaOnStage(participant: WebinarSessionParticipant, master?: boolean): Promise; removeParticipantAudioVideoMediaFromStage(participant: WebinarSessionParticipant): Promise; removeParticipantSharingMediaFromStage(participant: WebinarSessionParticipant): Promise; shareLocalParticipantAudioConfig(audioConfig: string): Promise; subscribeToPublisher(participant: WebinarSessionParticipant, media: string): Promise; unsubscribeToPublisher(participant: WebinarSessionParticipant, media: string, disableStream?: boolean): Promise; askForStaging(participant: WebinarSessionParticipant, media: string): Promise; declineStagingInvitation(participant: WebinarSessionParticipant, media: string): Promise; muteParticipant(participant: WebinarSessionParticipant, mute?: boolean): Promise; declineUnmuteInvitation(participant: WebinarSessionParticipant): Promise; downloadRecord(): Promise; isStageAvailable(): boolean; allowAttendeeToTalk(userId: string): Promise; disableAttendeeToTalk(userId: string): Promise; lowerHand(userId: string): Promise; getConnectedUserRole(): string; sendCountdownMessage(): Promise; } //# sourceMappingURL=webinar.model.d.ts.map