| | |
| | | url: "https://skyzt.bda.gov.cn/BEApi/getCamerasInfo?cameraIndexCode=" + code, success: function (result) { |
| | | try { |
| | | var data = JSON.parse(result); |
| | | realplay(data.data.url); |
| | | let res; |
| | | if (data.data.url.includes("41")) { |
| | | res = data.data.url.replace("ws://10.117.5.41:559/", "wss://skyzt.bda.gov.cn:443/") |
| | |
| | | res = data.data.url.replace("ws://10.117.5.46:559/", "wss://skyzt.bda.gov.cn:443/") |
| | | } else if (data.data.url.includes("47")) { |
| | | res = data.data.url.replace("ws://10.117.5.47:559/", "wss://skyzt.bda.gov.cn:443/") |
| | | } else if (data.data.url.includes("206")) { |
| | | res = data.data.url.replace("ws://10.117.5.28:559/", "wss://skyzt.bda.gov.cn:443/")//视频最新返回地址 |
| | | } |
| | | realplay(res); |
| | | } catch (e) { |
| | | |
| | | } |
| | | } catch (e) { } |
| | | } |
| | | }); |
| | | } |
| | |
| | | }) |
| | | setSize() |
| | | } |
| | | function arrangeWindow() { |
| | | let splitNum = 1 |
| | | this.player.JS_ArrangeWindow(splitNum).then( |
| | | () => { console.log(`arrangeWindow to ${splitNum}x${splitNum} success`) }, |
| | | e => { console.error(e) } |
| | | ) |
| | | } |
| | | function wholeFullScreen() { |
| | | this.player.JS_FullScreenDisplay(true).then( |
| | | () => { console.log(`wholeFullScreen success`) }, |
| | | e => { console.error(e) } |
| | | ) |
| | | } |
| | | // function arrangeWindow() { |
| | | // let splitNum = 1 |
| | | // this.player.JS_ArrangeWindow(splitNum).then( |
| | | // () => { console.log(`arrangeWindow to ${splitNum}x${splitNum} success`) }, |
| | | // e => { console.error(e) } |
| | | // ) |
| | | // } |
| | | // function wholeFullScreen() { |
| | | // this.player.JS_FullScreenDisplay(true).then( |
| | | // () => { console.log(`wholeFullScreen success`) }, |
| | | // e => { console.error(e) } |
| | | // ) |
| | | // } |
| | | /* 预览&对讲 */ |
| | | function realplay(url) { |
| | | var mode = 1; |
| | | var index = player.currentWindowIndex; |
| | | var playURL = url; |
| | | player.JS_Play(playURL, { playURL, mode }, index).then( |
| | | () => { console.log('realplay success') }, |
| | | e => { console.error(e); } |
| | | () => { |
| | | console.log('realplay success') |
| | | }, |
| | | e => { |
| | | console.error(e); |
| | | } |
| | | ) |
| | | } |
| | | $(function () { |
| | | // init(); |
| | | init(); |
| | | }); |
| | | </script> |
| | | </body> |