Skip to content

WebrtcCallOptionsBuilder

Adnan Mujagić edited this page Sep 21, 2023 · 6 revisions



setAudio(audio)

Description

Setter for the audio field.

Arguments

  • audio: boolean - true if the local audio should be enabled. Enabled by default. Note, access to the microphone will still be requested even if audio is false.

Returns

Example

let webrtcCallOptionsBuilder = WebrtcCallOptions.builder();
webrtcCallOptionsBuilder.setAudio(false);



setAudioOptions(audioOptions)

Description

Setter for the audioOptions field.

Arguments

  • audioOptions: AudioOptions - Configuration used for the audio in the call.

Returns

Example

let audioOptions = AudioOptions.builder().lowDataMode(true).build();
let webrtcCallOptionsBuilder = WebrtcCallOptions.builder();
webrtcCallOptionsBuilder.setAudioOptions(audioOptions);



setVideo(video)

Description

Setter for the video field.

Arguments

  • video: boolean - true if the video should be enabled. Disabled by default.

Returns

Example

let webrtcCallOptionsBuilder = WebrtcCallOptions.builder();
webrtcCallOptionsBuilder.setVideo(true);



setVideoOptions(videoOptions)

Description

Setter for the videoOptions field.

Arguments

  • videoOptions: VideoOptions - Configuration used for the local video in the call.

Returns

Example

let videoOptions = VideoOptions.builder().setCameraOrientation(CameraOrientation.BACK).build()
let webrtcCallOptionsBuilder = WebrtcCallOptions.builder();
webrtcCallOptionsBuilder.setVideoOptions(videoOptions);



setRecordingOptions(recordingOptions)

Description

Setter for the recordingOptions field.

Arguments

Returns

Example

let recordingOptions = new WebrtcCallRecordingOptions("AUDIO_AND_VIDEO");
let webrtcCallOptionsBuilder = WebrtcCallOptions.builder();
webrtcCallOptionsBuilder.setRecordingOptions(recordingOptions);



setCustomData(customData)

Description

Setter for the customData field.

Arguments

  • customData: CustomData - Object containing custom additional information. Empty by default. This object will be forwarded to the other peer in the incoming call event.

Returns

Example

let webrtcCallOptionsBuilder = WebrtcCallOptions.builder();
webrtcCallOptionsBuilder.setCustomData({"city": "New York"});



setDataChannel(dataChannel)

Description

Setter for the dataChannel field.

Arguments

  • dataChannel: boolean - true if the data channel should be created for the call. Disabled by default.

Returns

Example

let webrtcCallOptionsBuilder = WebrtcCallOptions.builder();
webrtcCallOptionsBuilder.setDataChannel(true);



build()

Description

Builds a new instance of the WebrtcCallOptions.

Arguments

  • none

Returns

Example

let webrtcCallOptionsBuilder = WebrtcCallOptions.builder();
let webrtcCallOptions = webrtcCallOptionsBuilder.build();

Tutorials

Migration guides

Reference documentation

Clone this wiki locally