public class

SkylinkConfig

extends Object
implements Serializable
java.lang.Object
   ↳ sg.com.temasys.skylink.sdk.rtc.SkylinkConfig

Class Overview

Configuration class used to configure the parameters of real time communication.

Summary

Nested Classes
enum SkylinkConfig.AudioCodec Audio codec to be used  
enum SkylinkConfig.AudioDevice A list of device(s) that can be the source of an audio stream. 
enum SkylinkConfig.AudioVideoConfig List of enums that specify an audio video (AV) allowed to send / receive setting, to used together with: setAudioVideoSendConfig(AudioVideoConfig) or setAudioVideoReceiveConfig(AudioVideoConfig)
interface SkylinkConfig.MediaDevice Device that can be the source of Media, e.g. 
enum SkylinkConfig.NetworkTransport A defined list of network transport can be input into setNetworkTransport(NetworkTransport) method  
enum SkylinkConfig.SkylinkAction A defined list of actions that can be input into setTimeout(SkylinkAction, int) method  
enum SkylinkConfig.SkylinkRoomSize Values available for room_size: Available options and the max number of Peers for optimum quality: - EXTRA_SMALL: 2-3 (peers) - SMALL: 3-4 (peers) - MEDIUM: 5-7 (peers) - LARGE: 8-10 (peers) - EXTRA_LARGE: 11-15 (peers) Default value assumed by App Server if room_size not provided: SMALL  
enum SkylinkConfig.SocketTransport Socket transports that could be used for connecting to room. 
enum SkylinkConfig.VideoDevice A list of device(s) that can be the source of a video stream. 
Constants
int DEFAULT_VIDEO_FPS Default Frame rate: 30 fps
int MAX_AUDIO_BITRATE Default maximum bandwidth in kbps allowed for audio: -1 Negative value means that by default audio is not subjected to a maximum bandwidth.
int MAX_DATA_BITRATE Default maximum bandwidth in kbps allowed for data: -1 Negative value means that by default data bitrate is not subjected to a maximum bandwidth.
int MAX_VIDEO_BITRATE Default maximum bandwidth in kbps allowed for video: 512
int VIDEO_HEIGHT_FHD Full HD Video Height: 1080
int VIDEO_HEIGHT_HDR HD Ready Video Height: 720
int VIDEO_HEIGHT_QVGA QVGA Video Height: 240
int VIDEO_HEIGHT_VGA VGA Video Height: 480
int VIDEO_RES_MS_BEFORE_CHECK Default number of milliseconds to wait before automatically calling video resolution check again.
int VIDEO_RES_NUM_CHECK_STABLE Default number of times that video resolutions check return the same resolutions to consider that video resolutions as stable.
int VIDEO_WIDTH_FHD Full HD Video Width: 1920
int VIDEO_WIDTH_HDR HD Ready Video Width: 1280
int VIDEO_WIDTH_QVGA QVGA Video Width: 320
int VIDEO_WIDTH_VGA VGA Video Width: 640
Public Constructors
SkylinkConfig()
Creates a new SkylinkConfig object.
SkylinkConfig(SkylinkConfig config)
Create a SkylinkConfig instance that has the exact same properties as that of the provided SkylinkConfig object.
Public Methods
Map<String, Object> getAdvancedOptions()
Gets the Map of setting advanced options.
int getDefaultVideoFps()
int getDefaultVideoHeight()
int getDefaultVideoWidth()
int getMaxAudioBitrate()
Get the maximum bandwidth in kbps allowed for audio.
int getMaxDataBitrate()
Get the approximate maximum bandwidth in kbps allowed for data.
int getMaxRemotePeersConnected(SkylinkConfig.AudioVideoConfig roomAudioVideoConfig)
Gets the maximum number of remote Peers that we can connect to at one time.
int getMaxVideoBitrate()
Get the maximum bandwidth in kbps allowed for video.
SkylinkConfig.NetworkTransport getNetworkTransport()
SkylinkConfig.AudioCodec getPreferredAudioCodec()
SkylinkConfig.SocketTransport getPreferredSocketTransport()
First SkylinkConfig.SocketTransport to be tried when connecting to room.
int getReconnectAttempts()
The maximum number of times to try to reconnect to room if reconnection is allowed.
int getReconnectionDelay()
The minimum delay in ms before trying next reconnection.
SkylinkConfig.SkylinkRoomSize getSkylinkRoomSize()
Get current SkylinkRoomSize
int getTimeout(SkylinkConfig.SkylinkAction skylinkAction)
Get maximum time (ms) allowed for each action before the action is terminated and/or considered as failed.
int getVideoResNumCheckStable()
Get the value that setVideoResNumCheckStable(int) would set.
int getVideoResNumWaitMs()
Get the value that setVideoResNumWaitMs(int) would set.
boolean hasAudioAutoGainControl()
Check if audio auto gain control by WebRTC is enabled.
boolean hasAudioEchoCancellation()
Check if audio echo cancellation by WebRTC is enabled.
boolean hasAudioHighPassFilter()
Check if audio high pass filter by WebRTC is enabled.
boolean hasAudioNoiseSuppression()
Check if audio noise suppression by WebRTC is enabled.
boolean hasAudioReceive()
boolean hasAudioSend()
boolean hasAudioStereo()
boolean hasDataTransfer()
boolean hasFileTransfer()
boolean hasP2PMessaging()
boolean hasVideoReceive()
boolean hasVideoSend()
boolean isAllowHost()
Checks if HOST candidates are allowed in Peer handshake.
boolean isAllowIceRestart()
Checks whether we allow ICE restart to occur.
boolean isAllowStun()
Checks if STUN candidates are allowed in Peer handshake.
boolean isAllowTurn()
Checks if TURN candidates are allowed in Peer handshake.
boolean isEnableDataChannel()
Checks if DataChannel can be enabled based on this SkylinkConfig.
boolean isEnableH264HighProfile()
Checks whether it is allowed to use H264 High Profile when it is supported.
boolean isEnableIntelVp8Encoder()
Checks whether it is allowed to use Intel Vp8 encoder when it is supported.
boolean isEnableVideoHwAcceleration()
Checks whether it is allowed to use video codec hardware acceleration when it is supported.
boolean isMirrorLocalFrontCameraView()
boolean isReportVideoResolutionOnVideoChange()
Check if video resolutions are automatically reported as defined in setReportVideoResolutionOnVideoChange(boolean).
boolean isReportVideoResolutionUntilStable()
Check if video resolutions are automatically reported as defined in setReportVideoResolutionUntilStable(boolean).
void setAdvancedOption(String option, Object value)
Set key-value for advanced options that are not commonly used.
void setAllowHost(boolean allowHost)
Sets whether HOST candidates are allowed or not.
void setAllowIceRestart(boolean allowIceRestart)
Set whether we allow ICE restart to occur.
void setAllowStun(boolean allowStun)
Sets whether STUN candidates are allowed or not.
void setAllowTurn(boolean allowTurn)
Sets whether TURN candidates are allowed or not.
void setAudioAutoGainControl(boolean hasAudioAutoGainControl)
Set if audio auto gain control by WebRTC should be enabled.
void setAudioEchoCancellation(boolean hasAudioEchoCancellation)
Set if audio echo cancellation by WebRTC should be enabled.
void setAudioHighPassFilter(boolean hasAudioHighPassFilter)
Set if audio high pass filter by WebRTC should be enabled.
void setAudioNoiseSuppression(boolean hasAudioNoiseSuppression)
Set if audio noise suppression by WebRTC should be enabled.
void setAudioStereo(boolean hasAudioStereo)
Sets if audio stereo is enabled.
void setAudioVideoReceiveConfig(SkylinkConfig.AudioVideoConfig audioVideoConfig)
Sets the audio and video (AV) receive config to the SkylinkConfig.AudioVideoConfig value.
void setAudioVideoSendConfig(SkylinkConfig.AudioVideoConfig audioVideoConfig)
Sets the audio and video (AV) send config to the SkylinkConfig.AudioVideoConfig value.
void setDataTransfer(boolean hasDataTransfer)
Sets if dataTransfer is enabled.
void setDefaultVideoFps(int videoFps)
Sets the default video framerate in frames per second (FPS) at which to obtain video.
void setDefaultVideoHeight(int videoHeight)
Sets the default video height at which to obtain video, the next time camera is started.
void setDefaultVideoWidth(int videoWidth)
Sets the default video width at which to obtain video.
void setEnableH264HighProfile(boolean enableH264HighProfile)
Set whether it is allowed to use H264 High Profile when it is supported.
void setEnableIntelVp8Encoder(boolean enableIntelVp8Encoder)
Set whether it is allowed to use Intel Vp8 encoder when it is supported.
void setEnableVideoHwAcceleration(boolean enableVideoHwAcceleration)
Set whether it is allowed to use video codec hardware acceleration when it is supported.
void setFileTransfer(boolean hasFileTransfer)
Sets the fileTransfer is enabled.
void setMaxAudioBitrate(int maxAudioBitrate)
Set the approximate maximum bandwidth in kbps allowed for audio.
void setMaxDataBitrate(int maxDataBitrate)
Set the approximate maximum bandwidth in kbps allowed for data.
void setMaxRemotePeersConnected(int maxPeersConnected, SkylinkConfig.AudioVideoConfig roomAudioVideoConfig)
Sets the maximum number of remote Peers that we can connect to at one time.
void setMaxVideoBitrate(int maxVideoBitrate)
Set the approximate maximum bandwidth in kbps allowed for video.
void setMirrorLocalFrontCameraView(boolean mirrorLocalView)
Sets whether local view rendered is a mirror image of the actual video.
void setMultitrackCreateEnable(boolean enable)
Set if this SkylinkConfig supports multitrack in the SDK after it has been set into the SDK via SkylinkConfig at init(SkylinkConfig, Context, SkylinkCallback).
void setNetworkTransport(SkylinkConfig.NetworkTransport networktransport)
Specifies customised transports for ICE candidates.
void setP2PMessaging(boolean hasPeerMessaging)
Sets if P2P messaging is enabled.
void setPreferredAudioCodec(SkylinkConfig.AudioCodec preferredAudioCodec)
Sets the preferredAudioCodec.
void setPreferredSocketTransport(SkylinkConfig.SocketTransport preferredSocketTransport)
void setReconnectAttempts(int reconnectAttempts)
void setReconnectionDelay(int reconnectionDelay)
void setReportVideoResolutionOnVideoChange(boolean report)
Set if video resolutions are automatically reported when video change.
void setReportVideoResolutionUntilStable(boolean report)
Set whether to automatically continue reporting the currently reported video resolutions until video resolutions (width, height, or fps) stop changing within the latest #videoResNumCheckStable number of times.
void setSkylinkRoomSize(SkylinkConfig.SkylinkRoomSize skylinkRoomSize)
Set room size for current connecting room
void setTimeout(SkylinkConfig.SkylinkAction skylinkAction, int timeout)
Sets the timeout value (in milli seconds) for various operations in the SDK, for e.g.
void setVideoResNumCheckStable(int videoResNumCheckStable)
Set number of consecutive automatic checks where video resolutions remain the same whereby video resolutions is considered to be stable.
void setVideoResNumWaitMs(int videoResNumWaitMs)
Set number of milliseconds between consecutive automatic checks of video resolutions.
String toString()
Generate a string that show some basic parameters of this SkylinkConfig object.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int DEFAULT_VIDEO_FPS

Default Frame rate: 30 fps

Constant Value: 30 (0x0000001e)

public static final int MAX_AUDIO_BITRATE

Default maximum bandwidth in kbps allowed for audio: -1 Negative value means that by default audio is not subjected to a maximum bandwidth.

Constant Value: -1 (0xffffffff)

public static final int MAX_DATA_BITRATE

Default maximum bandwidth in kbps allowed for data: -1 Negative value means that by default data bitrate is not subjected to a maximum bandwidth.

Constant Value: -1 (0xffffffff)

public static final int MAX_VIDEO_BITRATE

Default maximum bandwidth in kbps allowed for video: 512

Constant Value: 512 (0x00000200)

public static final int VIDEO_HEIGHT_FHD

Full HD Video Height: 1080

Constant Value: 1080 (0x00000438)

public static final int VIDEO_HEIGHT_HDR

HD Ready Video Height: 720

Constant Value: 720 (0x000002d0)

public static final int VIDEO_HEIGHT_QVGA

QVGA Video Height: 240

Constant Value: 240 (0x000000f0)

public static final int VIDEO_HEIGHT_VGA

VGA Video Height: 480

Constant Value: 480 (0x000001e0)

public static final int VIDEO_RES_MS_BEFORE_CHECK

Default number of milliseconds to wait before automatically calling video resolution check again.

Constant Value: 275 (0x00000113)

public static final int VIDEO_RES_NUM_CHECK_STABLE

Default number of times that video resolutions check return the same resolutions to consider that video resolutions as stable.

Constant Value: 5 (0x00000005)

public static final int VIDEO_WIDTH_FHD

Full HD Video Width: 1920

Constant Value: 1920 (0x00000780)

public static final int VIDEO_WIDTH_HDR

HD Ready Video Width: 1280

Constant Value: 1280 (0x00000500)

public static final int VIDEO_WIDTH_QVGA

QVGA Video Width: 320

Constant Value: 320 (0x00000140)

public static final int VIDEO_WIDTH_VGA

VGA Video Width: 640

Constant Value: 640 (0x00000280)

Public Constructors

public SkylinkConfig ()

Creates a new SkylinkConfig object.

public SkylinkConfig (SkylinkConfig config)

Create a SkylinkConfig instance that has the exact same properties as that of the provided SkylinkConfig object.

Public Methods

public Map<String, Object> getAdvancedOptions ()

Gets the Map of setting advanced options.

public int getDefaultVideoFps ()

Returns
  • the default video framerate in frames per second (FPS) at which to obtain video.

public int getDefaultVideoHeight ()

Returns
  • the default video height at which to obtain video.

public int getDefaultVideoWidth ()

Returns
  • the default video width at which to obtain video.

public int getMaxAudioBitrate ()

Get the maximum bandwidth in kbps allowed for audio. Negative value indicates that no maximum bandwidth will be imposed.

Returns
  • Maximum bandwidth allowed for audio, negative value if not set.

public int getMaxDataBitrate ()

Get the approximate maximum bandwidth in kbps allowed for data. Negative value indicates that no maximum bandwidth will be imposed.

Returns
  • Maximum bandwidth allowed for data, negative value if not set.

public int getMaxRemotePeersConnected (SkylinkConfig.AudioVideoConfig roomAudioVideoConfig)

Gets the maximum number of remote Peers that we can connect to at one time. Notes: - Use NO_AUDIO_NO_VIDEO for chat/file transfer/ data transfer, AUDIO_ONLY for allowing only audio, VIDEO_ONLY for allowing only video, AUDIO_AND_VIDEO for allowing both audio and video. - VIDEO_ONLY and AUDIO_AND_VIDEO can be considered similarly for getting max peers - Default max peers (if not set) for NO_AUDIO_NO_VIDEO is 16, Default max peers (if not set) for AUDIO_ONLY is 8, Default max peers (if not set) for VIDEO_ONLY is 4, Default max peers (if not set) for AUDIO_AND_VIDEO is 4,

Parameters
roomAudioVideoConfig the setting config for audio and video send/receive

public int getMaxVideoBitrate ()

Get the maximum bandwidth in kbps allowed for video. Negative value indicates that no maximum bandwidth will be imposed.

Returns
  • Maximum bandwidth allowed for video, 512 if not set.

public SkylinkConfig.NetworkTransport getNetworkTransport ()

Returns
  • Custom transport values for ICE candidates, null for no customised transport. Default transport is null

public SkylinkConfig.AudioCodec getPreferredAudioCodec ()

Returns

public SkylinkConfig.SocketTransport getPreferredSocketTransport ()

First SkylinkConfig.SocketTransport to be tried when connecting to room. Default value is WEBSOCKET.

public int getReconnectAttempts ()

The maximum number of times to try to reconnect to room if reconnection is allowed. If allowed, the SDK automatically tries to reconnect to room in following situations: - Connect to room attempt fails, - Disconnected from room unexpectedly. Default value is -1. If value = 0, no reconnection will be done. If value < 0, max reconnection attempt is taken to be infinite.

public int getReconnectionDelay ()

The minimum delay in ms before trying next reconnection. Default value is 1000. If value <= 0, no delay will be used between reconnections.

public SkylinkConfig.SkylinkRoomSize getSkylinkRoomSize ()

Get current SkylinkRoomSize

public int getTimeout (SkylinkConfig.SkylinkAction skylinkAction)

Get maximum time (ms) allowed for each action before the action is terminated and/or considered as failed. if not set before, return the default timeout Following are the timeout values for each SkylinkConfig.SkylinkAction used for setting timeouts: FILE_SEND_REQUEST - Default: 60,000 - If value <= 0, default value will be used. CONNECT_TO_ROOM - Default: 0 - If value <= 0, no timeout will be set. GET_MESSAGE_STORED - Default: 30,000 - If value <= 0, no timeout will be set.

Returns
  • Timeout config value in ms

public int getVideoResNumCheckStable ()

Get the value that setVideoResNumCheckStable(int) would set.

public int getVideoResNumWaitMs ()

Get the value that setVideoResNumWaitMs(int) would set.

public boolean hasAudioAutoGainControl ()

Check if audio auto gain control by WebRTC is enabled. Enabled by default.

public boolean hasAudioEchoCancellation ()

Check if audio echo cancellation by WebRTC is enabled. Enabled by default.

public boolean hasAudioHighPassFilter ()

Check if audio high pass filter by WebRTC is enabled. Enabled by default.

public boolean hasAudioNoiseSuppression ()

Check if audio noise suppression by WebRTC is enabled. Enabled by default.

public boolean hasAudioReceive ()

Returns
  • true if receiving remote peer's audio stream is allowed.

public boolean hasAudioSend ()

Returns
  • true if sending user's audio stream is enabled

public boolean hasAudioStereo ()

Returns
  • true if audio stereo is enabled.

public boolean hasDataTransfer ()

Returns
  • DataTransfer config value.

public boolean hasFileTransfer ()

Returns
  • FileTransfer config value.

public boolean hasP2PMessaging ()

Returns
  • P2P messaging config value.

public boolean hasVideoReceive ()

Returns
  • true if receiving remote peer's video stream is allowed.

public boolean hasVideoSend ()

Returns
  • true if sending user's video stream is enabled

public boolean isAllowHost ()

Checks if HOST candidates are allowed in Peer handshake.

Returns
  • True if allowed, false otherwise.

public boolean isAllowIceRestart ()

Checks whether we allow ICE restart to occur. Note that ICE restart will occur ONLY if: - Both Peers involved in the connection allow it. - It was requested it in the refreshPeerConnection API call. Default is true. Note that ICE restart has to be explicitly requested in refreshConnection(String, boolean, SkylinkCallback). Skylink Media Relay is not allow Ice restart even it is set to true

Returns
  • True if we allow ICE restart to occur, false otherwise.

public boolean isAllowStun ()

Checks if STUN candidates are allowed in Peer handshake.

Returns
  • True if allowed, false otherwise.

public boolean isAllowTurn ()

Checks if TURN candidates are allowed in Peer handshake.

Returns
  • True if allowed, false otherwise.

public boolean isEnableDataChannel ()

Checks if DataChannel can be enabled based on this SkylinkConfig. Note that both this SkylinkConfig and the remote Peer's SkylinkConfig need to have DataChannel enabled in order for the PeerConnection to have DataChannel enabled. DataChannel is to use P2P message, file transfer and data transfer functions

public boolean isEnableH264HighProfile ()

Checks whether it is allowed to use H264 High Profile when it is supported.

public boolean isEnableIntelVp8Encoder ()

Checks whether it is allowed to use Intel Vp8 encoder when it is supported.

public boolean isEnableVideoHwAcceleration ()

Checks whether it is allowed to use video codec hardware acceleration when it is supported.

public boolean isMirrorLocalFrontCameraView ()

Returns
  • mirrorLocalView Whether local front camera video view will be mirrored.

public boolean isReportVideoResolutionOnVideoChange ()

Check if video resolutions are automatically reported as defined in setReportVideoResolutionOnVideoChange(boolean).

Returns
  • True if video resolutions should be automatically reported as above.

public boolean isReportVideoResolutionUntilStable ()

Check if video resolutions are automatically reported as defined in setReportVideoResolutionUntilStable(boolean).

Returns
  • True if video resolutions should be automatically reported as above.

public void setAdvancedOption (String option, Object value)

Set key-value for advanced options that are not commonly used. the default advancedOptions can be obtained via getAdvancedOptions()

Parameters
option The advanced option key
value The advanced option value in Boolean

public void setAllowHost (boolean allowHost)

Sets whether HOST candidates are allowed or not. Default is allowed. If HOST is not allowed, HOST candidates (even if obtained) will not be used in Peer handshake.

Parameters
allowHost True to allow and false otherwise.

public void setAllowIceRestart (boolean allowIceRestart)

Set whether we allow ICE restart to occur. Note that ICE restart will occur ONLY if: - Both Peers involved in the connection allow it. - It was requested it in the refreshPeerConnection API call. Default is true. Note that ICE restart has to be explicitly requested in refreshConnection(String, boolean, SkylinkCallback). Media Relay server is not allow Ice restart even it is set to true

Parameters
allowIceRestart True to allow ICE restart to occur when requested. False will not allow ICE restart to occur in any circumstances.

public void setAllowStun (boolean allowStun)

Sets whether STUN candidates are allowed or not. Default is allowed. If STUN is not allowed, STUN candidates (even if obtained) will not be used in Peer handshake.

Parameters
allowStun True to allow and false otherwise.

public void setAllowTurn (boolean allowTurn)

Sets whether TURN candidates are allowed or not. Default is allowed. If TURN is not allowed, TURN candidates (even if obtained) will not be used in Peer handshake.

Parameters
allowTurn True to allow and false otherwise.

public void setAudioAutoGainControl (boolean hasAudioAutoGainControl)

Set if audio auto gain control by WebRTC should be enabled.

public void setAudioEchoCancellation (boolean hasAudioEchoCancellation)

Set if audio echo cancellation by WebRTC should be enabled.

public void setAudioHighPassFilter (boolean hasAudioHighPassFilter)

Set if audio high pass filter by WebRTC should be enabled.

public void setAudioNoiseSuppression (boolean hasAudioNoiseSuppression)

Set if audio noise suppression by WebRTC should be enabled.

public void setAudioStereo (boolean hasAudioStereo)

Sets if audio stereo is enabled.

Parameters
hasAudioStereo configuration value

public void setAudioVideoReceiveConfig (SkylinkConfig.AudioVideoConfig audioVideoConfig)

Sets the audio and video (AV) receive config to the SkylinkConfig.AudioVideoConfig value. By default (if this method was not called), all AV media sent by remote Peer are received. This method can be used to not receive either audio or video, or both.

Parameters
audioVideoConfig Audio video receive config value

public void setAudioVideoSendConfig (SkylinkConfig.AudioVideoConfig audioVideoConfig)

Sets the audio and video (AV) send config to the SkylinkConfig.AudioVideoConfig value. By default (if this method was not called), both Audio and Video media can be sent to remote Peers. This method can be used to not send of either audio or video, or both.

Parameters
audioVideoConfig Audio video send config value

public void setDataTransfer (boolean hasDataTransfer)

Sets if dataTransfer is enabled.

Parameters
hasDataTransfer DataTransfer config value

public void setDefaultVideoFps (int videoFps)

Sets the default video framerate in frames per second (FPS) at which to obtain video. Same notes at setDefaultVideoHeight(int) apply.

public void setDefaultVideoHeight (int videoHeight)

Sets the default video height at which to obtain video, the next time camera is started. Skylink default is VIDEO_HEIGHT_VGA (480). Notes: - Using video resolution and frame rate not supported by the active camera (device dependent) may result in unexpected video resolution and frame rate or video errors, including not being able to obtain local video. - During actual video streaming WebRTC may still modulate video resolution and frame rate, based on bandwidth available. - If camera is already started, this will not change any video dimension immediately. - Camera input video resolution can be set dynamically via setInputVideoResolution(String, int, int, int, SkylinkCallback).

public void setDefaultVideoWidth (int videoWidth)

Sets the default video width at which to obtain video. Skylink default is VIDEO_WIDTH_VGA (640). Same notes at setDefaultVideoHeight(int) apply.

public void setEnableH264HighProfile (boolean enableH264HighProfile)

Set whether it is allowed to use H264 High Profile when it is supported. Default value is true.

public void setEnableIntelVp8Encoder (boolean enableIntelVp8Encoder)

Set whether it is allowed to use Intel Vp8 encoder when it is supported. Default value is true.

public void setEnableVideoHwAcceleration (boolean enableVideoHwAcceleration)

Set whether it is allowed to use video codec hardware acceleration when it is supported. Default value is true.

public void setFileTransfer (boolean hasFileTransfer)

Sets the fileTransfer is enabled.

Parameters
hasFileTransfer FileTransfer config value

public void setMaxAudioBitrate (int maxAudioBitrate)

Set the approximate maximum bandwidth in kbps allowed for audio. If not set, no bandwidth restriction will be made for audio. To not impose a limit on audio bandwidth, use a negative value.

public void setMaxDataBitrate (int maxDataBitrate)

Set the approximate maximum bandwidth in kbps allowed for data. If not set, no bandwidth restriction will be made for data. To not impose a limit on data bandwidth, use a negative value.

public void setMaxRemotePeersConnected (int maxPeersConnected, SkylinkConfig.AudioVideoConfig roomAudioVideoConfig)

Sets the maximum number of remote Peers that we can connect to at one time. Notes: - Use NO_AUDIO_NO_VIDEO for chat/file transfer/ data transfer, AUDIO_ONLY for allowing only audio, VIDEO_ONLY for allowing only video, AUDIO_AND_VIDEO for allowing both audio and video. - VIDEO_ONLY and AUDIO_AND_VIDEO can be considered similarly for setting max peers - If not set, default is: 16 for room without any audio and any video, 8 for room with audio only, 4 for room with video,

Parameters
maxPeersConnected Maximum number of remote Peers we can connect with at a time.
roomAudioVideoConfig The current setting for audio and video send/receive config

public void setMaxVideoBitrate (int maxVideoBitrate)

Set the approximate maximum bandwidth in kbps allowed for video. If not set, default will be 512 kbps. To not impose a limit on video bandwidth, use a negative value.

public void setMirrorLocalFrontCameraView (boolean mirrorLocalView)

Sets whether local view rendered is a mirror image of the actual video. Default is false. Notes: - Only front (and not back) camera local view will be mirrored. - This will not change (e.g. mirror) the remote video view of us as seen by a remote Peer - Will create a new GLSurfaceView (at onLocalMediaCapture) each time camera is switched. - User need to handle this new GLSurfaceView to display self video correctly.

Parameters
mirrorLocalView True to mirror local view, false to show local view as it is.

public void setMultitrackCreateEnable (boolean enable)

Set if this SkylinkConfig supports multitrack in the SDK after it has been set into the SDK via SkylinkConfig at init(SkylinkConfig, Context, SkylinkCallback). To interop with SDKs that do not support multitrack, this should be set to false. If not enabled: - SDK can only create and hold at most 1 audio and 1 video local media at one time. - To have a different local media from the current existing one, user would need to remove current local media before creating the new one. If enabled: - SDK can potentially create and hold more than 1 local media type at a time, depending also on device capability. Once set into the SDK: - Changing this SkylinkConfig's value no longer affects the SDK's value. - To check SDK's value, use isMultiTrackCreateEnable(). By default, this is set as true.

Parameters
enable Set to True to enable multitrack, false otherwise.

public void setNetworkTransport (SkylinkConfig.NetworkTransport networktransport)

Specifies customised transports for ICE candidates. Set as null (default value) to not customise transports of ICE candidates.

Parameters
networktransport Possible values are UDP or TCP, or null.

public void setP2PMessaging (boolean hasPeerMessaging)

Sets if P2P messaging is enabled. Note that P2P messaging uses DataChannel.

Parameters
hasPeerMessaging PeerMessaging config value

public void setPreferredAudioCodec (SkylinkConfig.AudioCodec preferredAudioCodec)

Sets the preferredAudioCodec. Possible values SkylinkConfig.AudioCodec

public void setPreferredSocketTransport (SkylinkConfig.SocketTransport preferredSocketTransport)

public void setReconnectAttempts (int reconnectAttempts)

public void setReconnectionDelay (int reconnectionDelay)

public void setReportVideoResolutionOnVideoChange (boolean report)

Set if video resolutions are automatically reported when video change. For local video, this includes opening and closing of camera, usage of different org.webrtc.CameraEnumerationAndroid.CaptureFormat, etc. For remote video, this includes starting of video and changes in video dimensions. By default, this is set as true. If true, the video resolution will be resulted in onObtainInputVideoResolution(int, int, int, SkylinkCaptureFormat, String) if input video resolution has been changed, onObtainReceivedVideoResolution(int, int, int, String, String) if received video resolution has been changed, onObtainSentVideoResolution(int, int, int, String, String) if sent video resolution has been changed

Parameters
report Set to True to report video resolutions as above.

public void setReportVideoResolutionUntilStable (boolean report)

Set whether to automatically continue reporting the currently reported video resolutions until video resolutions (width, height, or fps) stop changing within the latest #videoResNumCheckStable number of times. By default, this is set as false.

Parameters
report Set to True to report video resolutions as above.

public void setSkylinkRoomSize (SkylinkConfig.SkylinkRoomSize skylinkRoomSize)

Set room size for current connecting room

public void setTimeout (SkylinkConfig.SkylinkAction skylinkAction, int timeout)

Sets the timeout value (in milli seconds) for various operations in the SDK, for e.g. file transfer waiting time for remote peer's response. If input timeout is not valid, the default value will be set instead

Parameters
skylinkAction the action to be set timeout
timeout Timeout config value in ms

public void setVideoResNumCheckStable (int videoResNumCheckStable)

Set number of consecutive automatic checks where video resolutions remain the same whereby video resolutions is considered to be stable. The default value is given by VIDEO_RES_NUM_CHECK_STABLE.

public void setVideoResNumWaitMs (int videoResNumWaitMs)

Set number of milliseconds between consecutive automatic checks of video resolutions. The default value is given by VIDEO_RES_MS_BEFORE_CHECK.

public String toString ()

Generate a string that show some basic parameters of this SkylinkConfig object.