suyuan-breed/public/admin/assets/detail.7fd4e794.js

2 lines
12 KiB
JavaScript
Raw Normal View History

2024-01-10 14:04:12 +08:00
import{P as H,I as K,x as Q,_ as G,$ as X,a0 as Y,y as Z,L as ee,M as te,O as se,J as oe}from"./element-plus.9fdc69b1.js";import{_ as ie}from"./index.vue_vue_type_script_setup_true_lang.4e44db35.js";import{o as h,c as f,a as t,L as S,ab as M,d as $,r as E,_ as x,D as ne,T as i,K as c,U as A,S as v,Q as B,u as j,J as V,a6 as ae,R as U}from"./@vue.108c970a.js";import{d as le,t as T}from"./index.0398bb44.js";import{a as ue}from"./useDictOptions.3323f3d1.js";import{a as ce,b as O}from"./device.498c9bbd.js";import{u as de}from"./vue-router.ed788fee.js";import"./@vueuse.d3d080b7.js";import"./@element-plus.d6eabd08.js";import"./lodash-es.29c53eac.js";import"./dayjs.664390f6.js";import"./axios.4ebfdb3f.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.e92d81a1.js";import"./pinia.eff1ffd5.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.dbf33394.js";import"./color.e1b5fced.js";import"./clone.0a4e8ac3.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.f174a91e.js";import"./ms.a9ae1d6d.js";import"./nprogress.d7c3ab1b.js";import"./vue-clipboard3.add720e2.js";import"./clipboard.01ea18f5.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.241b9b5d.js";const re={name:"VideoPlayer",props:{video_url:String},data(){return{jessibuca:null,version:"",wasm:!1,videoUrl:"",vc:"ff",playing:!1,quieting:!0,loaded:!1,showOperateBtns:!1,showBandwidth:!1,err:"",speed:0,performance:"",volume:1,rotate:0,useWCS:!1,useMSE:!0,useOffscreen:!1,recording:!1,recordType:"webm",scale:0}},mounted(){this.create(),this.videoUrl=this.video_url,window.onerror=u=>this.err=u,setTimeout(()=>{this.play()},2e3)},unmounted(){this.jessibuca.destroy()},methods:{create(u){u=u||{},this.jessibuca=new window.Jessibuca(Object.assign({container:this.$refs.container,videoBuffer:Number(this.$refs.buffer.value),isResize:!1,useWCS:this.useWCS,useMSE:this.useMSE,text:"",loadingText:"\u75AF\u72C2\u52A0\u8F7D\u4E2D...",debug:!1,decoder:"/decoder.js",supportDblclickFullscreen:!0,showBandwidth:this.showBandwidth,operateBtns:{fullscreen:this.showOperateBtns,screenshot:this.showOperateBtns,play:this.showOperateBtns,audio:this.showOperateBtns},vod:this.vod,forceNoOffscreen:!this.useOffscreen,isNotMute:!0,timeout:10},u));let o=this;this.jessibuca.on("load",function(){console.log("on load")}),this.jessibuca.on("log",function(e){console.log("on log",e)}),this.jessibuca.on("record",function(e){console.log("on record:",e)}),this.jessibuca.on("pause",function(){console.log("on pause"),o.playing=!1}),this.jessibuca.on("play",function(){console.log("on play"),o.playing=!0}),this.jessibuca.on("fullscreen",function(e){console.log("on fullscreen",e)}),this.jessibuca.on("mute",function(e){console.log("on mute",e),o.quieting=e}),this.jessibuca.on("mute",function(e){console.log("on mute2",e)}),this.jessibuca.on("audioInfo",function(e){console.log("audioInfo",e)}),this.jessibuca.on("videoInfo",function(e){console.log("videoInfo",e)}),this.jessibuca.on("error",function(e){console.log("error",e)}),this.jessibuca.on("timeout",function(){console.log("timeout")}),this.jessibuca.on("start",function(){console.log("frame start")}),this.jessibuca.on("performance",function(e){var n="\u5361\u987F";e===2?n="\u975E\u5E38\u6D41\u7545":e===1&&(n="\u6D41\u7545"),o.performance=n}),this.jessibuca.on("buffer",function(e){console.log("buffer",e)}),this.jessibuca.on("stats",function(e){console.log("stats",e)}),this.jessibuca.on("kBps",function(e){console.log("kBps",e)}),this.jessibuca.on("play",()=>{this.playing=!0,this.loaded=!0,this.quieting=this.jessibuca.isMute()}),this.jessibuca.on("recordingTimestamp",e=>{console.log("recordingTimestamp",e)})},play(){this.$refs.playUrl.value&&this.jessibuca.play(this.$refs.playUrl.value)},mute(){this.jessibuca.mute()},cancelMute()