public class

SkylinkConfig

extends Object
implements Serializable
java.lang.Object
   ↳ sg.com.temasys.skylink.sdk.config.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.AudioVideoConfig List of enums that specify an audio video setting. 
Fields
public static int MAX_PEERS
public static int MAX_VIDEO_FPS
public static int MAX_VIDEO_HEIGHT
public static int MAX_VIDEO_WIDTH
Public Constructors
SkylinkConfig()
Creates a new SkylinkConfig object.
Public Methods
Map<StringObject> getAdvancedOptions()
int getMaxPeers()
SkylinkConfig.AudioCodec getPreferredAudioCodec()
int getTimeout()
String getTransport()
int getVideoFps()
int getVideoHeight()
int getVideoWidth()
boolean hasAudioReceive()
boolean hasAudioSend()
boolean hasDataTransfer()
boolean hasFileTransfer()
boolean hasPeerMessaging()
boolean hasVideoReceive()
boolean hasVideoSend()
boolean isMirrorLocalView()
boolean isStereoAudio()
boolean isStunDisabled()
boolean isTurnDisabled()
void setAdvancedOptions(Map<StringObject> advancedOptions)
Sets advanced options.
void setAudioVideoReceiveConfig(SkylinkConfig.AudioVideoConfig audioVideoConfig)
Sets the audio video receive flag to the indicated boolean value.
void setAudioVideoSendConfig(SkylinkConfig.AudioVideoConfig audioVideoConfig)
Sets the audio video send and receive flag to the indicated boolean value.
void setHasDataTransfer(boolean dataTransfer)
Sets if dataTransfer is enabled.
void setHasFileTransfer(boolean fileTransfer)
Sets the fileTransfer is enabled.
void setHasPeerMessaging(boolean peerMessaging)
Sets if peerMessaging is enabled.
void setMaxPeers(int maxPeers)
Sets the maximum number of Peers that we can connect to at one time.
void setMirrorLocalView(boolean mirrorLocalView)
Sets whether local view rendered is a mirror image of the actual video.
void setPreferredAudioCodec(SkylinkConfig.AudioCodec preferredAudioCodec)
Sets the preferredAudioCodec.
void setStereoAudio(boolean stereoAudio)
Sets if stereo audio is enabled.
void setTimeout(int timeout)
Sets the timeout value (in seconds) for various operations in the SDK, for e.g.
void setVideoFps(int videoFps)
Sets the video FPS
void setVideoHeight(int videoHeight)
Sets the video height.
void setVideoWidth(int videoWidth)
Sets the video width
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static int MAX_PEERS

public static int MAX_VIDEO_FPS

public static int MAX_VIDEO_HEIGHT

public static int MAX_VIDEO_WIDTH

Public Constructors

public SkylinkConfig ()

Creates a new SkylinkConfig object.

Public Methods

public Map<StringObject> getAdvancedOptions ()

Returns
  • Map of Advanced Options.

public int getMaxPeers ()

Returns
  • Gets the maximum number of Peers that we can connect to at one time.

public SkylinkConfig.AudioCodec getPreferredAudioCodec ()

Returns

public int getTimeout ()

Returns
  • Timeout config value.

public String getTransport ()

Returns
  • transport used. Possible values are "UDP" or "TCP"

public int getVideoFps ()

Returns
  • the video FPS

public int getVideoHeight ()

Returns
  • the video height

public int getVideoWidth ()

Returns
  • the video width

public boolean hasAudioReceive ()

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

public boolean hasAudioSend ()

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

public boolean hasDataTransfer ()

Returns
  • DataTransfer config value.

public boolean hasFileTransfer ()

Returns
  • FileTransfer config value.

public boolean hasPeerMessaging ()

Returns
  • PeerMessaging config value.

public boolean hasVideoReceive ()

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

public boolean hasVideoSend ()

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

public boolean isMirrorLocalView ()

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

public boolean isStereoAudio ()

Returns
  • true if stereo audio is used

public boolean isStunDisabled ()

Returns
  • STUN is enabled or not

public boolean isTurnDisabled ()

Returns
  • TURN is enabled or not

public void setAdvancedOptions (Map<StringObject> advancedOptions)

Sets advanced options. (For advanced users only).

Parameters
advancedOptions A map containing optional entries as follows: "STUN":"boolean" or "STUN",boolean "TURN":"boolean", or "TURN":boolean "transport":"UDP" or "transport":"TCP"

public void setAudioVideoReceiveConfig (SkylinkConfig.AudioVideoConfig audioVideoConfig)

Sets the audio video receive flag to the indicated boolean value.

Parameters
audioVideoConfig Audio video receive config value

public void setAudioVideoSendConfig (SkylinkConfig.AudioVideoConfig audioVideoConfig)

Sets the audio video send and receive flag to the indicated boolean value.

Parameters
audioVideoConfig Audio video send config value

public void setHasDataTransfer (boolean dataTransfer)

Sets if dataTransfer is enabled.

Parameters
dataTransfer DataTransfer config value

public void setHasFileTransfer (boolean fileTransfer)

Sets the fileTransfer is enabled.

Parameters
fileTransfer FileTransfer config value

public void setHasPeerMessaging (boolean peerMessaging)

Sets if peerMessaging is enabled.

Parameters
peerMessaging PeerMessaging config value

public void setMaxPeers (int maxPeers)

Sets the maximum number of Peers that we can connect to at one time. If not set, default is 4, i.e. we can connect up to 4 Peers at one time.

Parameters
maxPeers Timeout config value

public void setMirrorLocalView (boolean mirrorLocalView)

Sets whether local view rendered is a mirror image of the actual video.

Default is false.

When set to true:

  • 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 setPreferredAudioCodec (SkylinkConfig.AudioCodec preferredAudioCodec)

Sets the preferredAudioCodec. Possible values SkylinkConfig.AudioCodec

public void setStereoAudio (boolean stereoAudio)

Sets if stereo audio is enabled.

Parameters
stereoAudio configuration value

public void setTimeout (int timeout)

Sets the timeout value (in seconds) for various operations in the SDK, for e.g. file transfer waiting time for remote peer's response.

Parameters
timeout Timeout config value

public void setVideoFps (int videoFps)

Sets the video FPS

public void setVideoHeight (int videoHeight)

Sets the video height.

public void setVideoWidth (int videoWidth)

Sets the video width

public String toString ()