Interface description
The following describes the real- time video API of the cmsv6player.min.js plug- in.
The plug- in needs to be loaded before use, see: Initialize plug-in
Https can be directly intercom; Http intercom, you need to download and install PCM audio acquisition tools.
Audio Capture Tool Download Link: https://v7.cmsv8.com/product/CMSV6PcmTool/CMSV6PcmTool.exe
The upper layer judges by onTtxVideoMsg the message callback that type = isTalking indicates that the intercom is in progress, and type = showDownLoadDialog indicates that the pcm collection tool needs to be downloaded.
Start talking
startTalkback(jsession, devIdno, 0)
| Parameter name | Parameter type | Must | Example | Parameter meaning |
|---|---|---|---|---|
| jsession | string | Yes | 66d754dd7f41473dbd2 | Session number returned by user login |
| devIdno | string | Yes | 013300000001 | Device |
Stop talking
stopTalkback()
two- way intercom callback event
| Parameter name | Parameter meaning |
|---|---|
| showDownLoadDialog | Requires PCM audio capture tool download |
| isTalking | Intercom |
| startRecive | Turn on intercom |
| uploadRecive | Turn on intercom |
| loadRecive | Turn on intercom |
| upload | Intercom |
| uploadfull | End of intercom |
| stopTalk | Turn off intercom |
| reciveStreamStop | Intercom exception (network exception, etc.) |
| reciveNetError | Intercom exception (network exception, etc.) |
| reciveStreamNotFound | Intercom exception (network exception, etc.) |
Use Example
See also:
https://v7.cmsv8.com/808gps/open/player/video-demo.html
https://v7.cmsv8.com/808gps/open/player/videoExampleH5.html?lang=en
https://v7.cmsv8.com/808gps/open/player/RealPlayVideo.html?account=cmsv6&password=cmsv6&PlateNum=S66666&lang=en
https://v7.cmsv8.com/808gps/open/player/RealPlayVideo.html?jsession=66d754dd7f41473dbd2&PlateNum=S66666&lang=en
Sample code
// Set intercom parameters
cmsv6player.setTalkParam(1);
// Start two- way intercom
cmsv6player.startTalkback("66d754dd7f41473dbd2", "013300000001", 0);
// onTtxVideoMsg the callback message to determine that type = isTalking indicates that the intercom is in progress, and type = showDownLoadDialog indicates that the pcm collection tool needs to be downloaded.
// Stop intercom
cmsv6player.stopTalkback();
// intercom event
function onTtxVideoMsg(index,type) {
if(type == "showDownLoadDialog") {
// Need to download PCM audio acquisition tool, not https
} else if(type == "isTalking") {
// In intercom
} else if(type == "startRecive") {
// Start receiving intercom data
} else if (type == "uploadRecive") {
// Start uploading intercom data
} else if (type == "loadRecive") {
// Start loading intercom data
} else if (type == "upload") {
// Intercom voice uploading
} else if (type == "uploadfull") {
// Intercom upload cache full
} else if (type == "stopTalk") {
// Turn off intercom
} else if (type == "reciveStreamStop") {
// Intercom exception (audio stream stopped)
} else if (type == "reciveNetError") {
// Intercom exception (network exception, etc.)
} else if (type == "reciveStreamNotFound") {
// Intercom exception (network exception, etc.)
}
}