Skip to content

WebrtcCallOptions

Lejla Solak edited this page May 27, 2024 · 6 revisions

extends CallOptions



builder()

Description

Creates a builder instance used to build a new instance of WebrtcCallOptions.

Arguments

  • none

Returns

Example

WebrtcCallOptions.Builder webrtcCallOptionsBuilder = WebrtcCallOptions.builder();



isVideo()

Description

Getter for the video field.

Arguments

  • none

Returns

  • boolean - Value of the video field indicating whether the call should include local video.

Example

WebrtcCallOptions webrtcCallOptions = WebrtcCallOptions.builder().video(true).build();
boolean video = webrtcCallOptions.isVideo();



getVideoOptions()

Description

Getter for the videoOptions field.

Arguments

  • none

Returns

  • VideoOptions - Value of the videoOptions field indicating what configuration should be used for the local video.

Example

WebrtcCallOptions webrtcCallOptions = WebrtcCallOptions.builder()
        .videoOptions(VideoOptions.builder().cameraOrientation(VideoOptions.CameraOrientation.BACK).build())
        .build();
VideoOptions videoOptions = webrtcCallOptions.getVideoOptions();



isDataChannel()

Description

Getter for the dataChannel field.

Arguments

  • none

Returns

  • boolean - Value of the dataChannel field indicating whether the data channel should be created for this call.

Example

WebrtcCallOptions webrtcCallOptions = WebrtcCallOptions.builder().dataChannel(true).build();
boolean dataChannel = webrtcCallOptions.isDataChannel();



Builder




audio(audio)

Description

Setter for the audio field.

Arguments

  • audio: boolean - true if the local audio should be enabled. Enabled by default.

Returns

Example

WebrtcCallOptions.Builder webrtcCallOptionsBuilder = WebrtcCallOptions.builder().audio(false);



video(video)

Setter for the video field.

Arguments

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

Returns

Example

WebrtcCallOptions.Builder webrtcCallOptionsBuilder = WebrtcCallOptions.builder().video(true);



audioOptions(audioOptions)

Description

Setter for the audioOptions field.

Arguments

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

Returns

Example

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



videoOptions(videoOptions)

Description

Setter for the videoOptions field.

Arguments

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

Returns

Example

VideoOptions videoOptions = VideoOptions.builder().cameraOrientation(VideoOptions.CameraOrientation.BACK).build();
WebrtcCallOptions.Builder webrtcCallOptionsBuilder = WebrtcCallOptions.builder().videoOptions(videoOptions);



recordingOptions(recordingOptions)

Description

Setter for the recordingOptions field.

Arguments

  • recordingOptions: RecordingOptions - Recording configuration to be used for the call.

Returns

Example

RecordingOptions recordingOptions = RecordingOptions.Builder.recordingType(RecordingType.AUDIO_AND_VIDEO).build();
WebrtcCallOptions.Builder webrtcCallOptionsBuilder = WebrtcCallOptions.builder().recordingOptions(recordingOptions);



customData(customData)

Description

Setter for the customData field.

Arguments

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

Returns

Example

Map<String, String> customData = Map.of("username", "Alice");
WebrtcCallOptions.Builder webrtcCallOptionsBuilder = WebrtcCallOptions.builder().customData(customData);



dataChannel(dataChannel)

Description

Setter for the dataChannel field.

Arguments

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

Returns

Example

WebrtcCallOptions.Builder webrtcCallOptionsBuilder = WebrtcCallOptions.builder().dataChannel(true);



build()

Description

Builds a new instance of the WebrtcCallOptions.

Arguments

  • none

Returns

Example

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

Tutorials

Migration guides

Reference documentation

Clone this wiki locally