(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-559f5ea0"],{"0ccb":function(t,e,i){var r=i("e330"),n=i("50c4"),a=i("577e"),s=i("1148"),o=i("1d80"),c=r(s),d=r("".slice),u=Math.ceil,l=function(t){return function(e,i,r){var s,l,f=a(o(e)),p=n(i),v=f.length,h=void 0===r?" ":a(r);return p<=v||""==h?f:(s=p-v,l=c(h,u(s/h.length)),l.length>s&&(l=d(l,0,s)),t?f+l:l+f)}};t.exports={start:l(!1),end:l(!0)}},"4d90":function(t,e,i){"use strict";var r=i("23e7"),n=i("0ccb").start,a=i("9a0c");r({target:"String",proto:!0,forced:a},{padStart:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}})},"9a0c":function(t,e,i){var r=i("342f");t.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(r)},bc80:function(t,e,i){"use strict";i.r(e);var r=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"video-player-component"},[i("video",{ref:"videoPlayer",staticClass:"video",on:{timeupdate:t.onTimeUpdate}},[i("source",{attrs:{src:t.videoUrl,type:"video/mp4"}}),i("span",[t._v("Your browser does not support the video tag")])]),i("div",{staticClass:"control-bar"},[i("button",{class:{playing:t.playing},on:{click:t.playPause}},[t._v(t._s(t.playing?"暂停":"播放"))]),i("div",{staticClass:"progress",on:{click:t.seekVideo}},[i("div",{staticClass:"progress-filled",style:{width:t.currentTimePercentage+"%"}}),i("div",{staticClass:"progress-handle",style:{left:t.currentTimePercentage+"%"}})]),i("div",{staticClass:"status"},[i("span",{staticClass:"time"},[t._v(t._s(t.formattedCurrentTime))]),t._v(" / "),i("span",{staticClass:"duration"},[t._v(t._s(t.formattedDuration))])])])])},n=[],a=(i("99af"),i("d3b7"),i("25f0"),i("4d90"),{name:"VideoPlayer",props:{videoUrl:{type:String,required:!0}},data:function(){return{playing:!1,currentTime:0,duration:0,speed:1}},computed:{currentTimePercentage:function(){return 0===this.duration?0:this.currentTime/this.duration*100},formattedCurrentTime:function(){return this.formatTime(this.currentTime)},formattedDuration:function(){return this.formatTime(this.duration)}},mounted:function(){var t=this;this.$nextTick((function(){t.$refs.videoPlayer.addEventListener("loadedmetadata",t.onLoadedMetadata)}))},beforeDestroy:function(){this.$refs.videoPlayer.removeEventListener("loadedmetadata",this.onLoadedMetadata)},methods:{playPause:function(){var t=this.$refs.videoPlayer;this.playing?t.pause():t.play(),this.playing=!this.playing},onLoadedMetadata:function(){this.duration=this.$refs.videoPlayer.duration},onTimeUpdate:function(){this.currentTime=this.$refs.videoPlayer.currentTime},seekVideo:function(t){if(this.duration){var e=this.$refs.videoPlayer.querySelector(".progress"),i=e.getBoundingClientRect(),r=t.clientX-i.left,n=r/i.width;this.currentTime=this.duration*n,this.$refs.videoPlayer.currentTime=this.currentTime}},formatTime:function(t){var e=new Date(1e3*t),i=e.getUTCHours(),r=e.getUTCMinutes().toString().padStart(2,"0"),n=e.getUTCSeconds().toString().padStart(2,"0");return i>0?"".concat(i,":").concat(r,":").concat(n):"".concat(r,":").concat(n)}}}),s=a,o=i("2877"),c=Object(o["a"])(s,r,n,!1,null,"b1c1e780",null);e["default"]=c.exports}}]);