| | |
| | | }) |
| | | } |
| | | }) |
| | | $("#getFocusPos").click(function () { |
| | | cameraId = $('#select option:selected').val(); |
| | | opt = {"cameraId": cameraId, "channelNum": 1}; |
| | | $.ajax({ |
| | | headers: { |
| | | 'Accept': 'application/json', |
| | | 'Content-Type': 'application/json', |
| | | 'Authorization': token |
| | | }, |
| | | url: "../hik/getFocusPos", |
| | | type: "post", |
| | | dataType: "json", |
| | | data: JSON.stringify(opt), |
| | | success: function (datas) { |
| | | console.log(datas); |
| | | $("#focus").val(datas.data.dwFocus); |
| | | } |
| | | }) |
| | | }) |
| | | var heateRpwronflag = true; |
| | | $("#HeateRpwron").click(function () { |
| | | cameraId = $('#select option:selected').val(); |
| | |
| | | //预览海康相机 |
| | | function realViewHik(serverip, elem, username, password, ipaddr, port) { |
| | | // webRtcServer = new WebRtcStreamer(elem, "http://" + serverip + ":8000"); |
| | | webRtcServer = new WebRtcStreamer(elem, "http://192.168.1.227:9000"); |
| | | webRtcServer = new WebRtcStreamer(elem, "http://192.168.1.227:8000"); |
| | | let rtspUrl = "rtsp://" + username + ":" + password + "@" + ipaddr + ":" + port + "/ch1/main/av_stream"; |
| | | let option = "rtptransport=tcp"; |
| | | console.log("rtsp地址:" + rtspUrl); |