infobip-rtc
Version:
Infobip RTC JavaScript SDK - Infobip WebRTC API Implementation
61 lines • 1.99 kB
JavaScript
import { CameraOrientation } from "./CameraOrientation";
import { VideoMode } from "./VideoMode";
export class VideoOptions {
constructor(_cameraOrientation, _videoFilter, _videoMode, _cameraVideoFrameRate, _screenShareFrameRate) {
this._cameraOrientation = _cameraOrientation;
this._videoFilter = _videoFilter;
this._videoMode = _videoMode;
this._cameraVideoFrameRate = _cameraVideoFrameRate;
this._screenShareFrameRate = _screenShareFrameRate;
}
get cameraOrientation() {
return this._cameraOrientation;
}
get videoFilter() {
return this._videoFilter;
}
get videoMode() {
return this._videoMode;
}
get cameraVideoFrameRate() {
return this._cameraVideoFrameRate;
}
get screenShareFrameRate() {
return this._screenShareFrameRate;
}
static builder() {
return new VideoOptionsBuilder();
}
}
class VideoOptionsBuilder {
constructor() {
this._cameraOrientation = CameraOrientation.FRONT;
this._videoMode = VideoMode.PRESENTATION;
this._cameraVideoFrameRate = 24;
this._screenShareFrameRate = 8;
}
setCameraOrientation(_cameraOrientation) {
this._cameraOrientation = _cameraOrientation;
return this;
}
setVideoFilter(videoFilter) {
this._videoFilter = videoFilter;
return this;
}
setVideoMode(videoMode) {
this._videoMode = videoMode;
return this;
}
setCameraVideoFrameRate(cameraVideoFrameRate) {
this._cameraVideoFrameRate = cameraVideoFrameRate;
return this;
}
setScreenShareFrameRate(screenShareFrameRate) {
this._screenShareFrameRate = screenShareFrameRate;
return this;
}
build() {
return new VideoOptions(this._cameraOrientation, this._videoFilter, this._videoMode, this._cameraVideoFrameRate, this._screenShareFrameRate);
}
}
//# sourceMappingURL=VideoOptions.js.map