UserAgent

class UserAgent(val context: Context, options: UserAgent.UserAgentOptions)

The UserAgent serves as the base to use apiRTC. A user agent can be authenticated or not. For an Apizee cloud user, the uri is prefixed with 'apizee:'. He can be anonymous if it's a client of an Apizee enterprise and use prefix apzkey: as uri. Once registered, its Session object can be used to communicate with other contacts using the platform on the same API key and CCS server

Parameters

options

all user connection options

Constructors

Link copied to clipboard
fun UserAgent(context: Context, options: UserAgent.UserAgentOptions)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class CreateStreamOptions(var videoInputId: String? = null, val constraints: UserAgent.CreateStreamOptions.Constraints = Constraints())
Link copied to clipboard
data class DisconnectOptions(val unused: Any?)
Link copied to clipboard
data class MediaDeviceList(    val audioinput: List<UserAgent.MediaDeviceList.MediaDevice>,     val audiooutput: List<UserAgent.MediaDeviceList.MediaDevice>,     val videoinput: List<UserAgent.MediaDeviceList.MediaDevice>)
Link copied to clipboard
data class RegisterInformation(    val cloudUrl: String,     val ccsConnectionRetryNb: Int? = null,     val ccsConnectionRetryDelay: Long? = null,     val id: Long = Random.nextLong(1000000, 9000000000000000),     var groups: ArrayList<String>? = null,     var subscribeTo: ArrayList<String>? = null,     val userData: JSONObject? = null)
Link copied to clipboard
data class UserAgentOptions(val uri: String)

Functions

Link copied to clipboard
fun createDisplayMediaStream(options: UserAgent.CreateStreamOptions?, videoCapturer: VideoCapturer): Promise

A promise for creating a screensharing stream object

Link copied to clipboard
fun createStream(options: UserAgent.CreateStreamOptions?): Promise

A promise for creating a stream object

Link copied to clipboard
fun destroy()

destroy this UserAgent

Link copied to clipboard
fun getBrowser(): String

Get UserAgent browser name

Link copied to clipboard
fun getBrowserVersion(): String

Get UserAgent browser version

Link copied to clipboard
fun getOsName(): String

Get UserAgent OS name

Link copied to clipboard
fun getOsVersion(): String

Get UserAgent OS version

Link copied to clipboard
fun getUserMediaDevices(): UserAgent.MediaDeviceList

return user media devices

Link copied to clipboard
fun register(options: UserAgent.RegisterInformation): Promise

Register a UA to the server.

Link copied to clipboard
fun unregister(options: UserAgent.DisconnectOptions? = DisconnectOptions(null))

Unregisters this UserAgent

Properties

Link copied to clipboard
val context: Context

Application context