@@ -327,11 +264,18 @@ import rtcPlayer from '../dialog/rtcPlayer.vue'
import LivePlayer from '@liveqing/liveplayer'
import crypto from 'crypto'
import jessibucaPlayer from '../common/jessibuca.vue'
+import PtzPreset from "../common/ptzPreset.vue";
+import PtzCruising from "../common/ptzCruising.vue";
+import ptzScan from "../common/ptzScan.vue";
+import ptzWiper from "../common/ptzWiper.vue";
+import ptzSwitch from "../common/ptzSwitch.vue";
+import mediaInfo from "../common/mediaInfo.vue";
export default {
name: 'devicePlayer',
props: {},
components: {
+ PtzPreset,PtzCruising,ptzScan,ptzWiper,ptzSwitch,mediaInfo,
LivePlayer, jessibucaPlayer, rtcPlayer,
},
computed: {
@@ -363,9 +307,10 @@ export default {
},
showVideoDialog: false,
streamId: '',
+ ptzMethod: 'preset',
+ ptzPresetId: '',
app: '',
mediaServerId: '',
- convertKey: '',
deviceId: '',
channelId: '',
tabActiveName: 'media',
@@ -384,7 +329,6 @@ export default {
scanSpeed: 100,
scanGroup: 0,
tracks: [],
- coverPlaying: false,
tracksLoading: false,
showPtz: true,
showRrecord: true,
@@ -484,63 +428,6 @@ export default {
}
return this.videoUrl;
- },
- coverPlay: function () {
- var that = this;
- this.coverPlaying = true;
- this.$refs[this.activePlayer].pause()
- that.$axios({
- method: 'post',
- url: '/api/play/convert/' + that.streamId
- }).then(function (res) {
- if (res.data.code === 0) {
- that.convertKey = res.data.key;
- setTimeout(() => {
- that.isLoging = false;
- that.playFromStreamInfo(false, res.data.data);
- }, 2000)
- } else {
- that.isLoging = false;
- that.coverPlaying = false;
- that.$message({
- showClose: true,
- message: '转码失败',
- type: 'error'
- });
- }
- }).catch(function (e) {
- console.log(e)
- that.coverPlaying = false;
- that.$message({
- showClose: true,
- message: '播放错误',
- type: 'error'
- });
- });
- },
- convertStopClick: function () {
- this.convertStop(() => {
- this.$refs[this.activePlayer].play(this.videoUrl)
- });
- },
- convertStop: function (callback) {
- var that = this;
- that.$refs.videoPlayer.pause()
- this.$axios({
- method: 'post',
- url: '/api/play/convertStop/' + this.convertKey
- }).then(function (res) {
- if (res.data.code == 0) {
- console.log(res.data.msg)
- } else {
- console.error(res.data.msg)
- }
- if (callback) callback();
- }).catch(function (e) {
- });
- that.coverPlaying = false;
- that.convertKey = "";
- // if (callback )callback();
},
playFromStreamInfo: function (realHasAudio, streamInfo) {
@@ -562,10 +449,6 @@ export default {
this.videoUrl = '';
this.coverPlaying = false;
this.showVideoDialog = false;
- if (this.convertKey != '') {
- this.convertStop();
- }
- this.convertKey = ''
this.stopBroadcast()
},
@@ -595,8 +478,22 @@ export default {
console.log('云台控制:' + command);
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
+ method: 'get',
+ url: '/api/front-end/ptz/' + this.deviceId + '/' + this.channelId + '?command=' + command + '&horizonSpeed=' + parseInt(this.controSpeed * 255/100) + '&verticalSpeed=' + parseInt(this.controSpeed * 255/100) + '&zoomSpeed=' + parseInt(this.controSpeed * 16/100)
+ }).then(function (res) {
+ });
+ },
+ irisCamera: function (command) {
+ this.$axios({
+ method: 'get',
+ url: '/api/front-end/fi/iris/' + this.deviceId + '/' + this.channelId + '?command=' + command + '&speed=' + parseInt(this.controSpeed * 255/100)
+ }).then(function (res) {
+ });
+ },
+ focusCamera: function (command) {
+ this.$axios({
+ method: 'get',
+ url: '/api/front-end/fi/focus/' + this.deviceId + '/' + this.channelId + '?command=' + command + '&speed=' + parseInt(this.controSpeed * 255/100)
}).then(function (res) {
});
},
@@ -1001,4 +898,14 @@ export default {
width: 80%;
padding: 0 10%;
}
+.el-dialog__body{
+ padding: 10px 20px;
+}
+.ptz-btn-box {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ padding: 0 2rem;
+ height: 3rem;
+ line-height: 4rem;
+}
diff --git a/web_src/src/components/dialog/regionEdit.vue b/web_src/src/components/dialog/regionEdit.vue
index 780a824f0..561e81b40 100644
--- a/web_src/src/components/dialog/regionEdit.vue
+++ b/web_src/src/components/dialog/regionEdit.vue
@@ -4,6 +4,7 @@
width="65rem"
top="2rem"
center
+ :append-to-body="true"
:close-on-click-modal="false"
:visible.sync="showVideoDialog"
:destroy-on-close="false"
diff --git a/web_src/src/components/dialog/shareChannelAdd.vue b/web_src/src/components/dialog/shareChannelAdd.vue
index 69b0a6263..b49623450 100755
--- a/web_src/src/components/dialog/shareChannelAdd.vue
+++ b/web_src/src/components/dialog/shareChannelAdd.vue
@@ -1,115 +1,106 @@
-
-