import { Observable, Subject } from "rxjs"; import { IframeApiContribution } from "../IframeApiContribution"; import { RemotePlayer } from "../Players/RemotePlayer"; import { AudioStream } from "./AudioStream"; export declare class WorkadventureProximityMeetingCommands extends IframeApiContribution { private joinStream; private participantJoinStream; private participantLeaveStream; private followedStream; private unfollowedStream; private leaveStream; private pcmDataStream; callbacks: ({ type: "joinProximityMeetingEvent"; callback: (event: { users: { name: string; position: { x: number; y: number; }; playerId: number; variables: Map; userUuid: string; availabilityStatus: string; outlineColor?: number | undefined; chatID?: string | null | undefined; }[]; }) => void; } | { type: "participantJoinProximityMeetingEvent"; callback: (event: { user: { name: string; position: { x: number; y: number; }; playerId: number; variables: Map; userUuid: string; availabilityStatus: string; outlineColor?: number | undefined; chatID?: string | null | undefined; }; }) => void; } | { type: "participantLeaveProximityMeetingEvent"; callback: (event: { user: { name: string; position: { x: number; y: number; }; playerId: number; variables: Map; userUuid: string; availabilityStatus: string; outlineColor?: number | undefined; chatID?: string | null | undefined; }; }) => void; } | { type: "leaveProximityMeetingEvent"; callback: (event: undefined) => void; } | { type: "onFollowed"; callback: (event: { user: { name: string; position: { x: number; y: number; }; playerId: number; variables: Map; userUuid: string; availabilityStatus: string; outlineColor?: number | undefined; chatID?: string | null | undefined; }; }) => void; } | { type: "onUnfollowed"; callback: (event: { user: { name: string; position: { x: number; y: number; }; playerId: number; variables: Map; userUuid: string; availabilityStatus: string; outlineColor?: number | undefined; chatID?: string | null | undefined; }; }) => void; } | { type: "appendPCMData"; callback: (event: { data: Float32Array; }) => void; })[]; /** * Detecting when the user enter on a meeting. * {@link https://docs.workadventu.re/map-building/api-player.md#detecting-when-the-user-entersleaves-a-meeting | Website documentation} * * @returns {Subject} Observable who return the joined users */ onJoin(): Subject; /** * Detecting when a participant joined on the current meeting. * {@link https://docs.workadventu.re/map-building/api-player.md#detecting-when-a-participant-entersleaves-the-current-meeting | Website documentation} * * @returns {Subject} Observable who return the joined user */ onParticipantJoin(): Subject; /** * Detecting when a participant left on the current meeting. * {@link https://docs.workadventu.re/map-building/api-player.md#detecting-when-a-participant-entersleaves-the-current-meeting | Website documentation} * * @returns {Subject} Observable who return the left user */ onParticipantLeave(): Subject; /** * Detecting when the user leave on a meeting. * {@link https://docs.workadventu.re/developer/map-scripting/references/api-player/#detecting-when-the-user-entersleaves-a-meeting | Website documentation} */ onLeave(): Subject; /** * Play a sound to all players in the current meeting. * {@link https://docs.workadventu.re/developer/map-scripting/references/api-player/#playing-a-sound-to-players-in-the-same-meeting | Website documentation} */ playSound(url: string): Promise; /** * Starts an audio stream played to all players in the current meeting. * {@link https://docs.workadventu.re/developer/map-scripting/references/api-player/#audio-streams | Website documentation} * @param {number} sampleRate - The sample rate of the audio stream expressed in Hertz. */ startAudioStream(sampleRate: number): Promise; /** * Listen to the audio stream played sent by all players. * The voice of all players in the bubble is merged in a single stream that is regularly sent to the callback. * @param {number} sampleRate - The sample rate of the audio stream expressed in Hertz. */ listenToAudioStream(sampleRate: number): Observable; /** * Ask all players in the current meeting to follow the player. * Note that unlike with the "follow" mode in the UI, the other players will automatically follow the player. */ followMe(): Promise; stopLeading(): Promise; /** * Triggered when a player starts following us. */ onFollowed(): Subject; /** * Triggered when a player stops following us. */ onUnfollowed(): Subject; }