Closed xia0j closed 2 years ago
this.jessibuca = new window.Jessibuca(Object.assign( { container: this.$refs.container, videoBuffer: 0.2, // 最大缓冲时长,单位秒 isResize: true, isFlv: true, decoder: '/decoder.js', // text: "WVP-PRO", // background: "bg.jpg", loadingText: '加载中...', // hasAudio: typeof (this.hasAudio) == 'undefined' ? true : this.hasAudio, debug: false, supportDblclickFullscreen: false, // 是否支持屏幕的双击事件,触发全屏,取消全屏事件。 // showBandwidth: this.kBps, // 显示网速 operateBtns: { fullscreen: false, screenshot: false, // play: true, audio: false }, hotKey : false , hasAudio : false , useWCS: true , record: 'record', vod: this.vod, forceNoOffscreen: true, isNotMute: false },
play: function(url , i) { this.currentNum = i if (this.jessibuca) { this.destroy() } this.jessibuca.on('play', () => { this.playing = true this.loaded = true this.quieting = this.jessibuca.quieting })
if (this.jessibuca.hasLoaded()) { this.jessibuca.play(url) } else { this.jessibuca.on('load', () => { this.jessibuca.play(url) this.jessibuca.setScaleMode(0) }) } },
直接这样就行了 this.jessibuca.play(url) 试试看
this.jessibuca = new window.Jessibuca(Object.assign( { container: this.$refs.container, videoBuffer: 0.2, // 最大缓冲时长,单位秒 isResize: true, isFlv: true, decoder: '/decoder.js', // text: "WVP-PRO", // background: "bg.jpg", loadingText: '加载中...', // hasAudio: typeof (this.hasAudio) == 'undefined' ? true : this.hasAudio, debug: false, supportDblclickFullscreen: false, // 是否支持屏幕的双击事件,触发全屏,取消全屏事件。 // showBandwidth: this.kBps, // 显示网速 operateBtns: { fullscreen: false, screenshot: false, // play: true, audio: false }, hotKey : false , hasAudio : false , useWCS: true , record: 'record', vod: this.vod, forceNoOffscreen: true, isNotMute: false },
play: function(url , i) { this.currentNum = i if (this.jessibuca) { this.destroy() } this.jessibuca.on('play', () => { this.playing = true this.loaded = true this.quieting = this.jessibuca.quieting })