Description
This API is used to create an intercom instance.
Example
Parameter
Field | Type | Description | Default Value | Required |
---|---|---|---|---|
devId | String | Unique identifier of a device | Yes | |
audioChan | Number | Number of audio channels | 1 | No |
mediaProtocol | String | Media protocol: WS | WS | No |
audioType | String | Audio format: G711A (WS) | G711A | No |
audioSample | Number | Audio sample rate: 8000 (WS) | 8000 | No |
audioBits | Number | Audio sample bit | 16 | No |
audioRate | Number | Audio Bitrate | 0 | No |
optId | String | Operation ID, used for operation logging purposes | "" | No |
expireTime | Number | The address expiration time (in seconds) | 20 | No |
addrType | number | Address type: 1 for WAN, 2 for LAN | 1 | No |
startPrompt | ArrayBuffer | Start intercom prompt sound. PCM format, 8000Hz sample rate, 16-bit, mono channel. | No | |
stopPrompt | ArrayBuffer | Stop intercom prompt sound. PCM format, 8000Hz sample rate, 16-bit, mono channel. | No |
Description
Start intercom.
Example
Description
Stop intercom.
Example
Description
This method is used to obtain the start time of the intercom session, returning the UTC timestamp to the client in milliseconds.
Example
Note: To get the end time, please refer to the afterDestroy hook in HOOKS.
Description
This method is used to obtain the duration of the intercom session (in milliseconds).
Example
Description
Turn off the microphone.
Example
Description
Turn on the microphone.
Example
Description
This property is used to set the play volume on the client side.
Example
This property is used to set the value range as a number, representing the expected channel volume with a range from 0 to 1.