增加zlm代理的secret自动添加, 增加配置文件的默认值,缺少非关键参数不会无法启动,简化配置文件给新手带来的压力,前端使用wvp代理流。

This commit is contained in:
64850858
2021-06-04 16:31:45 +08:00
parent 8aaac8c431
commit 1b677c6dc7
17 changed files with 290 additions and 129 deletions

View File

@@ -270,11 +270,18 @@ export default {
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`;
},
coverPlay: function () {
var that = this;
this.coverPlaying = true;
@@ -335,7 +342,7 @@ export default {
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('关闭视频');
@@ -418,7 +425,7 @@ export default {
}).then(function (res) {
var streamInfo = res.data;
that.streamId = streamInfo.streamId;
that.videoUrl = streamInfo.ws_flv;
that.videoUrl = this.getUrlByStreamInfo(streamInfo);
that.recordPlay = true;
});
}

View File

@@ -55,7 +55,6 @@ axios.interceptors.response.use(function (response) {
Vue.prototype.$cookies.config(60*30);
new Vue({
router: router,
render: h => h(App),