|
function testOpenVideo() {
var puid = 'PU_21839321';
var chanel = session.swGetPuChanel(puid, 0);
var strVideoDivId = document.getElementById('id_JustUrl_NoPlay').checked == true ? null : 'id_video';
if (chanel) {
var result = chanel.swOpenEx({
div: strVideoDivId,
prototype: 'rtmp', //rtmp > hls
callback: function (options, response) {
alert(response.emms.code + "视频打开成功,可以获取URl了");
document.getElementById('id_GetUrl_Button').disabled = 'false';
}
});
if (result != jSW.RcCode.RC_CODE_S_OK) {
alert('打开视频失败: ' + result);
document.getElementById('id_GetUrl_Button').disabled = 'true';
}
} else {
alert('没有该设备通道');
}
} |
|