diff --git a/docs/docs/.nojekyll b/docs/.nojekyll similarity index 100% rename from docs/docs/.nojekyll rename to docs/.nojekyll diff --git a/docs/backlight/css/common.css b/docs/backlight/css/common.css deleted file mode 100644 index 18a75ac44..000000000 --- a/docs/backlight/css/common.css +++ /dev/null @@ -1,21 +0,0 @@ -html, -body, -.container { - height: 100%; -} - -.container { - display: flex; - justify-content: center; - align-items: center; - background: #000; -} - -.artplayer { - width: 600px; - height: 400px; -} - -.artplayer-video { - border: 2px solid rgba(255, 255, 255, 0.2); -} \ No newline at end of file diff --git a/docs/backlight/index.html b/docs/backlight/index.html deleted file mode 100644 index d75233749..000000000 --- a/docs/backlight/index.html +++ /dev/null @@ -1,35 +0,0 @@ - - - -
-
`,
- click: function() {
- art.destroy(true);
- art = new Artplayer({
- autoplay: true,
- container: '.artplayer-app',
- url: url + '/video/you-name.mp4',
- });
- },
- style: {
- position: 'absolute',
- top: '20px',
- right: '20px',
- opacity: '.9',
- },
- },
- ],
- quality: [
- {
- default: true,
- name: '标清 480P',
- url: url + '/video/one-more-time-one-more-chance-480p.mp4',
- },
- {
- name: '高清 720P',
- url: url + '/video/one-more-time-one-more-chance-720p.mp4',
- },
- ],
- thumbnails: {
- url: url + '/image/one-more-time-one-more-chance-thumbnails.png',
- width: 190,
- height: 107,
- },
- subtitle: {
- url: url + '/subtitle/one-more-time-one-more-chance.srt',
- style: {
- color: '#03A9F4',
- },
- },
- highlight: [
- {
- time: 60,
- text: 'One more chance',
- },
- {
- time: 120,
- text: '谁でもいいはずなのに',
- },
- {
- time: 180,
- text: '夏の想い出がまわる',
- },
- {
- time: 240,
- text: 'こんなとこにあるはずもないのに',
- },
- {
- time: 300,
- text: '--终わり--',
- },
- ],
- controls: [
- {
- name: 'preview',
- position: 'right',
- html: '打开',
- mounted: $preview => {
- art.plugins.localPreview.attach($preview);
- },
- },
- ],
- icons: {
- loading: '
',
- }
-});
-
-art.on('firstCanplay', () => {
- art.on('resize', $player => {
- art.controls.quality.show();
- art.controls.setting.show();
- art.controls.subtitle.show();
- art.controls.pip.show();
-
- var playerWidth = $player.clientWidth;
- if (playerWidth < 480) {
- art.controls.quality.hide();
- art.controls.setting.hide();
- }
-
- if (playerWidth < 360) {
- art.controls.subtitle.hide();
- art.controls.pip.hide();
- }
- });
-});
diff --git a/docs/lab/js/mobile.js b/docs/lab/js/mobile.js
deleted file mode 100644
index 7a1e03b06..000000000
--- a/docs/lab/js/mobile.js
+++ /dev/null
@@ -1,9 +0,0 @@
-var vConsole = new VConsole();
-var url = 'https://zhw2590582.github.io/assets-cdn';
-var art = new Artplayer({
- container: '.artplayer-app',
- url: url + '/video/one-more-time-one-more-chance-480p.mp4',
- whitelist: ['iPhone OS 11'],
- // whitelist: [(ua)=>{ return /iPhone OS 11/gi.test(ua); }],
- // whitelist: [/iPhone OS 11/gi]
-});
diff --git a/docs/lab/mobile.html b/docs/lab/mobile.html
deleted file mode 100644
index 36a4e3506..000000000
--- a/docs/lab/mobile.html
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
- ".concat(t,"
")}).join("");}i.art.emit("subtitle:update",s);});}});}},{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)?C(_(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;zt(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;zt(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();}}]),n}();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\".concat(t,\"
\")}).join(\"\")}i.art.emit(\"subtitle:update\",s)})}})}},{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)?C(_(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;zt(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;zt(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()}}]),n}();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