diff --git a/packages/artplayer-plugin-danmu/.babelrc b/.babelrc similarity index 100% rename from packages/artplayer-plugin-danmu/.babelrc rename to .babelrc diff --git a/.travis.yml b/.travis.yml index a0c887f89..d9308a99e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,4 +9,5 @@ before_script: script: - npm run lint + - npm run build:all - npm run test \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-danmu.css b/docs/compiled/artplayer-plugin-danmu.css new file mode 100644 index 000000000..21f9dd122 --- /dev/null +++ b/docs/compiled/artplayer-plugin-danmu.css @@ -0,0 +1 @@ +.artplayerPluginDanmu{display:flex} \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-danmu.js b/docs/compiled/artplayer-plugin-danmu.js new file mode 100644 index 000000000..931245934 --- /dev/null +++ b/docs/compiled/artplayer-plugin-danmu.js @@ -0,0 +1,8 @@ +/*! + * artplayer-plugin-danmu.js v1.0.4 + * Github: https://github.com/zhw2590582/ArtPlayer#readme + * (c) 2017-2018 Harvey Zack + * Released under the MIT License. + */ + +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e["artplayer-plugin-danmu"]={})}(this,function(e){"use strict";function t(e){var t=e.prototype;console.log(t)}window.artplayerPluginDanmu=t,e.default=t,Object.defineProperty(e,"__esModule",{value:!0})}); diff --git a/docs/compiled/artplayer-plugin-subtitle.js b/docs/compiled/artplayer-plugin-subtitle.js new file mode 100644 index 000000000..4866d1089 --- /dev/null +++ b/docs/compiled/artplayer-plugin-subtitle.js @@ -0,0 +1,8 @@ +/*! + * artplayer-plugin-subtitle.js v1.0.4 + * Github: https://github.com/zhw2590582/ArtPlayer#readme + * (c) 2017-2018 Harvey Zack + * Released under the MIT License. + */ + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t["artplayer-plugin-subtitle"]={})}(this,function(t){"use strict";function e(i){var t=i.i18n,a=i.events.proxy;return{title:"Subtitle",name:"subtitle",index:20,html:'\n
".concat(t,"
")}).join("")}i.art.emit("subtitle:update",a)})}})}},{key:"load",value:function(e){var n,i=this.art.notice;return fetch(e).then(function(t){return n=t.headers.get("Content-Type"),t.text()}).then(function(t){return/x-subrip/gi.test(n)?_(O(t)):e}).catch(function(t){i.show(t),console.warn(t)})}},{key:"show",value:function(){var t=this.art,e=t.template.$subtitle,n=t.i18n,i=t.notice;It(e,"display","block"),this.state=!0,i.show(n.get("Show subtitle")),this.art.emit("subtitle:show",e)}},{key:"hide",value:function(){var t=this.art,e=t.template.$subtitle,n=t.i18n,i=t.notice;It(e,"display","none"),this.state=!1,i.show(n.get("Hide subtitle")),this.art.emit("subtitle:hide",e)}},{key:"toggle",value:function(){this.state?this.hide():this.show()}},{key:"switch",value:function(t){var e=this,n=this.art.template.$track;Wt(n,"You need to initialize the subtitle option first."),this.load(t).then(function(t){n.src=t,e.art.emit("subtitle:switch",t)})}}]),e}();var ct=n(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});e.ContentRect=function(t){if("getBBox"in t){var e=t.getBBox();return Object.freeze({height:e.height,left:0,top:0,width:e.width})}var n=window.getComputedStyle(t);return Object.freeze({height:parseFloat(n.height||"0"),left:parseFloat(n.paddingLeft||"0"),top:parseFloat(n.paddingTop||"0"),width:parseFloat(n.width||"0")})}});e(ct);ct.ContentRect;var lt=n(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.target=t,this.$$broadcastWidth=this.$$broadcastHeight=0}return Object.defineProperty(t.prototype,"broadcastWidth",{get:function(){return this.$$broadcastWidth},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"broadcastHeight",{get:function(){return this.$$broadcastHeight},enumerable:!0,configurable:!0}),t.prototype.isActive=function(){var t=ct.ContentRect(this.target);return!!t&&(t.width!==this.broadcastWidth||t.height!==this.broadcastHeight)},t}();e.ResizeObservation=n});e(lt);lt.ResizeObservation;var ut=n(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(t){this.target=t,this.contentRect=ct.ContentRect(t)};e.ResizeObserverEntry=n});e(ut);ut.ResizeObserverEntry;var dt=n(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=[],i=function(){function t(t){this.$$observationTargets=[],this.$$activeTargets=[],this.$$skippedTargets=[];var e=function(t){if(void 0===t)return"Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.";if("function"!=typeof t)return"Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function."}(t);if(e)throw TypeError(e);this.$$callback=t,n.push(this)}return t.prototype.observe=function(t){var e=r("observe",t);if(e)throw TypeError(e);0