Description
Create an intercom instance
Example
Parameters
Field | Type | Description | Default Value | Required |
---|---|---|---|---|
devId | String | Device unique identifier | Yes | |
audioChan | Number | Number of audio channels | 1 | No |
mediaProtocol | String | Media Protocol: WS | WS | No |
audioType | String | Audio format: G711A (WS), AAC (RTMP) | G711A | No |
audioSample | Number | Audio sample rate: 8000 (WS), 48000 (RTMP) | 8000 | No |
audioBits | Number | Number of audio sample bits | 16 | No |
audioRate | Number | Audio bit rate | 0 | No |
optId | String | Business operation ID, which can be used for operation trace records | "" | No |
expireTime | Number | Address expiration time in seconds | 20 | No |
addrType | number | Address type: 1: External network address; 2: Intranet address | 1 | No |
startPrompt | buffer | Start prompt tone, PCM format, 16-bit, 8000Hz sample rate, mono channel | No | |
stopPrompt | buffer | End prompt sound, PCM format, 16-bit, 8000Hz sample rate, mono channel | No |
Description
Start intercom
Example
Description
Stop intercom
Example
Description
Get the start time of the intercom and return the client UTC timestamp in milliseconds.
Example
Note: If you want to get the end time, please refer to afterDestroy in HOOKS
Description
Get the duration of the intercom, in milliseconds.
Example
Description
Enable microphone, resume microphone collection
Example
Description
Disable microphone, send mute command to device
Example
Description
Set client playback volume
Example
Set value range: Number, expected channel volume, range 0 - 1