mobile CCTV,mobile surveillance,police body worn cameras

 forgetPW
 registerNow
search
view: 2720|reply: 8
打印 prevThread nextThread

RTMP url

[copyURL]

6

主题

408

帖子

1618

积分

vipMem

Rank: 6Rank: 6

积分
1618
owner
poston 2017-11-30 16:41 | 显示全部楼层
In the Web Simple, We call the function named 'swOpenEx' to open a SWVideoChanel and preview on a div, So this  process include create a rtmp url and preview.
if want to create an url manually please follow steps below
1、 call function named 'swOpenEx' , it has 4 args , callback , div , prototype, media.  you should set prototype with string "rtmp" . others follow the document or ack here
2、if callback function be called, it mean rtmp url creatd OK, and you can call function 'swGetUrl' to get it


function testOpenVideo() {        var chanel = session.swGetPuChanel('PU_55AA0000', 0);          if (chanel) {            var result = chanel.swOpenEx({                div: null, //if you set a html div element id here we will preview on the div                prototype: 'rtmp', //rtmp > hls //                callback: function (options, response) {                    if(response.emms.code == jSW.RcCode.RC_CODE_S_OK){//if open successfully
                        var rtmpurl = chanel.swGetUrl()
                        alert(rtmpurl );
                    }                    document.getElementById('id_GetUrl_Button').disabled = 'false';                }            });            if (result != jSW.RcCode.RC_CODE_S_OK) {                alert('open error: ' + result);            }        } else {            alert('没有该设备通道');        }    }
reply agree Against

使用道具 report

creditRule

QQ|wireless surveillance

GMT+8, 2024-5-17 07:51 , Processed in 0.056637 second(s), 19 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

QuickReply backToTop BackToList