UNPKG

infobip-rtc

Version:

Infobip RTC JavaScript SDK - Infobip WebRTC API Implementation

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