chunk-2d0d6f6b.a6c4c8c5.js 1.4 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0d6f6b"],{7590:function(t,e,i){"use strict";var r=i("d225"),a=i("b0b4"),o=i("2a88"),u=i("6bb5"),n=i("4e2b"),s=i("c603"),c=i("953d"),b=c["Quill"].import("blots/block/embed"),l=c["Quill"].import("formats/link"),d=["height","width","src","poster"],h=function(t){Object(n["a"])(i,t);var e=Object(s["a"])(i);function i(){return Object(r["a"])(this,i),e.apply(this,arguments)}return Object(a["a"])(i,[{key:"format",value:function(t,e){d.indexOf(t)>-1?e?this.domNode.setAttribute(t,e):this.domNode.removeAttribute(t):Object(o["a"])(Object(u["a"])(i.prototype),"format",this).call(this,t,e)}},{key:"html",value:function(){var t=this.value(),e=t.video;return'<a href="'.concat(e,'">').concat(e,"</a>")}}],[{key:"create",value:function(t){var e=Object(o["a"])(Object(u["a"])(i),"create",this).call(this,t.url);return e.setAttribute("controls","controls"),e.setAttribute("type","video/mp4"),e.setAttribute("preload","auto"),e.setAttribute("autopaly","false"),e.setAttribute("src",this.sanitize(t.url)),e.setAttribute("poster",this.sanitize(t.poster)),e}},{key:"formats",value:function(t){return d.reduce((function(e,i){return t.hasAttribute(i)&&(e[i]=t.getAttribute(i)),e}),{})}},{key:"sanitize",value:function(t){return l.sanitize(t)}},{key:"value",value:function(t){return t.getAttribute("src")}}]),i}(b);h.blotName="video",h.className="ql-video",h.tagName="video",e["a"]=h}}]);