public class MediaHandoverConfig
extends java.lang.Object
Constructor and Description |
---|
MediaHandoverConfig(int numOfRetrialsWhenNoPackets,
int highPacketLossTimeoutMs,
int noPacketsTimeoutMs,
int noNetworkTimeoutMs)
Sets the configuration of media handover logic and auto-disconnect behavior.
|
Modifier and Type | Method and Description |
---|---|
static MediaHandoverConfig |
getDefaultConfig() |
int |
getHighPacketLossTimeoutMs() |
int |
getNoNetworkTimeoutMs() |
int |
getNoPacketsTimeoutMs() |
int |
getNumOfRetrialsWhenNoPackets() |
public MediaHandoverConfig(int numOfRetrialsWhenNoPackets, int highPacketLossTimeoutMs, int noPacketsTimeoutMs, int noNetworkTimeoutMs) throws java.security.InvalidParameterException
numOfRetrialsWhenNoPackets
- Timeout in milliseconds, must be one or greater, sets how
many retries of reconnecting to perform before dropping the call in case of current
connection produces no incoming data packets.highPacketLossTimeoutMs
- Timeout in milliseconds, must be non-negative, sets how much
time should pass with poor connection before trying switching to another (say from WiFi to 4G).
Works only if 'media handover' is enabled (and is enabled by default).
SinchClient.setMediaHandover(boolean)
noPacketsTimeoutMs
- Timeout in milliseconds, must be either 0 (disabling logic) or at least 10000 (10 s),
sets how much time should pass with connection producing no incoming data packets before new reconnect retry.
When number of retries is exhausted the call will be automatically dropped.
Minimum 10 s needs to be given to WebRTC to try to resolve ICE connectivity status itself, since triggering
ICE restart during this period leads to irreparable ICE connectivity failure.noNetworkTimeoutMs
- Timeout in milliseconds, must be non-negative, sets how much time
should pass with no available connection detected by Android System (no WiFi, no 4G, etc.)
before the call will be automatically dropped.java.security.InvalidParameterException
- if configuration is invalid.public int getNumOfRetrialsWhenNoPackets()
public int getHighPacketLossTimeoutMs()
public int getNoPacketsTimeoutMs()
public int getNoNetworkTimeoutMs()
public static MediaHandoverConfig getDefaultConfig()
Copyright 2016, Sinch AB