"use strict";(self["webpackChunkscui"]=self["webpackChunkscui"]||[]).push([[7898],{33086:function(t,e,l){l.r(e),l.d(e,{default:function(){return y}});var s=l(66252);function i(t,e,l,i,o,n){const r=(0,s.up)("el-alert"),a=(0,s.up)("sc-video"),u=(0,s.up)("el-card"),c=(0,s.up)("el-col"),p=(0,s.up)("el-row"),v=(0,s.up)("el-main");return(0,s.wg)(),(0,s.j4)(v,null,{default:(0,s.w5)((()=>[(0,s.Wm)(r,{title:"播放器使用来自西瓜视频的西瓜播放器xgplayer",type:"success",style:{"margin-bottom":"20px"}}),(0,s.Wm)(p,{gutter:15},{default:(0,s.w5)((()=>[(0,s.Wm)(c,{lg:12},{default:(0,s.w5)((()=>[(0,s.Wm)(u,{shadow:"never",header:"MP4点播"},{default:(0,s.w5)((()=>[(0,s.Wm)(a,{src:o.playUrl,options:o.options},null,8,["src","options"])])),_:1})])),_:1}),(0,s.Wm)(c,{lg:12},{default:(0,s.w5)((()=>[(0,s.Wm)(u,{shadow:"never",header:"HlS(m3u8)直播"},{default:(0,s.w5)((()=>[(0,s.Wm)(p,{gutter:1},{default:(0,s.w5)((()=>[(0,s.Wm)(c,{span:12},{default:(0,s.w5)((()=>[(0,s.Wm)(a,{src:o.liveUrl,isLive:"",options:{volume:0}},null,8,["src"])])),_:1}),(0,s.Wm)(c,{span:12},{default:(0,s.w5)((()=>[(0,s.Wm)(a,{src:o.liveUrl_2,isLive:"",options:{volume:0}},null,8,["src"])])),_:1})])),_:1}),(0,s.Wm)(p,{gutter:1,style:{"margin-top":"1px"}},{default:(0,s.w5)((()=>[(0,s.Wm)(c,{span:12},{default:(0,s.w5)((()=>[(0,s.Wm)(a,{src:o.liveUrl_3,isLive:"",options:{volume:0}},null,8,["src"])])),_:1}),(0,s.Wm)(c,{span:12},{default:(0,s.w5)((()=>[(0,s.Wm)(a,{src:o.liveUrl_4,isLive:"",options:{volume:0}},null,8,["src"])])),_:1})])),_:1})])),_:1})])),_:1})])),_:1})])),_:1})}const o={class:"sc-video",ref:"scVideo"};function n(t,e,l,i,n,r){return(0,s.wg)(),(0,s.iD)("div",o,null,512)}var r=l(38275),a=l.n(r),u=l(98379),c=l.n(u),p={props:{src:{type:String,required:!0,default:""},autoplay:{type:Boolean,default:!1},controls:{type:Boolean,default:!0},loop:{type:Boolean,default:!1},isLive:{type:Boolean,default:!1},options:{type:Object,default:()=>{}}},data(){return{player:null}},watch:{src(t){this.player.hasStart?this.player.src=t:this.player.start(t)}},mounted(){this.isLive?this.initHls():this.init()},methods:{init(){this.player=new(a())({el:this.$refs.scVideo,url:this.src,autoplay:this.autoplay,loop:this.loop,controls:this.controls,fluid:!0,lang:"zh-cn",...this.options})},initHls(){this.player=new(c())({el:this.$refs.scVideo,url:this.src,autoplay:this.autoplay,loop:this.loop,controls:this.controls,fluid:!0,isLive:!0,ignores:["time","progress"],lang:"zh-cn",...this.options})}}},v=l(83744);const d=(0,v.Z)(p,[["render",n],["__scopeId","data-v-38fc476c"]]);var m=d,h={name:"scvideo",components:{scVideo:m},data(){return{playUrl:"https://fastly.jsdelivr.net/gh/scuiadmin/CDN/video/scui-player-demo-720.mp4",options:{poster:"https://fastly.jsdelivr.net/gh/scuiadmin/CDN/video/scui-player-demo-1080_Moment.jpg",pip:!0},liveUrl:"http://local.live.jxtvcn.com.cn/live-jxtv/tv_jxtv1.m3u8",liveUrl_2:"http://local.live.jxtvcn.com.cn/live-jxtv/tv_jxtv6.m3u8",liveUrl_3:"http://local.live.jxtvcn.com.cn/live-jxtv/tv_jxtv7.m3u8",liveUrl_4:"http://local.live.jxtvcn.com.cn/live-jxtv/tv_jxtv8.m3u8"}},mounted(){},methods:{}};const f=(0,v.Z)(h,[["render",i]]);var y=f}}]);