-
public class AcceptOptions.Builder extends CallOptions.Builder
Build new AcceptOptions.
All methods are optional.
-
-
Constructor Summary
Constructors Constructor Description AcceptOptions.Builder()Use this Builder when accepting a CallInvite
-
Method Summary
Modifier and Type Method Description AcceptOptions.BuildericeOptions(@NonNull() IceOptions iceOptions)Custom ICE configuration used to connect to a Call. AcceptOptions.BuilderenableDscp(@NonNull() boolean enable)Enable DifferentiatedServices Field Code Point (DSCP) with Expedited Forwarding (EF). AcceptOptions.BuilderenableIceGatheringOnAnyAddressPorts(@NonNull() boolean enable)Enable gathering of ICE candidates on "any address" ports. AcceptOptions.BuilderpreferAudioCodecs(@NonNull() List<AudioCodec> preferredAudioCodecs)Set preferred audio codecs. AcceptOptions.BuildercallMessageListener(@NonNull() Call.CallMessageListener callMessageListener)Set the handler for receiving call messages. AcceptOptions.BuilderaudioOptions(@NonNull() AudioOptions audioOptions)Set the audio options for audio processing when receiving an incoming call. AcceptOptionsbuild()Builds AcceptOptions object. -
-
Constructor Detail
-
AcceptOptions.Builder
AcceptOptions.Builder()
Use this Builder when accepting a CallInvite
-
-
Method Detail
-
iceOptions
@NonNull() AcceptOptions.Builder iceOptions(@NonNull() IceOptions iceOptions)
Custom ICE configuration used to connect to a Call.
-
enableDscp
@NonNull() AcceptOptions.Builder enableDscp(@NonNull() boolean enable)
Enable DifferentiatedServices Field Code Point (DSCP) with Expedited Forwarding (EF).
- Parameters:
enable- Enable DSCP.
-
enableIceGatheringOnAnyAddressPorts
@NonNull() AcceptOptions.Builder enableIceGatheringOnAnyAddressPorts(@NonNull() 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.
- Parameters:
enable- Enable ICE candidates on "any address" ports.
-
preferAudioCodecs
@NonNull() AcceptOptions.Builder preferAudioCodecs(@NonNull() List<AudioCodec> preferredAudioCodecs)
Set preferred audio codecs. The list specifies which audio codecs would be preferred whennegotiating audio with the backend service. The preferences are applied in the orderfound in the list starting with the most preferred audio codec to the least preferredaudio codec. Audio codec preferences are not guaranteed to be satisfied because thebackend service is not guaranteed to support all audio codecs.
The following snippet demonstrates how to prefer a single audio codec.
AcceptOptions acceptOptions = new AcceptOptions.Builder(token) .preferAudioCodecs(Collections.<AudioCodec>singletonList(new PcmuCodec())) .build();The following snippet demonstrates how to specify the exact order of codecpreferences.
AcceptOptions acceptOptions = new AcceptOptions.Builder(token) .preferAudioCodecs(Arrays.asList(new PcmuCodec(), new OpusCodec())) .build();
-
callMessageListener
@NonNull() AcceptOptions.Builder callMessageListener(@NonNull() Call.CallMessageListener callMessageListener)
Set the handler for receiving call messages.
-
audioOptions
@NonNull() AcceptOptions.Builder audioOptions(@NonNull() AudioOptions audioOptions)
Set the audio options for audio processing when receiving an incoming call.
- Parameters:
audioOptions- - An AudioOptions object.
-
build
@NonNull() AcceptOptions build()
Builds AcceptOptions object.
-
-
-
-