WatchRTC

class WatchRTC(config: WatchRTCConfig?, dataProvider: RtcDataProvider)

Parameters

config

@see WatchRTCConfig

dataProvider

implementation of RTC stats data collection

Constructors

Link copied to clipboard
fun WatchRTC(dataProvider: RtcDataProvider)

Note: setConfig must be called before connect in case config is not passed in the constructor

Link copied to clipboard
fun WatchRTC(config: WatchRTCConfig?, dataProvider: RtcDataProvider)

Functions

Link copied to clipboard
fun addEvent(    name: String,     type: EventType,     parameters: Any? = null)

Send custom events to WatchRTC's backend.

Link copied to clipboard
fun addKeys(keys: HashMap<String, ArrayList<String>>)

Will be sent to WatchRTC's backend.

Link copied to clipboard
fun connect(config: WatchRTCConfig? = null)

Initialize connection to WatchRTC's backend. Should be called once peer connection is open

Link copied to clipboard
fun disconnect()

Closes connection to WatchRTC's backend. Should be called once the peer connection is closed.

Link copied to clipboard
fun log(logLevel: LogLevel, text: String)

Log debug messages to WatchRTC's server

Link copied to clipboard
fun setConfig(config: WatchRTCConfig)

Set WatchRTC configuration

Link copied to clipboard
fun setUserRating(rating: Int, ratingComment: String = "")

Set user provided rating with an optional comment.

Link copied to clipboard
fun trace(eventName: String, data: Any?): Boolean

Send RTC related events to WatchRTC's backend.

Properties

Link copied to clipboard
var isConnected: Boolean = false