From a23c1aca403204571c992e33cff547ca3093d04d Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期三, 10 一月 2024 19:14:11 +0800
Subject: [PATCH] 合并269分支修复的内容
---
web_src/src/components/dialog/devicePlayer.vue | 27 +++++++++++++++++----------
1 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/web_src/src/components/dialog/devicePlayer.vue b/web_src/src/components/dialog/devicePlayer.vue
old mode 100644
new mode 100755
index c7fde47..a5cff5d
--- a/web_src/src/components/dialog/devicePlayer.vue
+++ b/web_src/src/components/dialog/devicePlayer.vue
@@ -1,7 +1,7 @@
<template>
<div id="devicePlayer" v-loading="isLoging">
- <el-dialog title="瑙嗛鎾斁" top="0" :close-on-click-modal="false" :visible.sync="showVideoDialog" @close="close()">
+ <el-dialog title="瑙嗛鎾斁" top="0" :close-on-click-modal="false" :visible.sync="showVideoDialog" @close="close()" v-if="showVideoDialog">
<div style="width: 100%; height: 100%">
<el-tabs type="card" :stretch="true" v-model="activePlayer" @tab-click="changePlayer" v-if="Object.keys(this.player).length > 1">
<!-- <el-tab-pane label="LivePlayer" name="livePlayer">-->
@@ -14,7 +14,6 @@
<rtc-player v-if="activePlayer === 'webRTC'" ref="webRTC" :visible.sync="showVideoDialog" :videoUrl="videoUrl" :error="videoError" :message="videoError" height="100px" :hasAudio="hasAudio" fluent autoplay live ></rtc-player>
</el-tab-pane>
<el-tab-pane label="h265web">h265web鏁鏈熷緟</el-tab-pane>
- <el-tab-pane label="wsPlayer">wsPlayer 鏁鏈熷緟</el-tab-pane>
</el-tabs>
<jessibucaPlayer v-if="Object.keys(this.player).length == 1 && this.player.jessibuca" ref="jessibuca" :visible.sync="showVideoDialog" :videoUrl="videoUrl" :error="videoError" :message="videoError" height="100px" :hasAudio="hasAudio" fluent autoplay live ></jessibucaPlayer>
<rtc-player v-if="Object.keys(this.player).length == 1 && this.player.webRTC" ref="jessibuca" :visible.sync="showVideoDialog" :videoUrl="videoUrl" :error="videoError" :message="videoError" height="100px" :hasAudio="hasAudio" fluent autoplay live ></rtc-player>
@@ -320,7 +319,7 @@
if (tab.name === "codec") {
this.$axios({
method: 'get',
- url: './zlm/' +this.mediaServerId+ '/index/api/getMediaInfo?vhost=__defaultVhost__&schema=rtsp&app='+ this.app +'&stream='+ this.streamId
+ url: '/zlm/' +this.mediaServerId+ '/index/api/getMediaInfo?vhost=__defaultVhost__&schema=rtsp&app='+ this.app +'&stream='+ this.streamId
}).then(function (res) {
that.tracksLoading = false;
if (res.data.code == 0 && res.data.tracks) {
@@ -397,7 +396,7 @@
this.$refs[this.activePlayer].pause()
that.$axios({
method: 'post',
- url: './api/play/convert/' + that.streamId
+ url: '/api/play/convert/' + that.streamId
}).then(function (res) {
if (res.data.code === 0) {
that.convertKey = res.data.key;
@@ -434,7 +433,7 @@
that.$refs.videoPlayer.pause()
this.$axios({
method: 'post',
- url: './api/play/convertStop/' + this.convertKey
+ url: '/api/play/convertStop/' + this.convertKey
}).then(function (res) {
if (res.data.code == 0) {
console.log(res.data.msg)
@@ -451,7 +450,15 @@
playFromStreamInfo: function (realHasAudio, streamInfo) {
this.showVideoDialog = true;
this.hasaudio = realHasAudio && this.hasaudio;
- this.$refs[this.activePlayer].play(this.getUrlByStreamInfo(streamInfo))
+ if (this.$refs[this.activePlayer]) {
+ this.$refs[this.activePlayer].play(this.getUrlByStreamInfo(streamInfo))
+ }else {
+ this.$nextTick(() => {
+ this.$refs[this.activePlayer].play(this.getUrlByStreamInfo(streamInfo))
+ });
+ }
+
+
},
close: function () {
console.log('鍏抽棴瑙嗛');
@@ -494,7 +501,7 @@
let that = this;
this.$axios({
method: 'post',
- url: './api/ptz/control/' + this.deviceId + '/' + this.channelId + '?command=' + command + '&horizonSpeed=' + this.controSpeed + '&verticalSpeed=' + this.controSpeed + '&zoomSpeed=' + this.controSpeed
+ url: '/api/ptz/control/' + this.deviceId + '/' + this.channelId + '?command=' + command + '&horizonSpeed=' + this.controSpeed + '&verticalSpeed=' + this.controSpeed + '&zoomSpeed=' + this.controSpeed
}).then(function (res) {});
},
//////////////////////鎾斁鍣ㄤ簨浠跺鐞�//////////////////////////
@@ -506,7 +513,7 @@
let that = this;
this.$axios({
method: 'post',
- url: './api/ptz/front_end_command/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '¶meter1=0¶meter2=' + presetPos + '&combindCode2=0'
+ url: '/api/ptz/front_end_command/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '¶meter1=0¶meter2=' + presetPos + '&combindCode2=0'
}).then(function (res) {});
},
setSpeedOrTime: function (cmdCode, groupNum, parameter) {
@@ -516,7 +523,7 @@
console.log('鍓嶇鎺у埗锛�0x' + cmdCode.toString(16) + ' 0x' + groupNum.toString(16) + ' 0x' + parameter2.toString(16) + ' 0x' + combindCode2.toString(16));
this.$axios({
method: 'post',
- url: './api/ptz/front_end_command/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '¶meter1=' + groupNum + '¶meter2=' + parameter2 + '&combindCode2=' + combindCode2
+ url: '/api/ptz/front_end_command/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '¶meter1=' + groupNum + '¶meter2=' + parameter2 + '&combindCode2=' + combindCode2
}).then(function (res) {});
},
setCommand: function (cmdCode, groupNum, parameter) {
@@ -524,7 +531,7 @@
console.log('鍓嶇鎺у埗锛�0x' + cmdCode.toString(16) + ' 0x' + groupNum.toString(16) + ' 0x' + parameter.toString(16) + ' 0x0');
this.$axios({
method: 'post',
- url: './api/ptz/front_end_command/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '¶meter1=' + groupNum + '¶meter2=' + parameter + '&combindCode2=0'
+ url: '/api/ptz/front_end_command/' + this.deviceId + '/' + this.channelId + '?cmdCode=' + cmdCode + '¶meter1=' + groupNum + '¶meter2=' + parameter + '&combindCode2=0'
}).then(function (res) {});
},
copyUrl: function (dropdownItem){
--
Gitblit v1.8.0