| | |
| | | |
| | | </script> |
| | | <script> |
| | | |
| | | var me = new Vue({ |
| | | el: '#appliutwo', |
| | | data: { |
| | |
| | | // } |
| | | axios.get(url).then((res) => { |
| | | console.log(typeof res,34234534345341) |
| | | var data = JSON.parse(res);// JSON转js |
| | | my.ourd = data.data; |
| | | var data = res;// JSON转js |
| | | my.ourd = data.data.data; |
| | | my.deptname = my.ourd.deptName; |
| | | }) |
| | | |
| | |
| | | }, |
| | | }); |
| | | |
| | | |
| | | if (that.ourd.manufacturers == "HK") { |
| | | |
| | | axios({ |
| | | method: "get", |
| | | url: `/api/blade-jfpts/equipment/equipment/selectEquimentPlayInfo?`, |
| | | params: { |
| | | number: that.ourd.deviceNumber, |
| | | }, |
| | | }).then((res) => { |
| | | that.videoSource = res.data.data.data.url; |
| | | if (Hls.isSupported()) { |
| | | var dom = document.getElementById("real_video_conversation"); |
| | | that.hls = new Hls(); |
| | | var m3u8Url = decodeURIComponent(that.videoSource); |
| | | that.hls.loadSource(m3u8Url); |
| | | that.hls.attachMedia(dom); |
| | | that.hls.on(Hls.Events.MANIFEST_PARSED, function () { |
| | | dom.play(); |
| | | }); |
| | | that.hls.on(Hls.Events.ERROR, function (event, data) { |
| | | // console.log(data, 4566824159, "视频播放有问题!!!"); |
| | | if (data.fatal) { |
| | | switch (data.type) { |
| | | case Hls.ErrorTypes.NETWORK_ERROR: |
| | | // try to recover network error |
| | | console.log( |
| | | "fatal network error encountered, try to recover" |
| | | ); |
| | | that.hls.startLoad(); |
| | | break; |
| | | case Hls.ErrorTypes.MEDIA_ERROR: |
| | | console.log( |
| | | "fatal media error encountered, try to recover" |
| | | ); |
| | | that.hls.recoverMediaError(); |
| | | break; |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | |
| | | |
| | | }else{ |
| | | //this.form.serialNumber |
| | | newAxios |
| | | .post( |
| | |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | } |
| | | }, |
| | | watch: { |
| | | activeName() { |
| | |
| | | dataType: 'JSON', |
| | | url: "/api/blade-jfpts/equipment/equipment/selectEquimentPlayInfo?number=" + deviceNumber + "&bmp=" + "m3u8" + "&manufacturer=" + manufacturer, |
| | | success: function (data) { |
| | | realStartVideo($('.realtime-view-video-box video')[0], data.data.address) |
| | | realStartVideo($('.realtime-view-video-box video')[0], data.data.data.url) |
| | | } |
| | | }) |
| | | }else { |
| | |
| | | `/api/blade-jfpts/equipment/equipment/selectEquimentPlayInfo?number=${deviceNumber}&bmp=m3u8&manufacturer=${manufacturer}` |
| | | ) |
| | | .then((result) => { |
| | | that.videoSource = result.data.data.address; |
| | | that.videoSource = result.data.data.data.url; |
| | | that.shipingM3u8Url = decodeURIComponent(that.videoSource); |
| | | that.shipingPopupShow = true; |
| | | }) |
| | |
| | | `/api/blade-jfpts/equipment/equipment/selectEquimentPlayInfo?number=${deviceNumber}&bmp=m3u8&manufacturer=${manufacturer}` |
| | | ) |
| | | .then((result) => { |
| | | that.videoSource = result.data.data.address; |
| | | that.videoSource = result.data.data.data.url; |
| | | that.shipingM3u8Url = decodeURIComponent(that.videoSource); |
| | | that.shipingPopupShow = true; |
| | | }) |
| | |
| | | }, |
| | | methods: { |
| | | realOpenVideoDialog () { |
| | | Recorder.getPermission().then(() => { }); |
| | | Recorder.getPermission().then(() => { |
| | | }); |
| | | this.videoConversationReal = true; |
| | | }, |
| | | // 视频通话打开关闭事件 |
| | |
| | | }, |
| | | }); |
| | | |
| | | if (this.form.manufacturers == "HK") { |
| | | |
| | | axios({ |
| | | method: "get", |
| | | url: `/api/blade-jfpts/equipment/equipment/selectEquimentPlayInfo?`, |
| | | params: { |
| | | number: that.form.deviceNumber, |
| | | }, |
| | | }).then((data) => { |
| | | console.log(data) |
| | | that.videoSource = data.data.data.data.url; |
| | | |
| | | if (Hls.isSupported()) { |
| | | var dom = document.getElementById("real_video_conversation"); |
| | | |
| | | that.hls = new Hls(); |
| | | |
| | | var m3u8Url = decodeURIComponent(that.videoSource); |
| | | |
| | | that.hls.loadSource(m3u8Url); |
| | | |
| | | that.hls.attachMedia(dom); |
| | | |
| | | that.hls.on(Hls.Events.MANIFEST_PARSED, function () { |
| | | dom.play(); |
| | | }); |
| | | |
| | | that.hls.on(Hls.Events.ERROR, function (event, data) { |
| | | console.log(data, 4566824159, "视频播放有问题!!!"); |
| | | if (data.fatal) { |
| | | switch (data.type) { |
| | | case Hls.ErrorTypes.NETWORK_ERROR: |
| | | // try to recover network error |
| | | console.log( |
| | | "fatal network error encountered, try to recover" |
| | | ); |
| | | that.hls.startLoad(); |
| | | break; |
| | | case Hls.ErrorTypes.MEDIA_ERROR: |
| | | console.log( |
| | | "fatal media error encountered, try to recover" |
| | | ); |
| | | that.hls.recoverMediaError(); |
| | | break; |
| | | default: |
| | | // cannot recover |
| | | that.hls.destroy(); |
| | | break; |
| | | } |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | }); |
| | | |
| | | } else { |
| | | //this.form.serialNumber |
| | | newAxios |
| | | .post( |
| | |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | }, |
| | | closeRealVideoBox () { |
| | | var dom = document.getElementById("real_video_conversation"); |
| | |
| | | params: { |
| | | jid: row.id, |
| | | }, |
| | | }).then((resdata) => { }); |
| | | }).then((resdata) => { |
| | | }); |
| | | // that.onLoad(that.page, that.query); |
| | | if (t == "办结") { |
| | | // location.reload(); |
| | |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | }); |
| | |
| | | params: { |
| | | jid: row.id, |
| | | }, |
| | | }).then((resdata) => { }); |
| | | }).then((resdata) => { |
| | | }); |
| | | // that.onLoad(that.page, that.query); |
| | | if (t == "办结") { |
| | | // location.reload(); |
| | |
| | | `/api/blade-jfpts/equipment/equipment/selectEquimentPlayInfo?number=${deviceNumber}&bmp=m3u8&manufacturer=${manufacturer}` |
| | | ) |
| | | .then((result) => { |
| | | that.videoSource = result.data.data.address; |
| | | that.videoSource = result.data.data.data.url; |
| | | if (Hls.isSupported()) { |
| | | var dom = document.getElementById( |
| | | "real_video_conversationDataL" |
| | |
| | | proxy: { |
| | | '/api': { |
| | | //本地服务接口地址 |
| | | //target: 'http://192.168.0.109:82/', |
| | | //target: 'http://localhost:82/', |
| | | target: 'https://web.byisf.com/api/', |
| | | //远程演示服务地址,可用于直接启动项目 |
| | | //target: 'https://saber.bladex.vip/api', |