- Description:
TRROMediaObserver Interface
TRROMediaObserver Interface
Methods
onMqttConnectionState(param) → {function}
- Description:
MQTT connection state callback
Parameters:
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
param |
Object |
Properties
|
Returns:
- Type
- function
onSignalingState(param, roomId) → {function}
- Description:
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}
- Description:
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
onDataChannelState(param) → {void|function}
- Description:
Data channel state callback
Parameters:
| Name | Type | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
param |
Object |
Properties
|
Returns:
-
- Type
- void
-
- Type
- function
onConnected(param) → {function}
- Description:
Field device connection callback
Parameters:
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
param |
Object | Callback data Properties
|
Returns:
- Type
- function
onDisconnected(param) → {function}
- Description:
Field device disconnection callback
Parameters:
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
param |
Object | Callback data Properties
|
Returns:
- Type
- function
onTrackPublishState(param) → {function}
- Description:
Video stream publish/unpublish callback
Parameters:
| Name | Type | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
param |
Object | Callback data Properties
|
Returns:
- Type
- function
onControlData(param) → {function}
- Description:
DataChannel custom message callback
Parameters:
| Name | Type | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
param |
Object | Callback data Properties
|
Returns:
- Type
- function
onKick(param) → {function}
- Description:
Kickout callback
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
param |
Object | Callback data Properties
|
Returns:
- Type
- function
onPermissionStateChange(param) → {function}
- Description:
Permission state change callback
Parameters:
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
param |
Object | Callback data Properties
|
Returns:
- Type
- function
onError(param) → {function}
- Description:
Error notification
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
param |
Object | Callback data Properties
|
Returns:
- Type
- function
onEvent(param) → {function}
- Description:
Event callback
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
param |
OnEventResponse | Callback data Properties
|
Returns:
- Type
- function