src/conferences/ConferenceInvite.ts
import {MediaTypes} from '../types';
/**
* This class allows access to the details of incoming Conference invitation.
* This class must not be directly instantiated. Instead,
* instances of this class are obtained by calling the {@link Conference#getInvite}
*/
export class ConferenceInvite {
private id: string;
private from: string;
private mediaTypes: MediaTypes;
/** @ignore */
public constructor(id: string, from: string, mediaTypes: MediaTypes) {
/** @private */
this.id = id;
/** @private */
this.from = from;
/** @private */
this.mediaTypes = mediaTypes;
}
/**
* @desc Obtains the ID of the incoming invitation
* @returns {string}
*/
public getId(): string {
return this.id;
}
/**
* @desc Obtains the "gateway" of the caller. This can be a user's gateway or pstn number.
* @returns {string}
*/
public getFrom(): string {
return this.from;
}
/**
* @desc Obtains the mediaTypes for this conference invite.
* This allow us to guess if we are invited with audio & video, or only with audio and video
* @returns {MediaTypes}
*/
public getMediaTypes(): MediaTypes {
return this.mediaTypes;
}
}