diff --git a/iot-web/public/components/car/parkingAreaTotalControlVideo/parkingAreaTotalControlVideo.js b/iot-web/public/components/car/parkingAreaTotalControlVideo/parkingAreaTotalControlVideo.js index fd5b760383a1c18f209a595acc280b3b1767d536..8b2e713da37ed742971e1f311de8a2bea0891a33 100644 --- a/iot-web/public/components/car/parkingAreaTotalControlVideo/parkingAreaTotalControlVideo.js +++ b/iot-web/public/components/car/parkingAreaTotalControlVideo/parkingAreaTotalControlVideo.js @@ -1,6 +1,7 @@ /** 入驻小区 **/ +import HuaXiaVideo from "api/3d/HuaXiaVideo.js"; (function (vc) { vc.extends({ data: { @@ -64,6 +65,18 @@ } }) }, + _showHuaXiaCameraVideo: function (wsUrl, _div) { + let jMap = $that.parkingAreaTotalControlVideoInfo.jessibuca; + let huaXiaVideo = jMap[_div]; + if (huaXiaVideo) { + huaXiaVideo.destroy(); + } + + let imgId = _div.replace('receiverDiv', 'receiver'); + let _huaXiaVideo = new HuaXiaVideo(wsUrl, imgId); + _huaXiaVideo.playVideo(); + jMap[_div] = _huaXiaVideo; + }, _showCarInoutMachineInoutInfo: function (_data) { if (_data.action != 'FEE_INFO') { return; @@ -127,6 +140,14 @@ wsUrl = _machine.machineIp; + let _hmId = _machine.hmId; + + if (_hmId == "24") { + wsUrl = "ws://" + wsUrl+":9999"; + $that._showHuaXiaCameraVideo(wsUrl, "receiverDiv" + _machine.machineId); + return; + } + wsUrl = wsUrl.replace(':8131', ':9080'); let _protocol = window.location.protocol;