| | |
| | | .then((result) => { |
| | | axios({ |
| | | method: "post", |
| | | url: `/api/blade-jfpts/rvideo/rVoid`, |
| | | timeout: 600000, |
| | | url: `/api/blade-jfpts/rvideo/rVoids`, |
| | | params: { |
| | | sourcePath: result.data.data.flv, |
| | | jid: that.form.id, |
| | | url: result.data.data.flv, |
| | | }, |
| | | }).then((resdata) => {}); |
| | | }); |
| | |
| | | this.videoConversationReal = false; |
| | | this.oldVideoSatart = false; |
| | | }, |
| | | |
| | | getDate() { |
| | | // 当前时间 |
| | | var timestamp = Date.parse(new Date()); |
| | |
| | | ) |
| | | .then(function () { |
| | | that.dialogTableVisible = false; |
| | | |
| | | axios({ |
| | | method: "post", |
| | | url: `/api/blade-jfpts/rvideo/stop`, |
| | | params: { |
| | | jid: row.id, |
| | | }, |
| | | }).then((resdata) => {}); |
| | | |
| | | that.$router.push({ |
| | | path: "/policeTracking/track", |
| | |
| | | |
| | | //启动websocket |
| | | websocketStart() { |
| | | var that = this; |
| | | |
| | | if (!window.WebSocket) { |
| | | window.WebSocket = window.MozWebSocket; |
| | | } |
| | |
| | | window.socket.onopen = function (event) {}; |
| | | |
| | | window.socket.onclose = function (event) {}; |
| | | window.socket.error = function (event) { |
| | | //执行重连 |
| | | that.websocketStart(); |
| | | }; |
| | | } else { |
| | | console.log("WebSocket连接没有建立成功!!"); |
| | | } |
| | |
| | | |
| | | //开启心跳传送 |
| | | window.websockPing = setInterval(function () { |
| | | |
| | | if (window.socket.readyState == WebSocket.OPEN) { |
| | | window.socket.send("ping"); |
| | | }else{ |
| | | } else { |
| | | console.log("心跳停止,断开重连"); |
| | | //断开连接,重连 |
| | | window.clearTimeout(window.websockPing); |
| | | //执行重连 |
| | | this.websocketStart(); |
| | | that.websocketStart(); |
| | | } |
| | | |
| | | |
| | | }, 10000); |
| | | } else { |
| | | console.log("WebSocket连接没有建立成功!!"); |
| | | //执行重连 |
| | | this.websocketStart(); |
| | | that.websocketStart(); |
| | | } |
| | | }, 3000); |
| | | }, |