fix:升级 jessibuca到jessibuca-pro;解决海康264和h265视频流无法播放问题
parent
7462e2776b
commit
b73d08879d
|
@ -1,5 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div ref="container" @dblclick="fullscreenSwich" style="width:100%;height:100%;background-color: #000000;margin:0 auto;">
|
<div ref="container" @dblclick="fullscreenSwich"
|
||||||
|
style="width:100%;height:100%;background-color: #000000;margin:0 auto;">
|
||||||
<div class="buttons-box" id="buttonsBox">
|
<div class="buttons-box" id="buttonsBox">
|
||||||
<div class="buttons-box-left">
|
<div class="buttons-box-left">
|
||||||
<i v-if="!playing" class="iconfont icon-play jessibuca-btn" @click="playBtnClick"></i>
|
<i v-if="!playing" class="iconfont icon-play jessibuca-btn" @click="playBtnClick"></i>
|
||||||
|
@ -89,20 +90,26 @@ export default {
|
||||||
let options = {};
|
let options = {};
|
||||||
console.log("hasAudio " + this.hasAudio)
|
console.log("hasAudio " + this.hasAudio)
|
||||||
|
|
||||||
jessibucaPlayer[this._uid] = new window.Jessibuca(Object.assign(
|
jessibucaPlayer[this._uid] = new window.JessibucaPro(Object.assign(
|
||||||
{
|
{
|
||||||
container: this.$refs.container,
|
container: this.$refs.container,
|
||||||
videoBuffer: 0.2, // 最大缓冲时长,单位秒
|
videoBuffer: 0.2, // 最大缓冲时长,单位秒
|
||||||
isResize: true,
|
isResize: true,
|
||||||
decoder: "static/js/jessibuca/decoder.js",
|
decoder: "static/js/jessibuca/decoder.js",
|
||||||
useMSE: false,
|
useMSE: true,
|
||||||
showBandwidth: false,
|
debug: false,
|
||||||
isFlv: true,
|
useWCS:true,
|
||||||
|
useSIMD: false,
|
||||||
|
// showBandwidth: false,
|
||||||
|
// isFlv: true,
|
||||||
|
wcsUseVideoRender:true,
|
||||||
|
// autoWasm:true,
|
||||||
// text: "WVP-PRO",
|
// text: "WVP-PRO",
|
||||||
// background: "static/images/zlm-logo.png",
|
// background: "static/images/zlm-logo.png",
|
||||||
loadingText: "加载中",
|
loadingText: "加载中",
|
||||||
hasAudio: typeof (this.hasAudio) == "undefined" ? true : this.hasAudio,
|
// hasAudio: typeof (this.hasAudio) == "undefined" ? true : this.hasAudio,
|
||||||
debug: false,
|
debug: true,
|
||||||
|
hasVideo:true,
|
||||||
supportDblclickFullscreen: false, // 是否支持屏幕的双击事件,触发全屏,取消全屏事件。
|
supportDblclickFullscreen: false, // 是否支持屏幕的双击事件,触发全屏,取消全屏事件。
|
||||||
operateBtns: {
|
operateBtns: {
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
|
@ -111,10 +118,9 @@ export default {
|
||||||
audio: false,
|
audio: false,
|
||||||
recorder: false,
|
recorder: false,
|
||||||
},
|
},
|
||||||
record: "record",
|
isNotMute: false,
|
||||||
vod: this.vod,
|
heartTimeout: 10,
|
||||||
forceNoOffscreen: this.forceNoOffscreen,
|
forceNoOffscreen: true,
|
||||||
isNotMute: this.isNotMute,
|
|
||||||
},
|
},
|
||||||
options
|
options
|
||||||
));
|
));
|
||||||
|
@ -224,13 +230,13 @@ export default {
|
||||||
jessibucaPlayer[this._uid].on("play", () => {
|
jessibucaPlayer[this._uid].on("play", () => {
|
||||||
this.playing = true;
|
this.playing = true;
|
||||||
this.loaded = true;
|
this.loaded = true;
|
||||||
this.quieting = jessibuca.quieting;
|
// this.quieting = jessibuca.quieting;
|
||||||
});
|
});
|
||||||
if (jessibucaPlayer[this._uid].hasLoaded()) {
|
if (jessibucaPlayer[this._uid].hasLoaded()) {
|
||||||
jessibucaPlayer[this._uid].play(url);
|
jessibucaPlayer[this._uid].play(url);
|
||||||
} else {
|
} else {
|
||||||
jessibucaPlayer[this._uid].on("load", () => {
|
jessibucaPlayer[this._uid].on("load", () => {
|
||||||
console.log("load 播放")
|
console.log("load 播放", url)
|
||||||
jessibucaPlayer[this._uid].play(url);
|
jessibucaPlayer[this._uid].play(url);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue