public static class ConnectOptions.Builder
extends java.lang.Object
ConnectOptions
.
All methods are optional.
Constructor and Description |
---|
Builder(java.lang.String accessToken) |
Modifier and Type | Method and Description |
---|---|
ConnectOptions.Builder |
audioTracks(java.util.List<LocalAudioTrack> audioTracks)
Audio tracks that will be published upon connection.
|
ConnectOptions.Builder |
bandwidthProfile(BandwidthProfileOptions bandwidthProfile)
Configure how the available downlink bandwidth is shared among the
RemoteVideoTrack s you have subscribed to in a Group or Small-Group Room. |
ConnectOptions |
build()
Builds
ConnectOptions object. |
ConnectOptions.Builder |
dataTracks(java.util.List<LocalDataTrack> dataTracks)
Data tracks that will be published upon connection.
|
ConnectOptions.Builder |
enableAutomaticSubscription(boolean enableAutomaticSubscription)
Toggles automatic track subscription.
|
ConnectOptions.Builder |
enableDominantSpeaker(boolean enableDominantSpeaker)
Enable reporting of a
Room 's dominant speaker. |
ConnectOptions.Builder |
enableIceGatheringOnAnyAddressPorts(boolean enable)
Enable gathering of ICE candidates on "any address" ports.
|
ConnectOptions.Builder |
enableInsights(boolean enable)
Enable sending stats data to Insights.
|
ConnectOptions.Builder |
enableNetworkQuality(boolean enableNetworkQuality)
Enable or disable the Network Quality API.
|
ConnectOptions.Builder |
encodingParameters(EncodingParameters encodingParameters)
Set
EncodingParameters for audio and video tracks shared to a Room . |
ConnectOptions.Builder |
iceOptions(IceOptions iceOptions)
Custom ICE configuration used to connect to a Room.
|
ConnectOptions.Builder |
networkQualityConfiguration(NetworkQualityConfiguration networkQualityConfiguration)
Sets the verbosity level for network quality information returned by the Network Quality
API.
|
ConnectOptions.Builder |
preferAudioCodecs(java.util.List<AudioCodec> preferredAudioCodecs)
Set preferred audio codecs.
|
ConnectOptions.Builder |
preferVideoCodecs(java.util.List<VideoCodec> preferredVideoCodecs)
Set preferred video codecs.
|
ConnectOptions.Builder |
region(java.lang.String region)
The region of the signaling Server the Client will use.
|
ConnectOptions.Builder |
roomName(java.lang.String roomName)
The name of the room.
|
ConnectOptions.Builder |
videoTracks(java.util.List<LocalVideoTrack> videoTracks)
Video tracks that will be published upon connection.
|
@NonNull public ConnectOptions.Builder roomName(@NonNull java.lang.String roomName)
@NonNull public ConnectOptions.Builder audioTracks(@NonNull java.util.List<LocalAudioTrack> audioTracks)
@NonNull public ConnectOptions.Builder videoTracks(@NonNull java.util.List<LocalVideoTrack> videoTracks)
@NonNull public ConnectOptions.Builder dataTracks(@NonNull java.util.List<LocalDataTrack> dataTracks)
@NonNull public ConnectOptions.Builder iceOptions(@NonNull IceOptions iceOptions)
@NonNull public ConnectOptions.Builder enableIceGatheringOnAnyAddressPorts(boolean enable)
@NonNull public ConnectOptions.Builder enableInsights(boolean enable)
@NonNull public ConnectOptions.Builder enableAutomaticSubscription(boolean enableAutomaticSubscription)
@NonNull public ConnectOptions.Builder enableDominantSpeaker(boolean enableDominantSpeaker)
@NonNull public ConnectOptions.Builder enableNetworkQuality(boolean enableNetworkQuality)
Set this to 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 false
.
@NonNull public ConnectOptions.Builder networkQualityConfiguration(@NonNull NetworkQualityConfiguration networkQualityConfiguration)
If a NetworkQualityConfiguration
is not provided, the default configuration is
used: NetworkQualityVerbosity.NETWORK_QUALITY_VERBOSITY_MINIMAL
for the Local
Participant and NetworkQualityVerbosity.NETWORK_QUALITY_VERBOSITY_NONE
for the
Remote Participants.
@NonNull public ConnectOptions.Builder preferAudioCodecs(@NonNull java.util.List<AudioCodec> preferredAudioCodecs)
OpusCodec
is the default audio codec
if 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 IsacCodec()))
.build();
The following snippet demonstrates how to specify the exact order of codec preferences.
ConnectOptions connectOptions = new ConnectOptions.Builder(token)
.preferAudioCodecs(Arrays.asList(new IsacCodec(),
new G722Codec(), new OpusCodec()))
.build();
@NonNull public ConnectOptions.Builder preferVideoCodecs(@NonNull java.util.List<VideoCodec> preferredVideoCodecs)
Vp8Codec
is the default video codec
if no preferences are set.
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 codec preferences.
ConnectOptions connectOptions = new ConnectOptions.Builder(token)
.preferVideoCodecs(Arrays.asList(new H264Codec(),
new Vp8Codec(), new Vp9Codec()))
.build();
@NonNull public ConnectOptions.Builder region(@NonNull java.lang.String region)
@NonNull public ConnectOptions.Builder encodingParameters(@NonNull EncodingParameters encodingParameters)
EncodingParameters
for audio and video tracks shared to a Room
.public ConnectOptions.Builder bandwidthProfile(@Nullable BandwidthProfileOptions bandwidthProfile)
RemoteVideoTrack
s you have subscribed to in a Group or Small-Group Room. This property
has no effect in Peer-to-Peer Rooms.bandwidthProfile
- The profile to use.@NonNull public ConnectOptions build()
ConnectOptions
object.6.0.0