-
public class ConnectOptions.BuilderBuild new ConnectOptions.
All methods are optional.
-
-
Constructor Summary
Constructors Constructor Description ConnectOptions.Builder(String accessToken)
-
Method Summary
Modifier and Type Method Description ConnectOptions.BuilderroomName(@NonNull() String roomName)The name of the room. ConnectOptions.BuilderaudioTracks(@NonNull() List<LocalAudioTrack> audioTracks)Audio tracks that will be published upon connection. ConnectOptions.BuildervideoTracks(@NonNull() List<LocalVideoTrack> videoTracks)Video tracks that will be published upon connection. ConnectOptions.BuilderdataTracks(@NonNull() List<LocalDataTrack> dataTracks)Data tracks that will be published upon connection. ConnectOptions.BuildericeOptions(@NonNull() IceOptions iceOptions)Custom ICE configuration used to connect to a Room. ConnectOptions.BuilderenableIceGatheringOnAnyAddressPorts(boolean enable)Enable gathering of ICE candidates on "any address" ports. ConnectOptions.BuilderenableInsights(boolean enable)Enable sending stats data to Insights. ConnectOptions.BuilderenableAutomaticSubscription(boolean enableAutomaticSubscription)Toggles automatic track subscription. ConnectOptions.BuilderenableDominantSpeaker(boolean enableDominantSpeaker)Enable reporting of a Room's dominant speaker. ConnectOptions.BuilderenableNetworkQuality(boolean enableNetworkQuality)Enable or disable the Network Quality API. ConnectOptions.BuilderreceiveTranscriptions(boolean receiveTranscription)Enable or disable receiving transcription of the room. ConnectOptions.BuildernetworkQualityConfiguration(@NonNull() NetworkQualityConfiguration networkQualityConfiguration)Sets the verbosity level for network quality information returned by the Network QualityAPI. ConnectOptions.BuilderpreferAudioCodecs(@NonNull() List<AudioCodec> preferredAudioCodecs)Set preferred audio codecs. ConnectOptions.BuilderpreferVideoCodecs(@NonNull() List<VideoCodec> preferredVideoCodecs)Set preferred video codecs. ConnectOptions.Builderregion(@NonNull() String region)The region of the signaling Server the Client will use. ConnectOptions.BuilderencodingParameters(@NonNull() EncodingParameters encodingParameters)Set EncodingParameters for audio and video tracks shared to a Room. ConnectOptions.BuilderbandwidthProfile(@Nullable() BandwidthProfileOptions bandwidthProfile)Configure how the available downlink bandwidth is shared among the s you have subscribed to in a Group or Small-Group Room. ConnectOptions.BuildervideoEncodingMode(@Nullable() VideoEncodingMode videoEncodingMode)Set VideoEncodingMode. ConnectOptionsbuild()Builds ConnectOptions object. -
-
Constructor Detail
-
ConnectOptions.Builder
ConnectOptions.Builder(String accessToken)
-
-
Method Detail
-
roomName
@NonNull() ConnectOptions.Builder roomName(@NonNull() String roomName)
The name of the room.
-
audioTracks
@NonNull() ConnectOptions.Builder audioTracks(@NonNull() List<LocalAudioTrack> audioTracks)
Audio tracks that will be published upon connection.
-
videoTracks
@NonNull() ConnectOptions.Builder videoTracks(@NonNull() List<LocalVideoTrack> videoTracks)
Video tracks that will be published upon connection.
-
dataTracks
@NonNull() ConnectOptions.Builder dataTracks(@NonNull() List<LocalDataTrack> dataTracks)
Data tracks that will be published upon connection.
-
iceOptions
@NonNull() ConnectOptions.Builder iceOptions(@NonNull() IceOptions iceOptions)
Custom ICE configuration used to connect to a Room.
-
enableIceGatheringOnAnyAddressPorts
@NonNull() ConnectOptions.Builder enableIceGatheringOnAnyAddressPorts(boolean enable)
Enable gathering of ICE candidates on "any address" ports. When this flag is set, portsnot bound to any specific network interface will be used, in addition to normal portsbound to the enumerated interfaces. This flag may need to be set to support certainnetwork configurations (e.g. some VPN implementations) where ports are not bound tospecific interfaces. Setting this flag means that additional candidates might need to begathered and evaluated, which could lead to slower ICE connection times for regularnetworks.
-
enableInsights
@NonNull() ConnectOptions.Builder enableInsights(boolean enable)
Enable sending stats data to Insights. Sending stats data to Insights is enabled bydefault.
-
enableAutomaticSubscription
@NonNull() ConnectOptions.Builder enableAutomaticSubscription(boolean enableAutomaticSubscription)
Toggles automatic track subscription. If set to false, the LocalParticipant will receivenotifications of track publish events, but will not automatically subscribe to them. Ifset to true, the LocalParticipant will automatically subscribe to tracks as they arepublished. If unset, the default is true. Note: This feature is only available for GroupRooms. Toggling the flag in a P2P room does not modify subscription behavior.
-
enableDominantSpeaker
@NonNull() ConnectOptions.Builder enableDominantSpeaker(boolean enableDominantSpeaker)
-
enableNetworkQuality
@NonNull() ConnectOptions.Builder enableNetworkQuality(boolean enableNetworkQuality)
Enable or disable the Network Quality API.
Set this to
{@code true}to enable the Network Quality API when using Group Rooms.This option has no effect in Peer-to-Peer Rooms. The default value is{@code false}.
-
receiveTranscriptions
@NonNull() ConnectOptions.Builder receiveTranscriptions(boolean receiveTranscription)
Enable or disable receiving transcription of the room.
Set this to
{@code true}to receive transcriptions of the conversations in the room.This option has no effect in Peer-to-Peer Rooms. The default value is{@code false}.
-
networkQualityConfiguration
@NonNull() ConnectOptions.Builder networkQualityConfiguration(@NonNull() NetworkQualityConfiguration networkQualityConfiguration)
Sets the verbosity level for network quality information returned by the Network QualityAPI.
If a NetworkQualityConfiguration is not provided, the default configuration isused: NETWORK_QUALITY_VERBOSITY_MINIMAL for the LocalParticipant and NETWORK_QUALITY_VERBOSITY_NONE for theRemote Participants.
-
preferAudioCodecs
@NonNull() ConnectOptions.Builder preferAudioCodecs(@NonNull() List<AudioCodec> preferredAudioCodecs)
Set preferred audio codecs. The list specifies which audio codecs would be preferred whennegotiating audio between participants. The preferences are applied in the order found inthe list starting with the most preferred audio codec to the least preferred audio codec.Audio codec preferences are not guaranteed to be satisfied because not all participantsare guaranteed to support all audio codecs. OpusCodec is the default audio codecif no preferences are set.
The following snippet demonstrates how to prefer a single audio codec.
ConnectOptions connectOptions = new ConnectOptions.Builder(token) .preferAudioCodecs(Collections.<AudioCodec>singletonList(new PcmuCodec())) .build();The following snippet demonstrates how to specify the exact order of codecpreferences.
ConnectOptions connectOptions = new ConnectOptions.Builder(token) .preferAudioCodecs(Arrays.asList(new PcmuCodec(), new G722Codec(), new OpusCodec())) .build();
-
preferVideoCodecs
@NonNull() ConnectOptions.Builder preferVideoCodecs(@NonNull() List<VideoCodec> preferredVideoCodecs)
Set preferred video codecs. The list specifies which video codecs would be preferred whennegotiating video between participants. The preferences are applied in the order found inthe list starting with the most preferred video codec to the least preferred video codec.Video codec preferences are not guaranteed to be satisfied because not all participantsare guaranteed to support all video codecs. Vp8Codec is the default video codecif no preferences are set. Attempting to set preferred video codecs when video encodingmode is set to AUTO will throw an exception.
The following snippet demonstrates how to prefer a single video codec.
ConnectOptions connectOptions = new ConnectOptions.Builder(token) .preferVideoCodecs(Collections.<VideoCodec>singletonList(new H264Codec())) .build();The following snippet demonstrates how to specify the exact order of codecpreferences.
ConnectOptions connectOptions = new ConnectOptions.Builder(token) .preferVideoCodecs(Arrays.asList(new H264Codec(), new Vp8Codec(), new Vp9Codec())) .build();
-
region
@NonNull() ConnectOptions.Builder region(@NonNull() String region)
The region of the signaling Server the Client will use. By default, the Client willconnect to the nearest signaling Server determined by latencybased routing. Setting a value other than "gll" bypasses routing and guarantees thatsignaling traffic will be terminated in the region that you prefer. If you are connectingto a Group Room created with the "gll" Media Region (either
-
encodingParameters
@NonNull() ConnectOptions.Builder encodingParameters(@NonNull() EncodingParameters encodingParameters)
Set EncodingParameters for audio and video tracks shared to a Room.Attempting to set maxVideoBitrate when video encoding mode isset to AUTO, will throw an exception.
-
bandwidthProfile
@NonNull() ConnectOptions.Builder bandwidthProfile(@Nullable() BandwidthProfileOptions bandwidthProfile)
Configure how the available downlink bandwidth is shared among the s you have subscribed to in a Group or Small-Group Room. This propertyhas no effect in Peer-to-Peer Rooms.
- Parameters:
bandwidthProfile- The profile to use.
-
videoEncodingMode
@NonNull() ConnectOptions.Builder videoEncodingMode(@Nullable() VideoEncodingMode videoEncodingMode)
Set VideoEncodingMode. Setting it to AUTO will let the SDK select the codecs andmanage encodings automatically. It is null by default, which allows manually settingpreferred video codecs and/or max video bitrate. Attempting to set videoEncodingMode wheneither maxVideoBitrate (part of EncodingParameters) or preferVideoCodecs is set willthrow an exception.
-
build
@NonNull() ConnectOptions build()
Builds ConnectOptions object.
-
-
-
-