fix:升级 jessibuca到jessibuca-pro;解决海康264和h265视频流无法播放问题

pull/611/head
liudan 2022-09-16 10:45:08 +08:00
parent 7462e2776b
commit b73d08879d
4 changed files with 392 additions and 287 deletions

View File

@ -1,5 +1,6 @@
<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-left">
<i v-if="!playing" class="iconfont icon-play jessibuca-btn" @click="playBtnClick"></i>
@ -89,20 +90,26 @@ export default {
let options = {};
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,
videoBuffer: 0.2, //
isResize: true,
decoder: "static/js/jessibuca/decoder.js",
useMSE: false,
showBandwidth: false,
isFlv: true,
useMSE: true,
debug: false,
useWCS:true,
useSIMD: false,
// showBandwidth: false,
// isFlv: true,
wcsUseVideoRender:true,
// autoWasm:true,
// text: "WVP-PRO",
// background: "static/images/zlm-logo.png",
loadingText: "加载中",
hasAudio: typeof (this.hasAudio) == "undefined" ? true : this.hasAudio,
debug: false,
// hasAudio: typeof (this.hasAudio) == "undefined" ? true : this.hasAudio,
debug: true,
hasVideo:true,
supportDblclickFullscreen: false, //
operateBtns: {
fullscreen: false,
@ -111,10 +118,9 @@ export default {
audio: false,
recorder: false,
},
record: "record",
vod: this.vod,
forceNoOffscreen: this.forceNoOffscreen,
isNotMute: this.isNotMute,
isNotMute: false,
heartTimeout: 10,
forceNoOffscreen: true,
},
options
));
@ -224,13 +230,13 @@ export default {
jessibucaPlayer[this._uid].on("play", () => {
this.playing = true;
this.loaded = true;
this.quieting = jessibuca.quieting;
// this.quieting = jessibuca.quieting;
});
if (jessibucaPlayer[this._uid].hasLoaded()) {
jessibucaPlayer[this._uid].play(url);
} else {
jessibucaPlayer[this._uid].on("load", () => {
console.log("load 播放")
console.log("load 播放", 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