64850858
2021-07-14 e48ef997c03b49c8090970f5fbb29ce80b0ac6df
web_src/src/components/dialog/devicePlayer.vue
@@ -151,7 +151,8 @@
<script>
// import player from '../dialog/rtcPlayer.vue'
// import LivePlayer from '@liveqing/liveplayer'
import player from '../dialog/easyPlayer.vue'
// import player from '../dialog/easyPlayer.vue'
import player from '../dialog/jessibuca.vue'
export default {
    name: 'devicePlayer',
    props: {},
@@ -270,10 +271,18 @@
            this.hasaudio = hasAudio;
            this.isLoging = false;
            // this.videoUrl = streamInfo.rtc;
            this.videoUrl = streamInfo.ws_flv;
            this.videoUrl = this.getUrlByStreamInfo(streamInfo);
            this.streamId = streamInfo.streamId;
            this.app = streamInfo.app;
            this.playFromStreamInfo(false, streamInfo)
        },
        getUrlByStreamInfo(streamInfo){
            let baseZlmApi = process.env.NODE_ENV === 'development'?`${location.host}/debug/zlm`:`${location.host}/zlm`
            console.log(12121212)
            console.log(baseZlmApi)
            // return `${baseZlmApi}/${streamInfo.app}/${streamInfo.streamId}.flv`;
            // return `http://${baseZlmApi}/${streamInfo.app}/${streamInfo.streamId}.flv`;
            return streamInfo.ws_flv;
        },
        coverPlay: function () {
            var that = this;
@@ -335,7 +344,7 @@
        playFromStreamInfo: function (realHasAudio, streamInfo) {
          this.showVideoDialog = true;
          this.hasaudio = realHasAudio && this.hasaudio;
          this.$refs.videoPlayer.play(streamInfo.ws_flv)
          this.$refs.videoPlayer.play(this.getUrlByStreamInfo(streamInfo))
        },
        close: function () {
            console.log('关闭视频');
@@ -417,8 +426,9 @@
                        row.endTime
                }).then(function (res) {
                    var streamInfo = res.data;
                    that.app = streamInfo.app;
                    that.streamId = streamInfo.streamId;
                    that.videoUrl = streamInfo.ws_flv;
                    that.videoUrl = that.getUrlByStreamInfo(streamInfo);
                    that.recordPlay = true;
                });
            }