648540858
2022-08-09 116d979d87f53f878a8c930cfad2c6a7cc831b19
web_src/src/components/dialog/devicePlayer.vue
@@ -298,6 +298,7 @@
<script>
import rtcPlayer from '../dialog/rtcPlayer.vue'
import crypto from 'crypto'
// import LivePlayer from '@liveqing/liveplayer'
// import player from '../dialog/easyPlayer.vue'
import jessibucaPlayer from '../common/jessibuca.vue'
@@ -388,7 +389,7 @@
                    url: '/zlm/' +this.mediaServerId+ '/index/api/getMediaInfo?vhost=__defaultVhost__&schema=rtmp&app='+ this.app +'&stream='+ this.streamId
                }).then(function (res) {
                    that.tracksLoading = false;
                    if (res.data.code == 0 && res.data.online) {
                    if (res.data.code == 0 && res.data.tracks) {
                        that.tracks = res.data.tracks;
                    }else{
                        that.tracksNotLoaded = true;
@@ -861,6 +862,10 @@
            }
        },
        startBroadcast(url){
          // 获取推流鉴权KEY
          console.log(this.$loginUser)
          console.log(this.$loginUser.pushKey)
          url += "&sign=" + crypto.createHash('md5').update(this.$loginUser.pushKey, "utf8").digest('hex')
          console.log("开始语音对讲: " + url)
          this.broadcastRtc = new ZLMRTCClient.Endpoint({
            debug: true, // 是否打印日志
@@ -915,7 +920,7 @@
              this.broadcastStatus = 0;
            }else if (e === "connected") {
              this.broadcastStatus = 1;
            }else {
            }else if (e === "disconnected") {
              this.broadcastStatus = -1;
            }
          });