1 line
2.2 KiB
JavaScript
1 line
2.2 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0efc9c"],{"9a31":function(e,i,t){"use strict";t.r(i);var o=function(){var e=this,i=e.$createElement,t=e._self._c||i;return t("div",{staticClass:"component-wrapper u000242",style:e.wrapper_style},[e.hasLoaded?[e.isVideo?e._e():t("iframe",{attrs:{src:e.video_url.video_url,frameborder:"0",allowfullscreen:"",height:"200",width:"100%"}}),e.isVideo?t("video",{ref:"video",attrs:{poster:"0"==e.video_url.isShowPoster?"":e.video_url.poster,src:e.video_url.video_url,preload:"true",controlslist:"nodownload",width:"100%",controls:"","webkit-playsinline":"true",playsinline:"true","x5-playsinline":"true","x-webkit-airplay":"true","x5-video-ignore-metadata":"true"},on:{play:e.onPlay}},[t("source",{attrs:{src:e.video_url.video_url}})]):e._e()]:e._e(),e.hasLoaded?e._e():t("div",{staticStyle:{height:"70vh"}})],2)},n=[],d=(t("99af"),t("8a79"),{props:["id","datas"],data:function(){return{isVideo:!0,hasLoaded:!1}},computed:{wrapper_style:function(){var e=this.datas,i=e.padding_top,t=e.padding_bottom,o=e.padding_left,n=e.padding_right,d=e.preview_color;return"\n line-height: 0;\n width: 100%;\n position: relative;\n height:auto;\n padding-top: ".concat(i,"px;\n padding-bottom: ").concat(t,"px;\n padding-left: ").concat(o,"px;\n padding-right: ").concat(n,"px;\n background-color: ").concat(d,";\n background-size: 100% 100%;\n background-position: center;\n background-repeat: no-repeat;\n ")},video_url:function(){return this.datas.video_url||{}}},mounted:function(){this.initVideoScrollFn(),this.isVideo=!0,this.isMp4(this.datas.video_url.video_url)},methods:{isMp4:function(e){e.endsWith(".mp4")||e.endsWith(".mov")||e.endsWith(".avi")||(this.isVideo=!1)},showComponent:function(){this.hasLoaded=!0},pauseFn:function(){this.$refs.video&&this.$refs.video.pause()},onPlay:function(){this.$emit("refresh",{type:"video",id:this.id})},initVideoScrollFn:function(){this.$emit("refresh",{type:"initVideo"})}}}),r=d,a=t("2877"),s=Object(a["a"])(r,o,n,!1,null,"5cfa41ed",null);i["default"]=s.exports}}]); |