| | |
| | | import Hls from "hls.js"; |
| | | import Recorder from "js-audio-recorder"; |
| | | |
| | | var newAxios = axios.create({ |
| | | baseURL: "https://web.byisf.com:18000", |
| | | withCredentials: false, |
| | | headers: { |
| | | "Content-type": "application/x-www-form-urlencoded", |
| | | }, |
| | | }); |
| | | |
| | | export default { |
| | | name: "logo", |
| | | data() { |
| | |
| | | url: "/api/blade-jfpts/alarm/alarm/selecttx?id=" + that.deviceId, |
| | | method: "post", |
| | | }).then(function (response) { |
| | | console.log(response, 11111111); |
| | | var userId = JSON.parse( |
| | | window.localStorage.getItem("物联网安保云服务平台-userInfo") |
| | | ).content.user_id; |
| | |
| | | that.peopleName = that.form.oneContacts; |
| | | that.peoplePhone = that.form.onePhone; |
| | | that.dialogTableVisible = true; |
| | | Recorder.getPermiRecorderssion().then(() => {}); |
| | | // Recorder.getPermiRecorderssion().then(() => {}); |
| | | |
| | | newAxios |
| | | .post( |
| | | "/api_control", |
| | | {}, |
| | | { |
| | | params: { |
| | | param: JSON.stringify({ PktType: "GetAccessToken" }), |
| | | }, |
| | | } |
| | | ) |
| | | .then((res) => { |
| | | newAxios |
| | | .get( |
| | | `https://web.byisf.com:18000/GetPlayUrl?deviceCode=${that.form.serialNumber}&chl=${that.form.channelNumber}` |
| | | ) |
| | | .then((result) => { |
| | | axios({ |
| | | method: "post", |
| | | url: `/api/blade-jfpts/rvideo/rVoid`, |
| | | timeout: 600000, |
| | | params: { |
| | | sourcePath: result.data.data.flv, |
| | | jid: that.form.id, |
| | | }, |
| | | }).then((resdata) => { |
| | | }); |
| | | }); |
| | | }); |
| | | |
| | | that.ofX = null; |
| | | that.ofY = null; |
| | | |
| | |
| | | |
| | | // 视频通话打开关闭事件 |
| | | openRealVideoBox() { |
| | | var newAxios = axios.create({ |
| | | baseURL: "https://web.byisf.com:18000", |
| | | withCredentials: false, |
| | | headers: { |
| | | "Content-type": "application/x-www-form-urlencoded", |
| | | }, |
| | | }); |
| | | |
| | | newAxios |
| | | .post( |
| | | "/api_control", |
| | |
| | | }, |
| | | |
| | | //启动websocket |
| | | websocketStart(){ |
| | | websocketStart() { |
| | | if (!window.WebSocket) { |
| | | window.WebSocket = window.MozWebSocket; |
| | | } |
| | |
| | | //http |
| | | // window.socket = new WebSocket("ws://localhost:9034/websocket"); |
| | | |
| | | window.socket.onmessage = function (event) { |
| | | }; |
| | | window.socket.onmessage = function (event) {}; |
| | | |
| | | window.socket.onopen = function (event) { |
| | | }; |
| | | window.socket.onopen = function (event) {}; |
| | | |
| | | window.socket.onclose = function (event) { |
| | | }; |
| | | window.socket.onclose = function (event) {}; |
| | | } else { |
| | | console.log("WebSocket连接没有建立成功!!"); |
| | | } |
| | | |
| | | setTimeout(function () { |
| | | |
| | | window.clearTimeout(window.websockPing); |
| | | |
| | | if(!window.WebSocket){ |
| | | if (!window.WebSocket) { |
| | | return; |
| | | } |
| | | if(window.socket.readyState == WebSocket.OPEN){ |
| | | |
| | | if (window.socket.readyState == WebSocket.OPEN) { |
| | | var userId = JSON.parse( |
| | | window.localStorage.getItem("物联网安保云服务平台-userInfo") |
| | | ).content.user_id; |