FastBee/docker/data/nginx/vue/static/js/chunk-49694dbc.eb1d5487.js
2025-07-07 09:21:15 +08:00

1 line
4.5 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-49694dbc"],{"3b3a":function(e,o,n){"use strict";n.r(o);var t=function(){var e=this,o=e.$createElement,n=e._self._c||o;return n("div",{ref:"container",staticStyle:{width:"100%",height:"100%","background-color":"#000000",margin:"0 auto"},on:{dblclick:e.fullscreenSwich}})},i=[],u=n("c7eb"),s=n("1da1"),c={},l={name:"jessibuca",data:function(){return{playing:!1,isNotMute:!1,quieting:!1,fullscreen:!1,loaded:!1,speed:0,performance:"",kBps:0,btnDom:null,videoInfo:null,volume:1,rotate:0,vod:!0,forceNoOffscreen:!1}},props:["videoUrl","error","hasAudio","height"],mounted:function(){var e=this;window.onerror=function(e){},console.log(this._uid);var o=decodeURIComponent(this.$route.params.url);this.$nextTick((function(){e.updatePlayerDomSize(),window.onresize=function(){e.updatePlayerDomSize()},"undefined"==typeof e.videoUrl&&(e.videoUrl=o),e.btnDom=document.getElementById("buttonsBox"),console.log("初始化时的地址为: "+e.videoUrl),e.play(e.videoUrl)}))},watch:{videoUrl:function(e,o){this.play(e)},immediate:!0},methods:{updatePlayerDomSize:function(){var e=this.$refs.container,o=e.parentNode.clientWidth,n=9/16*o,t=Math.min(document.body.clientHeight,document.documentElement.clientHeight);n>t&&(n=t,o=16/9*n),e.style.width=o+"px",e.style.height=n+"px"},create:function(){var e={};c[this._uid]=new window.JessibucaPro(Object.assign({container:this.$refs.container,autoWasm:!0,background:"",controlAutoHide:!1,debug:!1,debugLevel:"debug",decoder:"/js/jessibuca-pro/decoder-pro.js",forceNoOffscreen:!0,hasAudio:"undefined"==typeof this.hasAudio||this.hasAudio,hasVideo:!0,heartTimeout:5,heartTimeoutReplay:!0,heartTimeoutReplayTimes:3,hiddenAutoPause:!1,hotKey:!1,isFlv:!1,isFullResize:!1,isNotMute:this.isNotMute,isResize:!1,keepScreenOn:!1,loadingText:"请稍等, 视频加载中......",loadingTimeout:10,loadingTimeoutReplay:!0,loadingTimeoutReplayTimes:3,openWebglAlignment:!1,operateBtns:{fullscreen:!0,zoom:!0,ptz:!1,play:!0},recordType:"webm",rotate:0,showBandwidth:!1,supportDblclickFullscreen:!1,timeout:10,useMSE:"localhost"!==location.hostname&&"https:"!==location.protocol,useOffscreen:!1,useWCS:"localhost"===location.hostname||"https"===location.protocol,useWebFullScreen:!1,videoBuffer:0,wasmDecodeAudioSyncVideo:!0,wasmDecodeErrorReplay:!0,wcsUseVideoRender:!0},e));var o=c[this._uid],n=this;o.on("load",(function(){console.log("on load init")})),o.on("log",(function(e){console.log("on log",e)})),o.on("record",(function(e){console.log("on record:",e)})),o.on("pause",(function(){n.playing=!1,n.loaded=!0})),o.on("play",(function(){n.playing=!0,n.loaded=!0})),o.on("fullscreen",(function(e){console.log("on fullscreen",e),n.fullscreen=e})),o.on("mute",(function(e){console.log("on mute",e),n.isNotMute=!e})),o.on("audioInfo",(function(e){console.log("audioInfo",e)}));o.on("timeUpdate",(function(e){e})),o.on("performance",(function(e){var o="卡顿";2===e?o="非常流畅":1===e&&(o="流畅"),n.performance=o})),o.on("kBps",(function(e){n.kBps=Math.round(e)}))},play:function(e){var o=this;c[this._uid]?this.destroy().then((function(){c[o._uid]&&c[o._uid].hasLoaded()?c[o._uid].play(e):c[o._uid].on("load",(function(){console.log("load 播放"),c[o._uid].play(e)}))})):(this.create(),c[this._uid]&&c[this._uid].hasLoaded()?c[this._uid].play(e):c[this._uid].on("load",(function(){console.log("load 播放"),c[o._uid].play(e)})))},pause:function(){c[this._uid]&&c[this._uid].pause(),this.playing=!1,this.err="",this.performance=""},screenshot:function(){c[this._uid]&&c[this._uid].screenshot()},mute:function(){c[this._uid]&&c[this._uid].mute()},cancelMute:function(){c[this._uid]&&c[this._uid].cancelMute()},destroy:function(){var e=Object(s["a"])(Object(u["a"])().mark((function e(){var o=this;return Object(u["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!c[this._uid]){e.next=3;break}return e.next=3,c[this._uid].destroy().then((function(){c[o._uid]=null,o.playing=!1,o.create()}));case 3:case"end":return e.stop()}}),e,this)})));function o(){return e.apply(this,arguments)}return o}(),fullscreenSwich:function(){var e=this.isFullscreen();c[this._uid].setFullscreen(!e),this.fullscreen=!e},isFullscreen:function(){return document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||!1}},destroyed:function(){c[this._uid]&&c[this._uid].destroy(),this.playing=!1,this.loaded=!1,this.performance=""}},r=l,a=(n("c2f5"),n("2877")),d=Object(a["a"])(r,t,i,!1,null,null,null);o["default"]=d.exports},b7cc:function(e,o,n){},c2f5:function(e,o,n){"use strict";n("b7cc")}}]);