TRROMediaObserver Interface
Methods
onMqttConnectionState(param) → {function}
MQTT connection state callback
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
param |
Object |
Properties
|
Returns:
- Type
- function
onSignalingState(param, roomId) → {function}
Signaling state callback
Parameters:
Name | Type | Description |
---|---|---|
param |
Object | |
roomId |
string | Signaling room ID |
param.state |
string | socket.io-client built-in events, refer to: https://socket.io/docs/v2/client-api/#events |
param.data |
Object | Parameters for socket.io-client built-in events, refer to: https://socket.io/docs/v2/client-api/#events |
Returns:
- Type
- function
onPeerConnectionState(param) → {function}
Peer connection state change callback
CONNECTED = 0 Connection successful
NEW = 1 New connection
CONNECTING = 2 Connecting
FAILED = 3 Connection failed
DISCONNECTED = 4 Connection disconnected
CLOSED = 5 Actively closed
RECONNECTING = 6 Reconnecting
NOT_SUPPORT = 255 Browser doesn't support WebRTC
LIMIT_EXCEEDED = 256 PeerConnection count has reached browser limit
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
param |
Object | Connection state code Properties
|
Returns:
- Type
- function
onConnected(param) → {function}
Field device connection callback
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
param |
Object | Callback data Properties
|
Returns:
- Type
- function
onDisconnected(param) → {function}
Field device disconnection callback
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
param |
Object | Callback data Properties
|
Returns:
- Type
- function
onTrackPublishState(param) → {function}
Video stream publish/unpublish callback
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
param |
Object | Callback data Properties
|
Returns:
- Type
- function
onControlData(param) → {function}
DataChannel custom message callback
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
param |
Object | Callback data Properties
|
Returns:
- Type
- function
onKick(param) → {function}
Kickout callback
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
param |
Object | Callback data Properties
|
Returns:
- Type
- function
onPermissionStateChange(param) → {function}
Permission state change callback
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
param |
Object | Callback data Properties
|
Returns:
- Type
- function
onError(param) → {function}
Error notification
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
param |
Object | Callback data Properties
|
Returns:
- Type
- function
onEvent(param) → {function}
Event callback
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
param |
OnEventResponse | Callback data Properties
|
Returns:
- Type
- function