UNPKG

infobip-rtc

Version:

Infobip RTC JavaScript SDK - Infobip WebRTC API Implementation

84 lines 2.69 kB
import { CallOptions } from "./CallOptions"; import { VideoOptions } from "./VideoOptions"; import { AudioOptions } from "./AudioOptions"; import { CameraOrientation } from "./CameraOrientation"; import { WebrtcCallRecordingOptions } from "./WebrtcCallRecordingOptions"; import { VideoMode } from "./VideoMode"; import { AudioQualityMode } from "./AudioQualityMode"; export class WebrtcCallOptions extends CallOptions { constructor(audio, audioOptions, recordingOptions, customData, autoReconnect, _video, _videoOptions, _dataChannel) { super(audio, audioOptions, recordingOptions, customData, autoReconnect); this._video = _video; this._videoOptions = _videoOptions; this._dataChannel = _dataChannel; } get video() { return this._video; } set video(value) { this._video = value; } get videoOptions() { return this._videoOptions; } set videoOptions(value) { this._videoOptions = value; } get dataChannel() { return this._dataChannel; } set dataChannel(value) { this._dataChannel = value; } static builder() { return new WebrtcCallOptionsBuilder(); } } class WebrtcCallOptionsBuilder { constructor() { this._audio = true; this._audioOptions = new AudioOptions(null, AudioQualityMode.AUTO); this._recordingOptions = new WebrtcCallRecordingOptions(); this._customData = {}; this._video = false; this._videoOptions = new VideoOptions(CameraOrientation.FRONT, null, VideoMode.PRESENTATION, 24, 8); this._dataChannel = false; this._autoReconnect = false; } setAudio(value) { this._audio = value; return this; } setAudioOptions(value) { this._audioOptions = value; return this; } setRecordingOptions(recordingOptions) { this._recordingOptions = recordingOptions; return this; } setCustomData(value) { this._customData = value; return this; } setVideo(value) { this._video = value; return this; } setVideoOptions(value) { this._videoOptions = value; return this; } setDataChannel(_dataChannel) { this._dataChannel = _dataChannel; return this; } setAutoReconnect(_autoReconnect) { this._autoReconnect = _autoReconnect; return this; } build() { return new WebrtcCallOptions(this._audio, this._audioOptions, this._recordingOptions, this._customData, this._autoReconnect, this._video, this._videoOptions, this._dataChannel); } } //# sourceMappingURL=WebrtcCallOptions.js.map