Plug- in file
| File |
Download address |
Description |
| cmsv6player.min.js |
https://v7.cmsv8.com/808gps/open/player/cmsv6player.min.js |
Script file for video plug- in |
| libcmsv6decode.wasm |
https://v7.cmsv8.com/libcmsv6decode.wasm |
Video plug- in wasm file for h265 video decoding |
Integration Description
(1) put cmsv6player.min.js into the web directory and introduce cmsv6player.min.js script file into html file
(2) The libcmsv6decode.wasm needs to be placed under the web root directory.
Initialization parameters
var options = {
domId: "cmsv6flash ",
isVodMode: false
width: width
height: height
lang: "zh"
}
var cmsv6player = new Cmsv6Player(option);
| Parameter name |
Parameter type |
Must |
Example |
Parameter meaning |
| domId |
string |
Yes |
cmsv6flash |
Page HTML tag id attribute |
| isVodMode |
number |
is |
false |
h5 player, if the isVodMode is configured to true during initialization, there can be a playback toolbar and drag operation can be carried out |
| width |
number |
yes |
800 |
video plugin width |
| height |
number |
yes |
600 |
video plug- in height |
| lang |
string |
No |
en |
The language pack type. Default is English |
| excludeVideo |
boolean |
No |
false |
Do not build video window |
| hideSoundBtn |
boolean |
No |
false |
Hide audio button |
| hideToobar |
boolean |
No |
false |
Hide the Live Video toolbar |
| hideFullScreenBtn |
boolean |
No |
false |
Hide Full Screen Button |
| hideShotBtn |
boolean |
No |
false |
Hide the snap |
| enableBigScreenPreviewMainStream |
boolean |
No |
false |
Big Picture Preview Main Code Stream |
| disable264VideoComp |
boolean |
No |
false |
Prevent 264 playback with the video component |
| panorama |
boolean |
No |
false |
8 Panorama Window |
Set language
setLanguage(lang)
| Parameter name |
Parameter type |
Must |
Example |
Parameter meaning |
| lang |
string |
yes |
en |
zh means Chinese, tw means traditional, tr means Turkish, th means Thai pt means Portuguese, er means Arabic, es means Estonian, bg means Bulgarian ru means Russian, ro means Romanian, vi means Vietnamese |
Set the number of windows
setWindowNum(windowNum)
| Parameter name |
Parameter type |
Must |
Example |
Parameter meaning |
| windowNum |
number |
Yes |
16 |
Number of windows (maximum 36) |
Set server information
setServerInfo(ip, port)
| Parameter name |
Parameter type |
Must |
Example |
Parameter meaning |
| ip |
string |
Yes |
v7.cmsv8.com |
Login server ip |
| port |
number |
Yes |
6605 |
Whether https is enabled or not. Both are login server ports, the default is 6605 |
plugin callback events
function onTtxVideoMsg(index,type)
Define onTtxVideoMsg functions directly in js for plug- ins to call
| Parameter name |
Parameter meaning |
| select |
Select Window |
| full |
Full |
| oneMax |
Single Window Full Screen |
| cancelOneMax |
Cancel a single window full screen |
Initialization example
var cmsv6player = null;
function initPlayerExample() {
// false means live video mode with no playback toolbar at the bottom.
// true indicates playback mode with a playback toolbar at the bottom.
var _isVodMode = false;
// zh indicates Chinese, en indicates English
var strLang = "zh ";
// cmsv6flash the ID of the window div element of the video plug- in.
var options = {
domId: "cmsv6flash ",
isVodMode: _isVodMode == "1" ? true : false
width: 800
height: 600
lang: strLang == "" ? "en" : strLang
}
cmsv6player = new Cmsv6Player(options);
initCmsv6Player();
}
// Execute the plug- in after initialization
function initCmsv6Player() {
// Configure the maximum number of windows
cmsv6player.setWindowNum(36);
// reconfigure the current number of windows
cmsv6player.setWindowNum(9);
var serverIp = "v7.cmsv8.com ";
// Whether https is enabled or not. Both are login server ports, the default is 6605
var serverPort = 6605;
// Set server information
cmsv6player.setServerInfo(serverIp, serverPort);
}