@@ -293,12 +269,13 @@ 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,
+ PtzPreset,PtzCruising,ptzScan,ptzWiper,ptzSwitch,mediaInfo,
LivePlayer, jessibucaPlayer, rtcPlayer,
},
computed: {
@@ -334,7 +311,6 @@ export default {
ptzPresetId: '',
app: '',
mediaServerId: '',
- convertKey: '',
deviceId: '',
channelId: '',
tabActiveName: 'media',
@@ -353,7 +329,6 @@ export default {
scanSpeed: 100,
scanGroup: 0,
tracks: [],
- coverPlaying: false,
tracksLoading: false,
showPtz: true,
showRrecord: true,
@@ -453,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) {
@@ -531,10 +449,6 @@ export default {
this.videoUrl = '';
this.coverPlaying = false;
this.showVideoDialog = false;
- if (this.convertKey != '') {
- this.convertStop();
- }
- this.convertKey = ''
this.stopBroadcast()
},