mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-09 20:26:16 -08:00
build all packages
This commit is contained in:
1 parent
b3c2452758
commit
5769baa676
21 files changed
+127
-29
No files matched your search
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"packages/artplayer/dist/artplayer.js": {
|
||||
"bundled": 167524,
|
||||
"minified": 91369,
|
||||
"gzipped": 21798
|
||||
},
|
||||
"packages/artplayer-plugin-backlight/dist/artplayer-plugin-backlight.js": {
|
||||
"bundled": 4642,
|
||||
"minified": 1999,
|
||||
"gzipped": 961
|
||||
},
|
||||
"packages/artplayer-tool-github/dist/artplayer-tool-github.js": {
|
||||
"bundled": 12660,
|
||||
"minified": 12307,
|
||||
"gzipped": 4310
|
||||
},
|
||||
"packages/artplayer-plugin-gif/dist/artplayer-plugin-gif.js": {
|
||||
"bundled": 98443,
|
||||
"minified": 28826,
|
||||
"gzipped": 10440
|
||||
},
|
||||
"packages/artplayer-plugin-playlist/dist/artplayer-plugin-playlist.js": {
|
||||
"bundled": 4331,
|
||||
"minified": 2031,
|
||||
"gzipped": 857
|
||||
},
|
||||
"packages/artplayer-tool-thumbnail/dist/artplayer-tool-thumbnail.js": {
|
||||
"bundled": 16311,
|
||||
"minified": 7927,
|
||||
"gzipped": 2827
|
||||
},
|
||||
"packages/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js": {
|
||||
"bundled": 23907,
|
||||
"minified": 12909,
|
||||
"gzipped": 4096
|
||||
},
|
||||
"packages/artplayer-vue/dist/artplayer-vue.js": {
|
||||
"bundled": 169067,
|
||||
"minified": 92280,
|
||||
"gzipped": 21954
|
||||
},
|
||||
"packages/artplayer-react/dist/artplayer-react.js": {
|
||||
"bundled": 252440,
|
||||
"minified": 121369,
|
||||
"gzipped": 31023
|
||||
}
|
||||
}
|
||||
Vendored
+1
-1
@@ -5,4 +5,4 @@
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).artplayerPluginBacklight=e()}(this,function(){"use strict";function l(t){for(var e=[],n=0;n<10;n+=1)for(var o=0;o<5;o+=1)0!==n&&9!==n&&0!==o&&4!==o||e.push(t(n,o,10,5));return e}return function(o){var t=o.constructor.utils.setStyles,e=o.template,n=e.$player,a=e.$video,r=o.player,i=document.createElement("div");i.classList.add("artplayer-backlight"),t(i,{position:"absolute",zIndex:9,left:0,top:0,right:0,bottom:0,width:"100%",height:"100%"});var h=function(r){return l(function(t,e,n,o){var a=document.createElement("div");return a.style.position="absolute",a.style.left="".concat(100*t/n,"%"),a.style.top="".concat(100*e/o,"%"),a.style.width="".concat(100/n,"%"),a.style.height="".concat(100/o,"%"),a.style.webkitBorderRadius="50%",a.style.borderRadius="50%",a.style.webkitTransition="all .2s ease",a.style.transition="all .2s ease",r.appendChild(a),{$box:a,left:0===t,right:t===n-1,top:0===e,bottom:e===o-1}})}(i),c=document.createElement("canvas");return n.insertBefore(i,a),function n(){window.requestAnimationFrame(function(){if(r.playing){var t=a.clientWidth,e=a.clientHeight;(function(t,e,p,g){var y=t.getContext("2d");return t.width=p,t.height=g,y.drawImage(e,0,0),l(function(t,e,n,o){for(var a=p/n,r=g/o,i=t*a,c=e*r,l=y.getImageData(i,c,a,r).data,s=0,u=0,d=0,f=0,h=l.length;f<h;f+=4)s+=l[f],u+=l[f+1],d+=l[f+2];return{r:s=Math.floor(s/(l.length/4)),g:u=Math.floor(u/(l.length/4)),b:d=Math.floor(d/(l.length/4))}})})(c,a,t,e).forEach(function(t,e){var n=t.r,o=t.g,a=t.b,r=h[e],i=r.$box,c=r.left,l=r.right,s=r.top,u=r.bottom,d=c?"-64px":l?"64px":"0",f=s?"-64px":u?"64px":"0";i.style.webkitBoxShadow="rgb(".concat(n,", ").concat(o,", ").concat(a,") ").concat(d," ").concat(f," 128px"),i.style.boxShadow="rgb(".concat(n,", ").concat(o,", ").concat(a,") ").concat(d," ").concat(f," 128px")})}o.isDestroy||n()})}(),{name:"artplayerPluginBacklight"}}});
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).artplayerPluginBacklight=e()}(this,(function(){"use strict";function t(t){for(var e=[],o=0;o<10;o+=1)for(var n=0;n<5;n+=1)0!==o&&9!==o&&0!==n&&4!==n||e.push(t(o,n,10,5));return e}return function(e){var o=e.constructor.utils.setStyles,n=e.template,a=n.$player,r=n.$video,i=e.player,c=document.createElement("div");c.classList.add("artplayer-backlight"),o(c,{position:"absolute",zIndex:9,left:0,top:0,right:0,bottom:0,width:"100%",height:"100%"});var l,s=(l=c,t((function(t,e,o,n){var a=document.createElement("div");return a.style.position="absolute",a.style.left="".concat(100*t/o,"%"),a.style.top="".concat(100*e/n,"%"),a.style.width="".concat(100/o,"%"),a.style.height="".concat(100/n,"%"),a.style.webkitBorderRadius="50%",a.style.borderRadius="50%",a.style.webkitTransition="all .2s ease",a.style.transition="all .2s ease",l.appendChild(a),{$box:a,left:0===t,right:t===o-1,top:0===e,bottom:e===n-1}}))),u=document.createElement("canvas");return a.insertBefore(c,r),function o(){window.requestAnimationFrame((function(){if(i.playing){var n=r.clientWidth,a=r.clientHeight;(function(e,o,n,a){var r=e.getContext("2d");return e.width=n,e.height=a,r.drawImage(o,0,0),t((function(t,e,o,i){for(var c=n/o,l=a/i,s=t*c,u=e*l,d=r.getImageData(s,u,c,l).data,f=0,h=0,p=0,g=0,y=d.length;g<y;g+=4)f+=d[g],h+=d[g+1],p+=d[g+2];return{r:f=Math.floor(f/(d.length/4)),g:h=Math.floor(h/(d.length/4)),b:p=Math.floor(p/(d.length/4))}}))})(u,r,n,a).forEach((function(t,e){var o=t.r,n=t.g,a=t.b,r=s[e],i=r.$box,c=r.left,l=r.right,u=r.top,d=r.bottom,f=c?"-64px":l?"64px":"0",h=u?"-64px":d?"64px":"0";i.style.webkitBoxShadow="rgb(".concat(o,", ").concat(n,", ").concat(a,") ").concat(f," ").concat(h," 128px"),i.style.boxShadow="rgb(".concat(o,", ").concat(n,", ").concat(a,") ").concat(f," ").concat(h," 128px")}))}e.isDestroy||o()}))}(),{name:"artplayerPluginBacklight"}}}));
|
||||
Vendored
+1
-1
@@ -5,4 +5,4 @@
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).artplayerPluginDanmuku=e()}(this,function(){"use strict";var a=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t};var r=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var t=function(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t},o={"zh-cn":{"Danmu opacity":"弹幕透明度","Danmu speed":"弹幕速度","Danmu size":"弹幕大小","Danmu text cannot be empty":"弹幕文本不能为空","The length of the danmu does not exceed":"弹幕文本字数不能超过","Danmu speed synchronous playback multiple":"弹幕速度同步播放倍数"},"zh-tw":{"Danmu opacity":"彈幕透明度","Danmu speed":"彈幕速度","Danmu size":"弹幕大小","Danmu text cannot be empty":"彈幕文本不能為空","The length of the danmu does not exceed":"彈幕文本字數不能超過","Danmu speed synchronous playback multiple":"彈幕速度同步播放倍數"}};function u(r){var t=r.i18n,i=r.events.proxy;return{name:"danmuku-opacity",index:10,html:'\n <div class="art-setting-header">\n '.concat(t.get("Danmu opacity"),': <span class="art-value">100</span>%\n </div>\n <div class="art-setting-range">\n <input type="range" value="1" min="0.1" max="1" step="0.1">\n </div>\n '),mounted:function(t){var e=t.querySelector("input[type=range]"),n=t.querySelector(".art-value");i(e,"change",function(){var t=e.value;n.innerText=100*Number(t),r.plugins.artplayerPluginDanmuku.config({opacity:Number(t)})}),r.on("artplayerPluginDanmuku:config",function(t){e.value!==t.opacity&&(e.value=t.opacity,n.innerText=100*t.opacity)})}}}function s(r){var t=r.i18n,i=r.events.proxy;return{name:"danmuku-size",index:11,html:'\n <div class="art-setting-header">\n '.concat(t.get("Danmu size"),': <span class="art-value">25</span>px\n </div>\n <div class="art-setting-range">\n <input type="range" value="25" min="14" max="30" step="1">\n </div>\n '),mounted:function(t){var e=t.querySelector("input[type=range]"),n=t.querySelector(".art-value");i(e,"change",function(){var t=e.value;n.innerText=t,r.plugins.artplayerPluginDanmuku.config({fontSize:Number(t)})}),r.on("artplayerPluginDanmuku:config",function(t){e.value!==t.fontSize&&(e.value=t.fontSize,n.innerText=t.fontSize)})}}}function l(r){var t=r.i18n,i=r.events.proxy;return{name:"danmuku-speed",index:12,html:'\n <div class="art-setting-header">\n '.concat(t.get("Danmu speed"),': <span class="art-value">5</span>s\n </div>\n <div class="art-setting-range">\n <input type="range" value="5" min="1" max="10" step="1">\n </div>\n '),mounted:function(t){var e=t.querySelector("input[type=range]"),n=t.querySelector(".art-value");i(e,"change",function(){var t=e.value;n.innerText=t,r.plugins.artplayerPluginDanmuku.config({speed:Number(t)})}),r.on("artplayerPluginDanmuku:config",function(t){e.value!==t.speed&&(e.value=t.speed,n.innerText=t.speed)})}}}function c(n){var t=n.i18n,r=n.events.proxy;return{name:"danmuku-synchronousPlayback",index:13,html:'\n <label class="art-setting-checkbox">\n <input type="checkbox"/>'.concat(t.get("Danmu speed synchronous playback multiple"),"\n </label>\n "),mounted:function(t){var e=t.querySelector("input[type=checkbox]");r(e,"change",function(){n.plugins.artplayerPluginDanmuku.config({synchronousPlayback:e.checked})}),n.on("artplayerPluginDanmuku:config",function(t){e.checked!==t.synchronousPlayback&&(e.checked=t.synchronousPlayback)})}}}function n(t,e,n){return t.filter(function(t){return t.$state===e}).map(n)}function p(t,e){var n=t.getBoundingClientRect();return e?n[e]:n}var f=function(t){if(Array.isArray(t))return t};var m=function(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var n=[],r=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(r=(o=u.next()).done)&&(n.push(o.value),!e||n.length!==e);r=!0);}catch(t){i=!0,a=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw a}}return n}};var h=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")};var x=function(t,e){return f(t)||m(t,e)||h()};function d(t){if("string"!=typeof t)return[];var e=t.match(/<d([\S ]*?>[\S ]*?)<\/d>/gi);return e.length?e.map(function(t){var e=t.match(/<d p="(.+)">(.+)<\/d>/),n=x(e,3),r=n[1],i=n[2],a=r.split(",");return 8===a.length&&i.trim()?{text:i,time:Number(a[0]),mode:function(t){switch(t){case 1:case 2:case 3:return"scroLine truncated
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).artplayerPluginDanmuku=e()}(this,(function(){"use strict";var t=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t};var e=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var r=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t},i={"zh-cn":{"Danmu opacity":"弹幕透明度","Danmu speed":"弹幕速度","Danmu size":"弹幕大小","Danmu text cannot be empty":"弹幕文本不能为空","The length of the danmu does not exceed":"弹幕文本字数不能超过","Danmu speed synchronous playback multiple":"弹幕速度同步播放倍数"},"zh-tw":{"Danmu opacity":"彈幕透明度","Danmu speed":"彈幕速度","Danmu size":"弹幕大小","Danmu text cannot be empty":"彈幕文本不能為空","The length of the danmu does not exceed":"彈幕文本字數不能超過","Danmu speed synchronous playback multiple":"彈幕速度同步播放倍數"}};function a(t){var e=t.i18n,n=t.events.proxy;return{name:"danmuku-opacity",index:10,html:'\n <div class="art-setting-header">\n '.concat(e.get("Danmu opacity"),': <span class="art-value">100</span>%\n </div>\n <div class="art-setting-range">\n <input type="range" value="1" min="0.1" max="1" step="0.1">\n </div>\n '),mounted:function(e){var r=e.querySelector("input[type=range]"),i=e.querySelector(".art-value");n(r,"change",(function(){var e=r.value;i.innerText=100*Number(e),t.plugins.artplayerPluginDanmuku.config({opacity:Number(e)})})),t.on("artplayerPluginDanmuku:config",(function(t){r.value!==t.opacity&&(r.value=t.opacity,i.innerText=100*t.opacity)}))}}}function o(t){var e=t.i18n,n=t.events.proxy;return{name:"danmuku-size",index:11,html:'\n <div class="art-setting-header">\n '.concat(e.get("Danmu size"),': <span class="art-value">25</span>px\n </div>\n <div class="art-setting-range">\n <input type="range" value="25" min="14" max="30" step="1">\n </div>\n '),mounted:function(e){var r=e.querySelector("input[type=range]"),i=e.querySelector(".art-value");n(r,"change",(function(){var e=r.value;i.innerText=e,t.plugins.artplayerPluginDanmuku.config({fontSize:Number(e)})})),t.on("artplayerPluginDanmuku:config",(function(t){r.value!==t.fontSize&&(r.value=t.fontSize,i.innerText=t.fontSize)}))}}}function u(t){var e=t.i18n,n=t.events.proxy;return{name:"danmuku-speed",index:12,html:'\n <div class="art-setting-header">\n '.concat(e.get("Danmu speed"),': <span class="art-value">5</span>s\n </div>\n <div class="art-setting-range">\n <input type="range" value="5" min="1" max="10" step="1">\n </div>\n '),mounted:function(e){var r=e.querySelector("input[type=range]"),i=e.querySelector(".art-value");n(r,"change",(function(){var e=r.value;i.innerText=e,t.plugins.artplayerPluginDanmuku.config({speed:Number(e)})})),t.on("artplayerPluginDanmuku:config",(function(t){r.value!==t.speed&&(r.value=t.speed,i.innerText=t.speed)}))}}}function s(t){var e=t.i18n,n=t.events.proxy;return{name:"danmuku-synchronousPlayback",index:13,html:'\n <label class="art-setting-checkbox">\n <input type="checkbox"/>'.concat(e.get("Danmu speed synchronous playback multiple"),"\n </label>\n "),mounted:function(e){var r=e.querySelector("input[type=checkbox]");n(r,"change",(function(){t.plugins.artplayerPluginDanmuku.config({synchronousPlayback:r.checked})})),t.on("artplayerPluginDanmuku:config",(function(t){r.checked!==t.synchronousPlayback&&(r.checked=t.synchronousPlayback)}))}}}function l(t,e,n){return t.filter((function(t){return t.$state===e})).map(n)}function c(t,e){var n=t.getBoundingClientRect();return e?n[e]:n}var p=function(t){if(Array.isArray(t))return t};var f=function(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var n=[],r=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(r=(o=u.next()).done)&&(n.push(o.value),!e||n.length!==e);r=!0);}catch(t){i=!0,a=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw a}}return n}};var m=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")};var h=function(t,e){return p(t)||f(t,e)||m()};function d(t){switch(t){case 1:case 2:case 3:return"scroll";case 4:case 5:return"static";default:return null}}function y(t){return fetch(t).then((function(t){return t.text()})).then((function(t){return function(t){if("string"!=typeof t)return[];var e=t.match(/<d([\S ]*?>[\S ]*?)<\/d>/gi);return
Line truncated
|
||||
Vendored
+1
-1
@@ -5,4 +5,4 @@
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).artplayerPluginGif=t()}(this,function(){"use strict";var S=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e};function e(e,t){return e(t={exports:{}},t.exports),t.exports}var x=e(function(S,e){!function(e,z,t,G){function r(){}var i,n,B={URL:e.URL||e.webkitURL||e.mozURL||e.msURL,getUserMedia:(n=t.getUserMedia||t.webkitGetUserMedia||t.mozGetUserMedia||t.msGetUserMedia,n?n.bind(t):n),requestAnimFrame:e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame,requestTimeout:function(r,i){if(r=r||B.noop,i=i||0,!B.requestAnimFrame)return setTimeout(r,i);var n=(new Date).getTime(),o=new Object,a=B.requestAnimFrame;return o.value=a(function e(){var t=(new Date).getTime();i<=t-n?r.call():o.value=a(e)}),o},Blob:e.Blob||e.BlobBuilder||e.WebKitBlobBuilder||e.MozBlobBuilder||e.MSBlobBuilder,btoa:(i=e.btoa||function(e){for(var t="",r=0,i=e.length,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=void 0,a=void 0,s=void 0,c=void 0,d=void 0,l=void 0,u=void 0;r<i;)c=(o=e.charCodeAt(r++))>>2,d=(3&o)<<4|(a=e.charCodeAt(r++))>>4,l=(15&a)<<2|(s=e.charCodeAt(r++))>>6,u=63&s,isNaN(a)?l=u=64:isNaN(s)&&(u=64),t=t+n.charAt(c)+n.charAt(d)+n.charAt(l)+n.charAt(u);return t},i?i.bind(e):B.noop),isObject:function(e){return e&&"[object Object]"===Object.prototype.toString.call(e)},isEmptyObject:function(e){return B.isObject(e)&&!Object.keys(e).length},isArray:function(e){return e&&Array.isArray(e)},isFunction:function(e){return e&&"function"==typeof e},isElement:function(e){return e&&1===e.nodeType},isString:function(e){return"string"==typeof e||"[object String]"===Object.prototype.toString.call(e)},isSupported:{canvas:function(){var e=z.createElement("canvas");return e&&e.getContext&&e.getContext("2d")},webworkers:function(){return e.Worker},blob:function(){return B.Blob},Uint8Array:function(){return e.Uint8Array},Uint32Array:function(){return e.Uint32Array},videoCodecs:function(){var e=z.createElement("video"),t={mp4:!1,h264:!1,ogv:!1,ogg:!1,webm:!1};try{e&&e.canPlayType&&(t.mp4=""!==e.canPlayType('video/mp4; codecs="mp4v.20.8"'),t.h264=""!==(e.canPlayType('video/mp4; codecs="avc1.42E01E"')||e.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"')),t.ogv=""!==e.canPlayType('video/ogg; codecs="theora"'),t.ogg=""!==e.canPlayType('video/ogg; codecs="theora"'),t.webm=-1!==e.canPlayType('video/webm; codecs="vp8, vorbis"'))}catch(e){}return t}()},noop:function(){},each:function(e,t){var r=void 0,i=void 0;if(B.isArray(e))for(r=-1,i=e.length;++r<i&&!1!==t(r,e[r]););else if(B.isObject(e))for(r in e)if(e.hasOwnProperty(r)&&!1===t(r,e[r]))break},mergeOptions:function(i,n){if(B.isObject(i)&&B.isObject(n)&&Object.keys){var o={};return B.each(i,function(e,t){o[e]=i[e]}),B.each(n,function(e,t){var r=n[e];B.isObject(r)&&i[e]?o[e]=B.mergeOptions(i[e],r):o[e]=r}),o}},setCSSAttr:function(r,e,t){B.isElement(r)&&(B.isString(e)&&B.isString(t)?r.style[e]=t:B.isObject(e)&&B.each(e,function(e,t){r.style[e]=t}))},removeElement:function(e){B.isElement(e)&&e.parentNode&&e.parentNode.removeChild(e)},createWebWorker:function(e){if(!B.isString(e))return{};try{var t=new B.Blob([e],{type:"text/javascript"}),r=B.URL.createObjectURL(t);return{objectUrl:r,worker:new Worker(r)}}catch(e){return""+e}},getExtension:function(e){return e.substr(e.lastIndexOf(".")+1,e.length)},getFontSize:function(e){var t=0<arguments.length&&e!==G?e:{};if(!z.body||!1===t.resizeFont)return t.fontSize;var r=t.text,i=t.gifWidth,n=parseInt(t.fontSize,10),o=parseInt(t.minFontSize,10),a=z.createElement("div"),s=z.createElement("span");for(a.setAttribute("width",i),a.appendChild(s),s.innerHTML=r,s.style.fontSize=n+"px",s.style.textIndent="-9999px",s.style.visibility="hidden",z.body.appendChild(s);s.offsetWidth>i&&o<=n;)s.style.fontSize=--n+"px";return z.body.removeChild(s),n+"px"},webWorkerError:!1},o=Object.freeze({default:B}),f={validate:function(i){i=B.isObject(i)?i:{};var n={};return B.each(f.validators,function(e,t){var r=t.errorCode;if(!i[r]&&!t.condition)return!((n=t).error=!0)}),delete n.condition,n},isValid:function(e){var t=!0!==f.validate(e).error;return t},validators:[{condition:B.isFunction(B.getUserMedia),errorCode:"getUserMedia",errorMsg:"The getUserMedia API is not supported in your browser"},{condition:B.isSupported.canvas(),errorCode:"canvas",errorMsg:"Canvas elements are not supported in your browser"},{condition:B.isSupported.webworkers(),errorCode:"webworkers",errorMsg:"The Web Workers API is not supported in your browser"},{condition:B.isFunction(B.URL),errorCode:"window.URL",errorMsg:"The window.URL API is not supported in your browser"},{condition:B.isSupported.blob(),errorCode:"window.Blob",errorMsg:"The window.Blob File API is not supported in your browser"},{condiLine truncated
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).artplayerPluginGif=t()}(this,(function(){"use strict";var e=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function t(e,t){return e(t={exports:{}},t.exports),t.exports}var r=t((function(e,t){!function(t,r,i,n){var o,a,s={URL:t.URL||t.webkitURL||t.mozURL||t.msURL,getUserMedia:(a=i.getUserMedia||i.webkitGetUserMedia||i.mozGetUserMedia||i.msGetUserMedia,a?a.bind(i):a),requestAnimFrame:t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame,requestTimeout:function(e,t){if(e=e||s.noop,t=t||0,!s.requestAnimFrame)return setTimeout(e,t);var r=(new Date).getTime(),i=new Object,n=s.requestAnimFrame;return i.value=n((function o(){(new Date).getTime()-r>=t?e.call():i.value=n(o)})),i},Blob:t.Blob||t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder,btoa:(o=t.btoa||function(e){for(var t="",r=0,i=e.length,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=void 0,a=void 0,s=void 0,c=void 0,d=void 0,l=void 0,u=void 0;r<i;)c=(o=e.charCodeAt(r++))>>2,d=(3&o)<<4|(a=e.charCodeAt(r++))>>4,l=(15&a)<<2|(s=e.charCodeAt(r++))>>6,u=63&s,isNaN(a)?l=u=64:isNaN(s)&&(u=64),t=t+n.charAt(c)+n.charAt(d)+n.charAt(l)+n.charAt(u);return t},o?o.bind(t):s.noop),isObject:function(e){return e&&"[object Object]"===Object.prototype.toString.call(e)},isEmptyObject:function(e){return s.isObject(e)&&!Object.keys(e).length},isArray:function(e){return e&&Array.isArray(e)},isFunction:function(e){return e&&"function"==typeof e},isElement:function(e){return e&&1===e.nodeType},isString:function(e){return"string"==typeof e||"[object String]"===Object.prototype.toString.call(e)},isSupported:{canvas:function(){var e=r.createElement("canvas");return e&&e.getContext&&e.getContext("2d")},webworkers:function(){return t.Worker},blob:function(){return s.Blob},Uint8Array:function(){return t.Uint8Array},Uint32Array:function(){return t.Uint32Array},videoCodecs:function(){var e=r.createElement("video"),t={mp4:!1,h264:!1,ogv:!1,ogg:!1,webm:!1};try{e&&e.canPlayType&&(t.mp4=""!==e.canPlayType('video/mp4; codecs="mp4v.20.8"'),t.h264=""!==(e.canPlayType('video/mp4; codecs="avc1.42E01E"')||e.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"')),t.ogv=""!==e.canPlayType('video/ogg; codecs="theora"'),t.ogg=""!==e.canPlayType('video/ogg; codecs="theora"'),t.webm=-1!==e.canPlayType('video/webm; codecs="vp8, vorbis"'))}catch(e){}return t}()},noop:function(){},each:function(e,t){var r=void 0,i=void 0;if(s.isArray(e))for(r=-1,i=e.length;++r<i&&!1!==t(r,e[r]););else if(s.isObject(e))for(r in e)if(e.hasOwnProperty(r)&&!1===t(r,e[r]))break},mergeOptions:function(e,t){if(s.isObject(e)&&s.isObject(t)&&Object.keys){var r={};return s.each(e,(function(t,i){r[t]=e[t]})),s.each(t,(function(i,n){var o=t[i];s.isObject(o)&&e[i]?r[i]=s.mergeOptions(e[i],o):r[i]=o})),r}},setCSSAttr:function(e,t,r){s.isElement(e)&&(s.isString(t)&&s.isString(r)?e.style[t]=r:s.isObject(t)&&s.each(t,(function(t,r){e.style[t]=r})))},removeElement:function(e){s.isElement(e)&&e.parentNode&&e.parentNode.removeChild(e)},createWebWorker:function(e){if(!s.isString(e))return{};try{var t=new s.Blob([e],{type:"text/javascript"}),r=s.URL.createObjectURL(t);return{objectUrl:r,worker:new Worker(r)}}catch(e){return""+e}},getExtension:function(e){return e.substr(e.lastIndexOf(".")+1,e.length)},getFontSize:function(){var e=arguments.length>0&&arguments[0]!==n?arguments[0]:{};if(!r.body||!1===e.resizeFont)return e.fontSize;var t=e.text,i=e.gifWidth,o=parseInt(e.fontSize,10),a=parseInt(e.minFontSize,10),s=r.createElement("div"),c=r.createElement("span");for(s.setAttribute("width",i),s.appendChild(c),c.innerHTML=t,c.style.fontSize=o+"px",c.style.textIndent="-9999px",c.style.visibility="hidden",r.body.appendChild(c);c.offsetWidth>i&&o>=a;)c.style.fontSize=--o+"px";return r.body.removeChild(c),o+"px"},webWorkerError:!1},c=Object.freeze({default:s}),d={validate:function(e){e=s.isObject(e)?e:{};var t={};return s.each(d.validators,(function(r,i){var n=i.errorCode;if(!e[n]&&!i.condition)return(t=i).error=!0,!1})),delete t.condition,t},isValid:function(e){var t=!0!==d.validate(e).error;return t},validators:[{condition:s.isFunction(s.getUserMedia),errorCode:"getUserMedia",errorMsg:"The getUserMedia API is not supported in your browser"},{condition:s.isSupported.canvas(),errorCode:"canvas",errorMsg:"Canvas elements are not supported in your browser"},{condition:s.isSupported.webworkers(),errorCode:"webworkers",errorMsg:"The Web Workers API is not supported in your browser"},{condition:s.isFunction(s.URL),errorCode:"window.URL",errorMsg:"The window.URL API is not supporteLine truncated
|
||||
Vendored
+1
-1
@@ -5,4 +5,4 @@
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t=t||self).artplayerPluginPlaylist=n()}(this,function(){"use strict";return function(h){return function(e){var t=e.constructor.utils,n=t.append,r=t.errorHandle,i=t.sleep,a=t.inverseClass,l=e.player,o=e.events.proxy,s=e.template,u=s.$player,c=s.$video,y=n(u,'\n <div class="artplayer-playlist">\n <div class="artplayer-playlist-inner artplayer-backdrop-filter"></div>\n </div>\n ');r(Array.isArray(h),"Playlist is not an array type"),r(0<h.length,"Playlist cannot be empty");var f=h.map(function(t){return r(t.url,"Playlist items require url attribute"),r(t.title,"Playlist items require title attribute"),t}),p=y.querySelector(".artplayer-playlist-inner");function d(t){var n=f[t];return l.switchUrl(n.url,n.title).then(function(){e.emit("artplayerPluginPlaylist:change",n)})}function v(){var t=f.findIndex(function(t){return t.url===c.src});return r(-1!==t,"Can't find Playlist item"),1===f.length?d(0):d(t+1===f.length?0:t+1)}return p.innerHTML=f.map(function(t,n){return'<div class="artplayer-playlist-item" data-option-index="'.concat(n,'">').concat(t.title,"</div>")}).join(""),o(p,"click",function(t){var n=t.target.dataset.optionIndex;n&&Number(n)<=f.length-1&&d(n)}),o(y,"click",function(t){t.target===y&&u.classList.remove("artplayer-playlist-show")}),e.on("video:ended",function(){v().then(function(){i(1e3).then(function(){l.play=!0})})}),e.on("afterAttachUrl",function(){var t=f.findIndex(function(t){return t.url===c.src}),n=Array.from(p.children)[t];-1!==t&&n&&a(n,"active")}),{name:"artplayerPluginPlaylist",show:function(){u.classList.add("artplayer-playlist-show")},hide:function(){u.classList.remove("artplayer-playlist-show")},next:function(){v()},prev:function(){!function(){var t=f.findIndex(function(t){return t.url===c.src});r(-1!==t,"Can't find Playlist item"),1===f.length?d(0):d(t-1==-1?f.length-1:t-1)}()}}}}});
|
||||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t=t||self).artplayerPluginPlaylist=n()}(this,(function(){"use strict";return function(t){return function(n){var e=n.constructor.utils,r=e.append,i=e.errorHandle,a=e.sleep,l=e.inverseClass,o=n.player,s=n.events.proxy,u=n.template,c=u.$player,y=u.$video,f=r(c,'\n <div class="artplayer-playlist">\n <div class="artplayer-playlist-inner artplayer-backdrop-filter"></div>\n </div>\n ');i(Array.isArray(t),"Playlist is not an array type"),i(t.length>0,"Playlist cannot be empty");var p=t.map((function(t){return i(t.url,"Playlist items require url attribute"),i(t.title,"Playlist items require title attribute"),t})),d=f.querySelector(".artplayer-playlist-inner");function v(t){var e=p[t];return o.switchUrl(e.url,e.title).then((function(){n.emit("artplayerPluginPlaylist:change",e)}))}function h(){var t=p.findIndex((function(t){return t.url===y.src}));return i(-1!==t,"Can't find Playlist item"),1===p.length?v(0):v(t+1===p.length?0:t+1)}return d.innerHTML=p.map((function(t,n){return'<div class="artplayer-playlist-item" data-option-index="'.concat(n,'">').concat(t.title,"</div>")})).join(""),s(d,"click",(function(t){var n=t.target.dataset.optionIndex;n&&Number(n)<=p.length-1&&v(n)})),s(f,"click",(function(t){t.target===f&&c.classList.remove("artplayer-playlist-show")})),n.on("video:ended",(function(){h().then((function(){a(1e3).then((function(){o.play=!0}))}))})),n.on("afterAttachUrl",(function(){var t=p.findIndex((function(t){return t.url===y.src})),n=Array.from(d.children)[t];-1!==t&&n&&l(n,"active")})),{name:"artplayerPluginPlaylist",show:function(){c.classList.add("artplayer-playlist-show")},hide:function(){c.classList.remove("artplayer-playlist-show")},next:function(){h()},prev:function(){var t;t=p.findIndex((function(t){return t.url===y.src})),i(-1!==t,"Can't find Playlist item"),1===p.length?v(0):v(t-1==-1?p.length-1:t-1)}}}}}));
|
||||
Vendored
+12
-1
@@ -5,4 +5,15 @@
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).ArtplayerReact=t()}(this,function(){"use strict";var a=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],0<=t.indexOf(n)||(o[n]=e[n]);return o};var r=function(e,t){if(null==e)return{};var n,r,o=a(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o};var c=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e};function e(e,t){return e(t={exports:{}},t.exports),t.exports}var o=e(function(t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?t.exports=r=function(e){return n(e)}:t.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(e)}t.exports=r});var u=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e};var l=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e};var f=function(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?l(e):t},p=e(function(t){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}t.exports=n}),d=e(function(n){function r(e,t){return n.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}n.exports=r});var t=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)},y=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var _e=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,o=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),i=1;i<arguments.length;i++){for(var a in n=Object(arguments[i]))h.call(n,a)&&(o[a]=n[a]);if(y){r=y(n);for(var c=0;c<r.length;c++)v.call(n,r[c])&&(o[r[c]]=n[r[c]])}}return o},n="function"==typeof Symbol&&Symbol.for,m=n?Symbol.for("react.element"):60103,g=n?Symbol.for("react.portal"):60106,b=n?Symbol.for("react.fragment"):60107,w=n?Symbol.for("react.strict_mode"):60108,O=n?Symbol.for("react.profiler"):60114,k=n?Symbol.for("react.provider"):60109,j=n?Symbol.for("react.context"):60110,P=n?Symbol.for("react.forward_ref"):60112,x=n?Symbol.for("react.suspense"):60113,S=n?Symbol.for("react.suspense_list"):60120,E=n?Symbol.for("react.memo"):60115,R=n?Symbol.for("react.lazy"):60116,$="function"==typeof Symbol&&Symbol.iterator;function C(e){for(var t=e.message,n="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)n+="&args[]="+encodeURIComponent(arguments[r]);return e.message="Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",e}var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T={};function _(e,t,n){this.props=e,this.context=t,this.refs=T,this.updater=n||D}function A(){}function L(e,t,n){this.props=e,this.context=t,this.refs=T,this.updater=n||D}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw C(Error(85));this.updater.enqueueSetState(this,e,t,"setState")},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},A.prototype=_.prototype;var M=L.prototype=new A;M.constructor=L,_e(M,_.prototype),M.isPureReactComponent=!0;var z={current:null},q={suspense:null},I={current:null},F=Object.prototype.hasOwnProperty,W={key:!0,ref:!0,__self:!0,__source:!0};function N(e,t,n){var r=void 0,o={},i=null,a=nullLine truncated
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).ArtplayerReact=t()}(this,(function(){"use strict";var e=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o};var t=function(t,n){if(null==t)return{};var r,o,i=e(t,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(o=0;o<a.length;o++)r=a[o],n.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i};var n=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function r(e,t){return e(t={exports:{}},t.exports),t.exports}var o=r((function(e){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(r){return"function"==typeof Symbol&&"symbol"===t(Symbol.iterator)?e.exports=n=function(e){return t(e)}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":t(e)},n(r)}e.exports=n}));var i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var c=function(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e};var u=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e};var s=function(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?u(e):t},l=r((function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(n)}e.exports=t})),f=r((function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(n,r)}e.exports=t}));var p=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)},d=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable;
|
||||
/*
|
||||
object-assign
|
||||
(c) Sindre Sorhus
|
||||
@license MIT
|
||||
*/function v(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var m=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,o=v(e),i=1;i<arguments.length;i++){for(var a in n=Object(arguments[i]))y.call(n,a)&&(o[a]=n[a]);if(d){r=d(n);for(var c=0;c<r.length;c++)h.call(n,r[c])&&(o[r[c]]=n[r[c]])}}return o},g="function"==typeof Symbol&&Symbol.for,b=g?Symbol.for("react.element"):60103,w=g?Symbol.for("react.portal"):60106,O=g?Symbol.for("react.fragment"):60107,k=g?Symbol.for("react.strict_mode"):60108,j=g?Symbol.for("react.profiler"):60114,P=g?Symbol.for("react.provider"):60109,x=g?Symbol.for("react.context"):60110,S=g?Symbol.for("react.forward_ref"):60112,E=g?Symbol.for("react.suspense"):60113,R=g?Symbol.for("react.suspense_list"):60120,$=g?Symbol.for("react.memo"):60115,C=g?Symbol.for("react.lazy"):60116,D="function"==typeof Symbol&&Symbol.iterator;function T(e){for(var t=e.message,n="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)n+="&args[]="+encodeURIComponent(arguments[r]);return e.message="Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",e}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A={};function L(e,t,n){this.props=e,this.context=t,this.refs=A,this.updater=n||_}function M(){}function z(e,t,n){this.props=e,this.context=t,this.refs=A,this.updater=n||_}L.prototype.isReactComponent={},L.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw T(Error(85));this.updater.enqueueSetState(this,e,t,"setState")},L.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},M.prototype=L.prototype;var q=z.prototype=new M;q.constructor=z,m(q,L.prototype),q.isPureReactComponent=!0;var I={current:null},F={suspense:null},W={current:null},N=Object.prototype.hasOwnProperty,V={key:!0,ref:!0,__self:!0,__source:!0};function U(e,t,n){var r=void 0,o={},i=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(i=""+t.key),t)N.call(t,r)&&!V.hasOwnProperty(r)&&(o[r]=t[r]);var c=arguments.length-2;if(1===c)o.children=n;else if(1<c){for(var u=Array(c),s=0;s<c;s++)u[s]=arguments[s+2];o.children=u}if(e&&e.defaultProps)for(r in c=e.defaultProps)void 0===o[r]&&(o[r]=c[r]);return{$$typeof:b,type:e,key:i,ref:a,props:o,_owner:W.current}}function H(e){return"object"==typeof e&&null!==e&&e.$$typeof===b}var B=/\/+/g,Y=[];function X(e,t,n,r){if(Y.length){var o=Y.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function Z(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>Y.length&&Y.push(e)}function J(e,t,n){return null==e?0:function e(t,n,r,o){var i=typeof t;"undefined"!==i&&"boolean"!==i||(t=null);var a=!1;if(null===t)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case b:case w:a=!0}}if(a)return r(o,t,""===n?"."+G(t,0):n),1;if(a=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;c<t.length;c++){var u=n+G(i=t[c],c);a+=e(i,u,r,o)}else if(null===t||"object"!=typeof t?u=null:u="function"==typeof(u=D&&t[D]||t["@@iterator"])?u:null,"function"==typeof u)for(t=u.call(t),c=0;!(i=t.next()).done;)a+=e(i=i.value,u=n+G(i,c++),r,o);else if("object"===i)throw r=""+t,T(Error(31),"[object Object]"===r?"object with keys {"+Object.keys(t).join(", ")+"}":r,"");return a}(e,"",t,n)}function G(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function Q(e,t){e.func.call(e.context,t,e.count++)}function K(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?ee(e,r,n,(function(e){return e})):null!=e&&(H(e)&&(e=function(e,t){return{$$typeof:b,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(B,"$&/")+"/")+n)),r.push(e))}function ee(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(B,"$&/")+"/"),J(e,K,t=X(t,i,r,o)),Z(t)}function te(){var e=I.current;if(null===e)throw T(Error(321));return e}var ne={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return ee(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;J(e,Q,t=X(null,null,t,n)),Z(t)},count:function(e){return J(e,(function(){return null}),null)},toLine truncated
|
||||
/*!
|
||||
* screenfull
|
||||
* v5.0.0 - 2019-09-09
|
||||
* (c) Sindre Sorhus; MIT License
|
||||
*/
|
||||
!function(){var t="undefined"!=typeof window&&void 0!==window.document?window.document:{},n=e.exports,r=function(){for(var e,n=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],r=0,o=n.length,i={};r<o;r++)if((e=n[r])&&e[1]in t){for(r=0;r<e.length;r++)i[n[0][r]]=e[r];return i}return!1}(),o={change:r.fullscreenchange,error:r.fullscreenerror},i={request:function(e){return new Promise(function(n,o){var i=function(){this.off("change",i),n()}.bind(this);this.on("change",i),e=e||t.documentElement,Promise.resolve(e[r.requestFullscreen]()).catch(o)}.bind(this))},exit:function(){return new Promise(function(e,n){if(this.isFullscreen){var o=function(){this.off("change",o),e()}.bind(this);this.on("change",o),Promise.resolve(t[r.exitFullscreen]()).catch(n)}else e()}.bind(this))},toggle:function(e){return this.isFullscreen?this.exit():this.request(e)},onchange:function(e){this.on("change",e)},onerror:function(e){this.on("error",e)},on:function(e,n){var r=o[e];r&&t.addEventListener(r,n,!1)},off:function(e,n){var r=o[e];r&&t.removeEventListener(r,n,!1)},raw:r};r?(Object.defineProperties(i,{isFullscreen:{get:function(){return Boolean(t[r.fullscreenElement])}},element:{enumerable:!0,get:function(){return t[r.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(t[r.fullscreenEnabled])}}}),n?e.exports=i:window.screenfull=i):n?e.exports={isEnabled:!1}:window.screenfull={isEnabled:!1}}()}));ot.isEnabled;function it(e,t){var n=e.template.$video;document.pictureInPictureEnabled?function(e,t){var n=e.template.$video,r=e.events.proxy,o=e.notice;n.disablePictureInPicture=!1,Object.defineProperty(t,"pip",{get:function(){return document.pictureInPictureElement},set:function(e){e?n.requestPictureInPicture().catch((function(e){throw o.show(e),e})):document.exitPictureInPicture().catch((function(e){throw o.show(e),e}))}}),r(n,"enterpictureinpicture",(function(){e.emit("pipEnabled")})),r(n,"leavepictureinpicture",(function(){e.emit("pipExit")})),e.on("destroy",(function(){t.pip&&(t.pip=!1)}))}(e,t):n.webkitSupportsPresentationMode?function(e,t){var n=e.template.$video;n.webkitSetPresentationMode("inline"),Object.defineProperty(t,"pip",{get:function(){return"picture-in-picture"===n.webkitPresentationMode},set:function(t){t?(n.webkitSetPresentationMode("picture-in-picture"),e.emit("pipEnabled")):(n.webkitSetPresentationMode("inline"),e.emit("pipExit"))}})}(e,t):function(e,t){var n=e.option,r=e.i18n,o=e.template,i=o.$player,a=o.$pipClose,c=o.$pipTitle,u=o.$pipHeader,s=e.events.proxy,l="",f=!1,p=0,d=0,y=0,h=0;s(u,"mousedown",(function(e){f=!0,p=e.pageX,d=e.pageY,y=t.left,h=t.top})),s(u,"mousemove",(function(e){f&&(ge(i,"is-dragging"),ke(i,"left","".concat(y+e.pageX-p,"px")),ke(i,"top","".concat(h+e.pageY-d,"px")))})),s(document,"mouseup",(function(){f=!1,be(i,"is-dragging")})),s(a,"click",(function(){t.pip=!1,f=!1,be(i,"is-dragging")})),Oe(c,n.title||r.get("Mini player"));var v={get:function(){return we(i,"artplayer-pip")},set:function(n){if(n){t.autoSize=!1,l=i.style.cssText,ge(i,"artplayer-pip");var r=document.body;ke(i,"top","".concat(r.clientHeight-t.height-50,"px")),ke(i,"left","".concat(r.clientWidth-t.width-50,"px")),t.fullscreen=!1,t.fullscreenWeb=!1,t.aspectRatio=!1,t.playbackRate=!1,e.emit("pipEnabled")}else t.pip&&(i.style.cssText=l,be(i,"artplayer-pip"),ke(i,"top",null),ke(i,"left",null),t.fullscreen=!1,t.fullscreenWeb=!1,t.aspectRatio=!1,t.playbackRate=!1,t.autoSize=!0,e.emit("pipExit"))}};Object.defineProperty(t,"pip",v)}(e,t),Object.defineProperty(t,"pipToggle",{set:function(e){e&&(t.pip=!t.pip)}})}var at=function e(t){var n;i(this,e),function(e,t){var n=e.option,r=n.type,o=n.customType,i=e.template.$video;Object.defineProperty(t,"url",{get:function(){return i.src},set:function(){De(!1,"You should use this method: art.attachUrl()")}}),Object.defineProperty(t,"attachUrl",{value:function(t){return Ue().then((function(){function n(t){var n=r||Le(t),a=o[n];return n&&a?(e.loading.show=!0,e.emit("beforeCustomType",n),a.call(e,i,t,e),e.emit("afterCustomType",n)):(e.emit("beforeAttachUrl",t),i.src=t,e.emit("afterAttachUrl",t)),Promise.resolve(t)}if("function"==typeof t){var a=t.call(e);return De("function"==typeof a.then,"If url is a function, it needs to return a promise."),a.then((function(t){return e.loading.show=!0,n(t)}))}return n(t)}))}})}(t,this),function(e,t){var n=e.option,Line truncated
|
||||
Vendored
+1
-1
@@ -5,4 +5,4 @@
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).ArtplayerToolGithub=e()}(this,function(){"use strict";var t;return function(t,e){t.exports=function(){var o=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},i=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),n.forEach(function(t){o(e,t,r[t])})}return e},t,a=(function(t){var e=function(i){var u,t=Object.prototype,s=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},o=e.iterator||"@@iterator",r=e.asyncIterator||"@@asyncIterator",n=e.toStringTag||"@@toStringTag";function a(t,e,r,n){var o=e&&e.prototype instanceof c?e:c,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(i,a,c){var u=f;return function(t,e){if(u===p)throw new Error("Generator is already running");if(u===y){if("throw"===t)throw e;return S()}for(c.method=t,c.arg=e;;){var r=c.delegate;if(r){var n=O(r,c);if(n){if(n===d)continue;return n}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if(u===f)throw u=y,c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);u=p;var o=h(i,a,c);if("normal"===o.type){if(u=c.done?y:l,o.arg===d)continue;return{value:o.arg,done:c.done}}"throw"===o.type&&(u=y,c.method="throw",c.arg=o.arg)}}}(t,r,a),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}i.wrap=a;var f="suspendedStart",l="suspendedYield",p="executing",y="completed",d={};function c(){}function g(){}function v(){}var m={};m[o]=function(){return this};var w=Object.getPrototypeOf,b=w&&w(w(P([])));b&&b!==t&&s.call(b,o)&&(m=b);var x=v.prototype=c.prototype=Object.create(m);function k(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function L(u){var e;this._invoke=function(r,n){function t(){return new Promise(function(t,e){!function e(t,r,n,o){var i=h(u[t],u,r);if("throw"!==i.type){var a=i.arg,c=a.value;return c&&"object"==typeof c&&s.call(c,"__await")?Promise.resolve(c.__await).then(function(t){e("next",t,n,o)},function(t){e("throw",t,n,o)}):Promise.resolve(c).then(function(t){a.value=t,n(a)},function(t){return e("throw",t,n,o)})}o(i.arg)}(r,n,t,e)})}return e=e?e.then(t,t):t()}}function O(t,e){var r=t.iterator[e.method];if(r===u){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=u,O(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var n=h(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,d;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=u),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function P(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(s.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=u,t.done=!0,t};return n.next=n}}return{next:S}}function S(){return{value:u,done:!0}}return g.prototype=x.constructor=v,v.constructor=g,v[n]=g.displayName="GeneratorFunction",i.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},i.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,n in t||(t[n]="GeneratorFunction")),t.prototype=Object.create(x),t},i.awrap=function(t){return{__await:t}},k(L.prototype),L.prototype[r]=function(){return this},i.AsyncIterator=L,i.async=function(t,e,r,n){var o=new L(a(t,e,r,n));return i.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},k(x),x[n]="Generator",x[o]=function(){return this},x.toString=function(){return"[object Generator]"},i.keys=function(r){var n=[];for(var t in r)n.push(t);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},i.values=P,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=u,this.done=!1,this.delegate=null,this.method="next",this.arg=u,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&s.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=u)},stop:function(){this.done=!0;var
Line truncated
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).ArtplayerToolGithub=e()}(this,(function(){"use strict";"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;return function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t,e){t.exports=function(){var t,e=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},r=function(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),o.forEach((function(r){e(t,r,n[r])}))}return t},n=(function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r,n){var o=e&&e.prototype instanceof d?e:d,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n=f;return function(o,i){if(n===l)throw new Error("Generator is already running");if(n===p){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=O(a,r);if(c){if(c===y)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=l;var u=s(t,e,r);if("normal"===u.type){if(n=r.done?p:h,u.arg===y)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=p,r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f="suspendedStart",h="suspendedYield",l="executing",p="completed",y={};function d(){}function g(){}function v(){}var m={};m[i]=function(){return this};var w=Object.getPrototypeOf,b=w&&w(w(P([])));b&&b!==r&&n.call(b,i)&&(m=b);var x=v.prototype=d.prototype=Object.create(m);function k(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function L(t){var e;this._invoke=function(r,o){function i(){return new Promise((function(e,i){!function e(r,o,i,a){var c=s(t[r],t,o);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==typeof f&&n.call(f,"__await")?Promise.resolve(f.__await).then((function(t){e("next",t,i,a)}),(function(t){e("throw",t,i,a)})):Promise.resolve(f).then((function(t){u.value=t,i(u)}),(function(t){return e("throw",t,i,a)}))}a(c.arg)}(r,o,e,i)}))}return e=e?e.then(i,i):i()}}function O(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,O(t,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=s(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function P(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:S}}function S(){return{value:e,done:!0}}return g.prototype=x.constructor=v,v.constructor=g,v[c]=g.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},k(L.prototype),L.prototype[a]=function(){return this},t.AsyncIterator=L,t.async=function(e,r,n,o){var i=new L(u(e,r,n,o));return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(x),x[c]="Generator",x[i]=function(){return this},x.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=P,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sentLine truncated
|
||||
Vendored
+1
-1
@@ -5,4 +5,4 @@
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).ArtplayerToolThumbnail=e()}(this,function(){"use strict";var o=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function i(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var t=function(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t};function e(t,e){return t(e={exports:{}},e.exports),e.exports}var n=e(function(e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=o=function(t){return n(t)}:e.exports=o=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)},o(t)}e.exports=o});var r=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t};var a=function(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?r(t):e},s=e(function(e){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(t)}e.exports=n}),u=e(function(n){function o(t,e){return n.exports=o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}n.exports=o});var l=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)};function c(){}c.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var o=this;function i(){o.off(t,i),e.apply(n,arguments)}return i._=e,this.on(t,i,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,i=n.length;o<i;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],i=[];if(o&&e)for(var r=0,a=o.length;r<a;r++)o[r].fn!==e&&o[r].fn._!==e&&i.push(o[r]);return i.length?n[t]=i:delete n[t],this}};var h=c,f=c;function p(e){return new Promise(function(t){return setTimeout(t,e)})}function d(t,e,n){return Math.max(Math.min(t,Math.max(e,n)),Math.min(e,n))}return h.TinyEmitter=f,function(){function n(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return o(this,n),(t=a(this,s(n).call(this))).processing=!1,t.option={},t.setup(Object.assign({},n.DEFAULTS,e)),t.video=n.creatVideo(),t.inputChange=t.inputChange.bind(r(t)),t.ondrop=t.ondrop.bind(r(t)),t.option.fileInput.addEventListener("change",t.inputChange),t.option.fileInput.addEventListener("dragover",n.ondragover),t.option.fileInput.addEventListener("drop",n.ondrop),t}return l(n,h),t(n,[{key:"ondrop",value:function(t){t.preventDefault();var e=t.dataTransfer.files[0];this.loadVideo(e)}},{key:"setup",value:function(t){var e=this,n=0<arguments.length&&void 0!==t?t:{};this.option=Object.assign({},this.option,n);var o=this.option,i=o.fileInput,r=o.delay,a=o.number,s=o.width,u=o.height,l=o.column;if(this.errorHandle(i instanceof Element,"The 'fileInput' is not a Element"),"INPUT"!==i.tagName||"file"!==i.type){i.style.position="relative";var c=document.createElement("input");c.type="file",c.style.position="absolute",c.style.width="100%",c.style.height="100%",c.style.left="0",c.style.top="0",c.style.right="0",c.style.bottom="0",c.style.opacity="0",i.appendChild(c),this.option.fileInput=c}return["delay","number","width","height","column"].forEach(function(t){e.errorHandle("number"==typeof e.option[t],"The '".concat(t,"' is not a number"))}),this.option.delay=d(r,10,1e3),this.option.number=d(a,10,1e3),this.option.width=d(s,10,1e3),this.option.height=d(u,10,1e3),this.option.column=d(l,1,1e3),this}},{key:"inputChange",value:function(){var t=this.option.fileInput.files[0];this.loadVideo(t)}},{key:"loadVideo",value:function(t){var e=this,n=this.option.delay;if(t){var o=this.video.canPlayType(t.type);this.errorHandle("maybe"===o||"probably"===o,"Playback of this file format is not supported: ".concat(t.type));var i=URL.createObjectURL(t);this.videoUrl=i,this.file=t,this.emit("file",this.file),this.video.src=i,p(n).then(function(){e.emit("video",e.video)}).catch(function(t){throw e.emit("error",t.message),t})}}},{key:"start",value:function(){var o=this,t=this.option,i=t.width,r=t.height,a=t.number,s=t.delay;this.density=a/this.video.duration,this.errorHandle(this.file&&this.video,"Please select the video file first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment..."),this.errorHandle(this.density<=1,"The preview density cannot be greater than 1, but goLine truncated
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).ArtplayerToolThumbnail=e()}(this,(function(){"use strict";var t=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function e(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var n=function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t};function o(t,e){return t(e={exports:{}},e.exports),e.exports}var i=o((function(t){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(o){return"function"==typeof Symbol&&"symbol"===e(Symbol.iterator)?t.exports=n=function(t){return e(t)}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":e(t)},n(o)}t.exports=n}));var r=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t};var a=function(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?r(t):e},s=o((function(t){function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},e(n)}t.exports=e})),u=o((function(t){function e(n,o){return t.exports=e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(n,o)}t.exports=e}));var l=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)};function c(){}c.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var o=this;function i(){o.off(t,i),e.apply(n,arguments)}return i._=e,this.on(t,i,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,i=n.length;o<i;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],i=[];if(o&&e)for(var r=0,a=o.length;r<a;r++)o[r].fn!==e&&o[r].fn._!==e&&i.push(o[r]);return i.length?n[t]=i:delete n[t],this}};var h=c,f=c;function p(t){return new Promise((function(e){return setTimeout(e,t)}))}function d(t,e,n){return Math.max(Math.min(t,Math.max(e,n)),Math.min(e,n))}return h.TinyEmitter=f,function(e){function o(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t(this,o),(e=a(this,s(o).call(this))).processing=!1,e.option={},e.setup(Object.assign({},o.DEFAULTS,n)),e.video=o.creatVideo(),e.inputChange=e.inputChange.bind(r(e)),e.ondrop=e.ondrop.bind(r(e)),e.option.fileInput.addEventListener("change",e.inputChange),e.option.fileInput.addEventListener("dragover",o.ondragover),e.option.fileInput.addEventListener("drop",o.ondrop),e}return l(o,e),n(o,[{key:"ondrop",value:function(t){t.preventDefault();var e=t.dataTransfer.files[0];this.loadVideo(e)}},{key:"setup",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.option=Object.assign({},this.option,e);var n=this.option,o=n.fileInput,i=n.delay,r=n.number,a=n.width,s=n.height,u=n.column;if(this.errorHandle(o instanceof Element,"The 'fileInput' is not a Element"),"INPUT"!==o.tagName||"file"!==o.type){o.style.position="relative";var l=document.createElement("input");l.type="file",l.style.position="absolute",l.style.width="100%",l.style.height="100%",l.style.left="0",l.style.top="0",l.style.right="0",l.style.bottom="0",l.style.opacity="0",o.appendChild(l),this.option.fileInput=l}return["delay","number","width","height","column"].forEach((function(e){t.errorHandle("number"==typeof t.option[e],"The '".concat(e,"' is not a number"))})),this.option.delay=d(i,10,1e3),this.option.number=d(r,10,1e3),this.option.width=d(a,10,1e3),this.option.height=d(s,10,1e3),this.option.column=d(u,1,1e3),this}},{key:"inputChange",value:function(){var t=this.option.fileInput.files[0];this.loadVideo(t)}},{key:"loadVideo",value:function(t){var e=this,n=this.option.delay;if(t){var o=this.video.canPlayType(t.type);this.errorHandle("maybe"===o||"probably"===o,"Playback of this file format is not supported: ".concat(t.type));var i=URL.createObjectURL(t);this.videoUrl=i,this.file=t,this.emit("file",this.file),this.video.src=i,p(n).then((function(){e.emit("video",e.video)})).catch((function(t){throw e.emit("error",t.message),t}))}}},{key:"start",value:function(){var t=this,e=this.option,n=e.width,o=e.height,i=e.number,r=e.delay;this.density=i/this.video.duration,this.errorHandle(this.file&&this.video,"Please select the video file first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment..."),this.errorHandle(this.density<=1,"The preview denLine truncated
|
||||
Vendored
+7
-1
@@ -5,4 +5,10 @@
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).ArtplayerVue=e()}(this,function(){"use strict";var c=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t};var s=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t};function t(t,e){return t(e={exports:{}},e.exports),e.exports}var a=t(function(e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(t){return n(t)}:e.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)},r(t)}e.exports=r});var o=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t};var u=function(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?o(t):e},l=t(function(e){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(t)}e.exports=n}),f=t(function(n){function r(t,e){return n.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(t,e)}n.exports=r});var e=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)},p=t(function(t,e){t.exports=function(){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r=Object.prototype.toString,s=function(t){if(void 0===t)return"undefined";if(null===t)return"null";var e=n(t);if("boolean"===e)return"boolean";if("string"===e)return"string";if("number"===e)return"number";if("symbol"===e)return"symbol";if("function"===e)return function(t){return"GeneratorFunction"===i(t)}(t)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(t))return"array";if(function(t){if(t.constructor&&"function"==typeof t.constructor.isBuffer)return t.constructor.isBuffer(t);return!1}(t))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(t){if(-1!==t.message.indexOf("callee"))return!0}return!1}(t))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(t))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(t))return"error";if(function(t){return t instanceof RegExp||"string"==typeof t.flags&&"boolean"==typeof t.ignoreCase&&"boolean"==typeof t.multiline&&"boolean"==typeof t.global}(t))return"regexp";switch(i(t)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(t){return"function"==typeof t.throw&&"function"==typeof t.return&&"function"==typeof t.next}(t))return"generator";switch(e=r.call(t)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")};function i(t){return t.constructor?t.constructor.name:null}function u(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:["option"];return l(t,e,n),f(t,e,n),function(o,a,c){var t=s(a),e=s(o);if("object"===t){if("object"!==e)throw new Error("[Type Error]: '".concat(c.join("."),"' require 'object' type, but got '").concat(e,"'"));Object.keys(a).forEach(function(t){var e=o[t],n=a[t],r=c.slice();r.push(t),l(e,n,r),f(e,n,r),u(e,n,r)})}if("array"===t){if("array"!==e)throw new Error("[Type Error]: '".concat(c.join("."),"' require 'array' type, but got '").concat(e,"'"));o.forEach(fuLine truncated
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).ArtplayerVue=e()}(this,(function(){"use strict";var t=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t};var e=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var r=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function i(t,e){return t(e={exports:{}},e.exports),e.exports}var o=i((function(t){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(r){return"function"==typeof Symbol&&"symbol"===e(Symbol.iterator)?t.exports=n=function(t){return e(t)}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":e(t)},n(r)}t.exports=n}));var a=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t};var c=function(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?a(t):e},s=i((function(t){function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},e(n)}t.exports=e})),u=i((function(t){function e(n,r){return t.exports=e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(n,r)}t.exports=e}));var l=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)},f=i((function(t,e){t.exports=function(){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var e=Object.prototype.toString,n=function(n){if(void 0===n)return"undefined";if(null===n)return"null";var i=t(n);if("boolean"===i)return"boolean";if("string"===i)return"string";if("number"===i)return"number";if("symbol"===i)return"symbol";if("function"===i)return function(t){return"GeneratorFunction"===r(t)}(n)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(n))return"array";if(function(t){return!(!t.constructor||"function"!=typeof t.constructor.isBuffer)&&t.constructor.isBuffer(t)}(n))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(t){if(-1!==t.message.indexOf("callee"))return!0}return!1}(n))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(n))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(n))return"error";if(function(t){return t instanceof RegExp||"string"==typeof t.flags&&"boolean"==typeof t.ignoreCase&&"boolean"==typeof t.multiline&&"boolean"==typeof t.global}(n))return"regexp";switch(r(n)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(t){return"function"==typeof t.throw&&"function"==typeof t.return&&"function"==typeof t.next}(n))return"generator";switch(i=e.call(n)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return i.slice(8,-1).toLowerCase().replace(/\s/g,"")};function r(t){return t.constructor?t.constructor.name:null}function i(t,e){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:["option"];return o(t,e,r),a(t,e,r),function(t,e,r){var c=n(e),s=n(t);if("object"===c){if("object"!==s)throw new Error("[Type Error]: '".concat(r.join("."),"' require 'object' type, but got '").concat(s,"'"));Object.keys(e).forEach((function(n){var c=t[n],s=e[n],u=r.slice();u.push(n),o(c,s,u),a(c,s,u),i(c,s,u)}))}if("aLine truncated
|
||||
/*!
|
||||
* screenfull
|
||||
* v5.0.0 - 2019-09-09
|
||||
* (c) Sindre Sorhus; MIT License
|
||||
*/
|
||||
!function(){var e="undefined"!=typeof window&&void 0!==window.document?window.document:{},n=t.exports,r=function(){for(var t,n=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],r=0,i=n.length,o={};r<i;r++)if((t=n[r])&&t[1]in e){for(r=0;r<t.length;r++)o[n[0][r]]=t[r];return o}return!1}(),i={change:r.fullscreenchange,error:r.fullscreenerror},o={request:function(t){return new Promise(function(n,i){var o=function(){this.off("change",o),n()}.bind(this);this.on("change",o),t=t||e.documentElement,Promise.resolve(t[r.requestFullscreen]()).catch(i)}.bind(this))},exit:function(){return new Promise(function(t,n){if(this.isFullscreen){var i=function(){this.off("change",i),t()}.bind(this);this.on("change",i),Promise.resolve(e[r.exitFullscreen]()).catch(n)}else t()}.bind(this))},toggle:function(t){return this.isFullscreen?this.exit():this.request(t)},onchange:function(t){this.on("change",t)},onerror:function(t){this.on("error",t)},on:function(t,n){var r=i[t];r&&e.addEventListener(r,n,!1)},off:function(t,n){var r=i[t];r&&e.removeEventListener(r,n,!1)},raw:r};r?(Object.defineProperties(o,{isFullscreen:{get:function(){return Boolean(e[r.fullscreenElement])}},element:{enumerable:!0,get:function(){return e[r.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(e[r.fullscreenEnabled])}}}),n?t.exports=o:window.screenfull=o):n?t.exports={isEnabled:!1}:window.screenfull={isEnabled:!1}}()}));et.isEnabled;function nt(t,e){var n=t.template.$video;document.pictureInPictureEnabled?function(t,e){var n=t.template.$video,r=t.events.proxy,i=t.notice;n.disablePictureInPicture=!1,Object.defineProperty(e,"pip",{get:function(){return document.pictureInPictureElement},set:function(t){t?n.requestPictureInPicture().catch((function(t){throw i.show(t),t})):document.exitPictureInPicture().catch((function(t){throw i.show(t),t}))}}),r(n,"enterpictureinpicture",(function(){t.emit("pipEnabled")})),r(n,"leavepictureinpicture",(function(){t.emit("pipExit")})),t.on("destroy",(function(){e.pip&&(e.pip=!1)}))}(t,e):n.webkitSupportsPresentationMode?function(t,e){var n=t.template.$video;n.webkitSetPresentationMode("inline"),Object.defineProperty(e,"pip",{get:function(){return"picture-in-picture"===n.webkitPresentationMode},set:function(e){e?(n.webkitSetPresentationMode("picture-in-picture"),t.emit("pipEnabled")):(n.webkitSetPresentationMode("inline"),t.emit("pipExit"))}})}(t,e):function(t,e){var n=t.option,r=t.i18n,i=t.template,o=i.$player,a=i.$pipClose,c=i.$pipTitle,s=i.$pipHeader,u=t.events.proxy,l="",f=!1,p=0,d=0,h=0,w=0;u(s,"mousedown",(function(t){f=!0,p=t.pageX,d=t.pageY,h=e.left,w=e.top})),u(s,"mousemove",(function(t){f&&(y(o,"is-dragging"),b(o,"left","".concat(h+t.pageX-p,"px")),b(o,"top","".concat(w+t.pageY-d,"px")))})),u(document,"mouseup",(function(){f=!1,v(o,"is-dragging")})),u(a,"click",(function(){e.pip=!1,f=!1,v(o,"is-dragging")})),g(c,n.title||r.get("Mini player"));var O={get:function(){return m(o,"artplayer-pip")},set:function(n){if(n){e.autoSize=!1,l=o.style.cssText,y(o,"artplayer-pip");var r=document.body;b(o,"top","".concat(r.clientHeight-e.height-50,"px")),b(o,"left","".concat(r.clientWidth-e.width-50,"px")),e.fullscreen=!1,e.fullscreenWeb=!1,e.aspectRatio=!1,e.playbackRate=!1,t.emit("pipEnabled")}else e.pip&&(o.style.cssText=l,v(o,"artplayer-pip"),b(o,"top",null),b(o,"left",null),e.fullscreen=!1,e.fullscreenWeb=!1,e.aspectRatio=!1,e.playbackRate=!1,e.autoSize=!0,t.emit("pipExit"))}};Object.defineProperty(e,"pip",O)}(t,e),Object.defineProperty(e,"pipToggle",{set:function(t){t&&(e.pip=!e.pip)}})}var rt=function t(n){var r;e(this,t),function(t,e){var n=t.option,r=n.type,i=n.customType,o=t.template.$video;Object.defineProperty(e,"url",{get:function(){return o.src},set:function(){$(!1,"You should use this method: art.attachUrl()")}}),Object.defineProperty(e,"attachUrl",{value:function(e){return V().then((function(){function n(e){var n=r||C(e),a=i[n];return n&&a?(t.loading.show=!0,t.emit("beforeCustomType",n),a.call(t,o,e,t),t.emit("afterCustomType",n)):(t.emit("beforeAttachUrl",e),o.src=e,t.emit("afterAttachUrl",e)),Promise.resolve(e)}if("function"==typeof e){var a=e.call(t);return $("function"==typeof a.then,"If url is a function, it needs to return a promise."),a.then((function(e){return t.loading.show=!0,n(e)}))}return n(e)}))}})}(n,this),function(t,e){var n=t.option,r=t.events.proxy,Line truncated
|
||||
Vendored
+7
-1
@@ -5,4 +5,10 @@
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Artplayer=e()}(this,function(){"use strict";var c=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t};function t(t,e){return t(e={exports:{}},e.exports),e.exports}var a=t(function(e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(t){return n(t)}:e.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)},r(t)}e.exports=r});var o=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t};var s=function(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?o(t):e},u=t(function(e){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(t)}e.exports=n}),l=t(function(n){function r(t,e){return n.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(t,e)}n.exports=r});var e=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)},f=t(function(t,e){t.exports=function(){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r=Object.prototype.toString,s=function(t){if(void 0===t)return"undefined";if(null===t)return"null";var e=n(t);if("boolean"===e)return"boolean";if("string"===e)return"string";if("number"===e)return"number";if("symbol"===e)return"symbol";if("function"===e)return function(t){return"GeneratorFunction"===i(t)}(t)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(t))return"array";if(function(t){if(t.constructor&&"function"==typeof t.constructor.isBuffer)return t.constructor.isBuffer(t);return!1}(t))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(t){if(-1!==t.message.indexOf("callee"))return!0}return!1}(t))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(t))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(t))return"error";if(function(t){return t instanceof RegExp||"string"==typeof t.flags&&"boolean"==typeof t.ignoreCase&&"boolean"==typeof t.multiline&&"boolean"==typeof t.global}(t))return"regexp";switch(i(t)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(t){return"function"==typeof t.throw&&"function"==typeof t.return&&"function"==typeof t.next}(t))return"generator";switch(e=r.call(t)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")};function i(t){return t.constructor?t.constructor.name:null}function u(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:["option"];return l(t,e,n),f(t,e,n),function(o,a,c){var t=s(a),e=s(o);if("object"===t){if("object"!==e)throw new Error("[Type Error]: '".concat(c.join("."),"' require 'object' type, but got '").concat(e,"'"));Object.keys(a).forEach(function(t){var e=o[t],n=a[t],r=c.slice();r.push(t),l(e,n,r),f(e,n,r),u(e,n,r)})}if("array"===t){if("array"!==e)throw new Error("[Type Error]: '".concat(c.join("."),"' require 'array' type, but got '").concat(e,"'"));o.forEach(function(t,e){var n=o[e],r=a[e]||a[0],i=c.slice();i.push(e),l(n,r,i),f(n,r,i),u(n,r,i)})}}(t,e,n),t}function l(t,e,n){if("string"=Line truncated
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Artplayer=e()}(this,(function(){"use strict";var t=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var n=function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function r(t,e){return t(e={exports:{}},e.exports),e.exports}var i=r((function(t){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(r){return"function"==typeof Symbol&&"symbol"===e(Symbol.iterator)?t.exports=n=function(t){return e(t)}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":e(t)},n(r)}t.exports=n}));var o=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t};var a=function(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?o(t):e},c=r((function(t){function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},e(n)}t.exports=e})),s=r((function(t){function e(n,r){return t.exports=e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(n,r)}t.exports=e}));var u=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)},l=r((function(t,e){t.exports=function(){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var e=Object.prototype.toString,n=function(n){if(void 0===n)return"undefined";if(null===n)return"null";var i=t(n);if("boolean"===i)return"boolean";if("string"===i)return"string";if("number"===i)return"number";if("symbol"===i)return"symbol";if("function"===i)return function(t){return"GeneratorFunction"===r(t)}(n)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(n))return"array";if(function(t){return!(!t.constructor||"function"!=typeof t.constructor.isBuffer)&&t.constructor.isBuffer(t)}(n))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(t){if(-1!==t.message.indexOf("callee"))return!0}return!1}(n))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(n))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(n))return"error";if(function(t){return t instanceof RegExp||"string"==typeof t.flags&&"boolean"==typeof t.ignoreCase&&"boolean"==typeof t.multiline&&"boolean"==typeof t.global}(n))return"regexp";switch(r(n)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(t){return"function"==typeof t.throw&&"function"==typeof t.return&&"function"==typeof t.next}(n))return"generator";switch(i=e.call(n)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return i.slice(8,-1).toLowerCase().replace(/\s/g,"")};function r(t){return t.constructor?t.constructor.name:null}function i(t,e){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:["option"];return o(t,e,r),a(t,e,r),function(t,e,r){var c=n(e),s=n(t);if("object"===c){if("object"!==s)throw new Error("[Type Error]: '".concat(r.join("."),"' require 'object' type, but got '").concat(s,"'"));Object.keys(e).forEach((function(n){var c=t[n],s=e[n],u=r.slice();u.push(n),o(c,s,u),a(c,s,u),i(c,s,u)}))}if("array"===c){if("array"!==s)throw new Error("[Type Error]: '".concat(r.join("."),"' require 'array' type, but got '").concat(s,"'"Line truncated
|
||||
/*!
|
||||
* screenfull
|
||||
* v5.0.0 - 2019-09-09
|
||||
* (c) Sindre Sorhus; MIT License
|
||||
*/
|
||||
!function(){var e="undefined"!=typeof window&&void 0!==window.document?window.document:{},n=t.exports,r=function(){for(var t,n=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],r=0,i=n.length,o={};r<i;r++)if((t=n[r])&&t[1]in e){for(r=0;r<t.length;r++)o[n[0][r]]=t[r];return o}return!1}(),i={change:r.fullscreenchange,error:r.fullscreenerror},o={request:function(t){return new Promise(function(n,i){var o=function(){this.off("change",o),n()}.bind(this);this.on("change",o),t=t||e.documentElement,Promise.resolve(t[r.requestFullscreen]()).catch(i)}.bind(this))},exit:function(){return new Promise(function(t,n){if(this.isFullscreen){var i=function(){this.off("change",i),t()}.bind(this);this.on("change",i),Promise.resolve(e[r.exitFullscreen]()).catch(n)}else t()}.bind(this))},toggle:function(t){return this.isFullscreen?this.exit():this.request(t)},onchange:function(t){this.on("change",t)},onerror:function(t){this.on("error",t)},on:function(t,n){var r=i[t];r&&e.addEventListener(r,n,!1)},off:function(t,n){var r=i[t];r&&e.removeEventListener(r,n,!1)},raw:r};r?(Object.defineProperties(o,{isFullscreen:{get:function(){return Boolean(e[r.fullscreenElement])}},element:{enumerable:!0,get:function(){return e[r.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(e[r.fullscreenEnabled])}}}),n?t.exports=o:window.screenfull=o):n?t.exports={isEnabled:!1}:window.screenfull={isEnabled:!1}}()}));tt.isEnabled;function et(t,e){var n=t.template.$video;document.pictureInPictureEnabled?function(t,e){var n=t.template.$video,r=t.events.proxy,i=t.notice;n.disablePictureInPicture=!1,Object.defineProperty(e,"pip",{get:function(){return document.pictureInPictureElement},set:function(t){t?n.requestPictureInPicture().catch((function(t){throw i.show(t),t})):document.exitPictureInPicture().catch((function(t){throw i.show(t),t}))}}),r(n,"enterpictureinpicture",(function(){t.emit("pipEnabled")})),r(n,"leavepictureinpicture",(function(){t.emit("pipExit")})),t.on("destroy",(function(){e.pip&&(e.pip=!1)}))}(t,e):n.webkitSupportsPresentationMode?function(t,e){var n=t.template.$video;n.webkitSetPresentationMode("inline"),Object.defineProperty(e,"pip",{get:function(){return"picture-in-picture"===n.webkitPresentationMode},set:function(e){e?(n.webkitSetPresentationMode("picture-in-picture"),t.emit("pipEnabled")):(n.webkitSetPresentationMode("inline"),t.emit("pipExit"))}})}(t,e):function(t,e){var n=t.option,r=t.i18n,i=t.template,o=i.$player,a=i.$pipClose,c=i.$pipTitle,s=i.$pipHeader,u=t.events.proxy,l="",f=!1,p=0,d=0,b=0,w=0;u(s,"mousedown",(function(t){f=!0,p=t.pageX,d=t.pageY,b=e.left,w=e.top})),u(s,"mousemove",(function(t){f&&(h(o,"is-dragging"),g(o,"left","".concat(b+t.pageX-p,"px")),g(o,"top","".concat(w+t.pageY-d,"px")))})),u(document,"mouseup",(function(){f=!1,y(o,"is-dragging")})),u(a,"click",(function(){e.pip=!1,f=!1,y(o,"is-dragging")})),m(c,n.title||r.get("Mini player"));var O={get:function(){return v(o,"artplayer-pip")},set:function(n){if(n){e.autoSize=!1,l=o.style.cssText,h(o,"artplayer-pip");var r=document.body;g(o,"top","".concat(r.clientHeight-e.height-50,"px")),g(o,"left","".concat(r.clientWidth-e.width-50,"px")),e.fullscreen=!1,e.fullscreenWeb=!1,e.aspectRatio=!1,e.playbackRate=!1,t.emit("pipEnabled")}else e.pip&&(o.style.cssText=l,y(o,"artplayer-pip"),g(o,"top",null),g(o,"left",null),e.fullscreen=!1,e.fullscreenWeb=!1,e.aspectRatio=!1,e.playbackRate=!1,e.autoSize=!0,t.emit("pipExit"))}};Object.defineProperty(e,"pip",O)}(t,e),Object.defineProperty(e,"pipToggle",{set:function(t){t&&(e.pip=!e.pip)}})}var nt=function e(n){var r;t(this,e),function(t,e){var n=t.option,r=n.type,i=n.customType,o=t.template.$video;Object.defineProperty(e,"url",{get:function(){return o.src},set:function(){S(!1,"You should use this method: art.attachUrl()")}}),Object.defineProperty(e,"attachUrl",{value:function(e){return H().then((function(){function n(e){var n=r||D(e),a=i[n];return n&&a?(t.loading.show=!0,t.emit("beforeCustomType",n),a.call(t,o,e,t),t.emit("afterCustomType",n)):(t.emit("beforeAttachUrl",e),o.src=e,t.emit("afterAttachUrl",e)),Promise.resolve(e)}if("function"==typeof e){var a=e.call(t);return S("function"==typeof a.then,"If url is a function, it needs to return a promise."),a.then((function(e){return t.loading.show=!0,n(e)}))}return n(e)}))}})}(n,this),function(t,e){var n=t.option,r=t.events.proxy,Line truncated
|
||||
+3
-2
@@ -62,9 +62,10 @@
|
||||
"rollup-plugin-node-resolve": "^5.2.0",
|
||||
"rollup-plugin-postcss": "^2.0.3",
|
||||
"rollup-plugin-replace": "^2.2.0",
|
||||
"rollup-plugin-size-snapshot": "^0.10.0",
|
||||
"rollup-plugin-svgo": "^1.1.0",
|
||||
"rollup-plugin-uglify": "^6.0.3",
|
||||
"rollup-plugin-terser": "^5.1.2",
|
||||
"servor": "^2.2.1",
|
||||
"travis-size-report": "^1.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,4 +5,4 @@
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).artplayerPluginBacklight=e()}(this,function(){"use strict";function l(t){for(var e=[],n=0;n<10;n+=1)for(var o=0;o<5;o+=1)0!==n&&9!==n&&0!==o&&4!==o||e.push(t(n,o,10,5));return e}return function(o){var t=o.constructor.utils.setStyles,e=o.template,n=e.$player,a=e.$video,r=o.player,i=document.createElement("div");i.classList.add("artplayer-backlight"),t(i,{position:"absolute",zIndex:9,left:0,top:0,right:0,bottom:0,width:"100%",height:"100%"});var h=function(r){return l(function(t,e,n,o){var a=document.createElement("div");return a.style.position="absolute",a.style.left="".concat(100*t/n,"%"),a.style.top="".concat(100*e/o,"%"),a.style.width="".concat(100/n,"%"),a.style.height="".concat(100/o,"%"),a.style.webkitBorderRadius="50%",a.style.borderRadius="50%",a.style.webkitTransition="all .2s ease",a.style.transition="all .2s ease",r.appendChild(a),{$box:a,left:0===t,right:t===n-1,top:0===e,bottom:e===o-1}})}(i),c=document.createElement("canvas");return n.insertBefore(i,a),function n(){window.requestAnimationFrame(function(){if(r.playing){var t=a.clientWidth,e=a.clientHeight;(function(t,e,p,g){var y=t.getContext("2d");return t.width=p,t.height=g,y.drawImage(e,0,0),l(function(t,e,n,o){for(var a=p/n,r=g/o,i=t*a,c=e*r,l=y.getImageData(i,c,a,r).data,s=0,u=0,d=0,f=0,h=l.length;f<h;f+=4)s+=l[f],u+=l[f+1],d+=l[f+2];return{r:s=Math.floor(s/(l.length/4)),g:u=Math.floor(u/(l.length/4)),b:d=Math.floor(d/(l.length/4))}})})(c,a,t,e).forEach(function(t,e){var n=t.r,o=t.g,a=t.b,r=h[e],i=r.$box,c=r.left,l=r.right,s=r.top,u=r.bottom,d=c?"-64px":l?"64px":"0",f=s?"-64px":u?"64px":"0";i.style.webkitBoxShadow="rgb(".concat(n,", ").concat(o,", ").concat(a,") ").concat(d," ").concat(f," 128px"),i.style.boxShadow="rgb(".concat(n,", ").concat(o,", ").concat(a,") ").concat(d," ").concat(f," 128px")})}o.isDestroy||n()})}(),{name:"artplayerPluginBacklight"}}});
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).artplayerPluginBacklight=e()}(this,(function(){"use strict";function t(t){for(var e=[],o=0;o<10;o+=1)for(var n=0;n<5;n+=1)0!==o&&9!==o&&0!==n&&4!==n||e.push(t(o,n,10,5));return e}return function(e){var o=e.constructor.utils.setStyles,n=e.template,a=n.$player,r=n.$video,i=e.player,c=document.createElement("div");c.classList.add("artplayer-backlight"),o(c,{position:"absolute",zIndex:9,left:0,top:0,right:0,bottom:0,width:"100%",height:"100%"});var l,s=(l=c,t((function(t,e,o,n){var a=document.createElement("div");return a.style.position="absolute",a.style.left="".concat(100*t/o,"%"),a.style.top="".concat(100*e/n,"%"),a.style.width="".concat(100/o,"%"),a.style.height="".concat(100/n,"%"),a.style.webkitBorderRadius="50%",a.style.borderRadius="50%",a.style.webkitTransition="all .2s ease",a.style.transition="all .2s ease",l.appendChild(a),{$box:a,left:0===t,right:t===o-1,top:0===e,bottom:e===n-1}}))),u=document.createElement("canvas");return a.insertBefore(c,r),function o(){window.requestAnimationFrame((function(){if(i.playing){var n=r.clientWidth,a=r.clientHeight;(function(e,o,n,a){var r=e.getContext("2d");return e.width=n,e.height=a,r.drawImage(o,0,0),t((function(t,e,o,i){for(var c=n/o,l=a/i,s=t*c,u=e*l,d=r.getImageData(s,u,c,l).data,f=0,h=0,p=0,g=0,y=d.length;g<y;g+=4)f+=d[g],h+=d[g+1],p+=d[g+2];return{r:f=Math.floor(f/(d.length/4)),g:h=Math.floor(h/(d.length/4)),b:p=Math.floor(p/(d.length/4))}}))})(u,r,n,a).forEach((function(t,e){var o=t.r,n=t.g,a=t.b,r=s[e],i=r.$box,c=r.left,l=r.right,u=r.top,d=r.bottom,f=c?"-64px":l?"64px":"0",h=u?"-64px":d?"64px":"0";i.style.webkitBoxShadow="rgb(".concat(o,", ").concat(n,", ").concat(a,") ").concat(f," ").concat(h," 128px"),i.style.boxShadow="rgb(".concat(o,", ").concat(n,", ").concat(a,") ").concat(f," ").concat(h," 128px")}))}e.isDestroy||o()}))}(),{name:"artplayerPluginBacklight"}}}));
|
||||
@@ -5,4 +5,4 @@
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).artplayerPluginDanmuku=e()}(this,function(){"use strict";var a=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t};var r=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var t=function(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t},o={"zh-cn":{"Danmu opacity":"弹幕透明度","Danmu speed":"弹幕速度","Danmu size":"弹幕大小","Danmu text cannot be empty":"弹幕文本不能为空","The length of the danmu does not exceed":"弹幕文本字数不能超过","Danmu speed synchronous playback multiple":"弹幕速度同步播放倍数"},"zh-tw":{"Danmu opacity":"彈幕透明度","Danmu speed":"彈幕速度","Danmu size":"弹幕大小","Danmu text cannot be empty":"彈幕文本不能為空","The length of the danmu does not exceed":"彈幕文本字數不能超過","Danmu speed synchronous playback multiple":"彈幕速度同步播放倍數"}};function u(r){var t=r.i18n,i=r.events.proxy;return{name:"danmuku-opacity",index:10,html:'\n <div class="art-setting-header">\n '.concat(t.get("Danmu opacity"),': <span class="art-value">100</span>%\n </div>\n <div class="art-setting-range">\n <input type="range" value="1" min="0.1" max="1" step="0.1">\n </div>\n '),mounted:function(t){var e=t.querySelector("input[type=range]"),n=t.querySelector(".art-value");i(e,"change",function(){var t=e.value;n.innerText=100*Number(t),r.plugins.artplayerPluginDanmuku.config({opacity:Number(t)})}),r.on("artplayerPluginDanmuku:config",function(t){e.value!==t.opacity&&(e.value=t.opacity,n.innerText=100*t.opacity)})}}}function s(r){var t=r.i18n,i=r.events.proxy;return{name:"danmuku-size",index:11,html:'\n <div class="art-setting-header">\n '.concat(t.get("Danmu size"),': <span class="art-value">25</span>px\n </div>\n <div class="art-setting-range">\n <input type="range" value="25" min="14" max="30" step="1">\n </div>\n '),mounted:function(t){var e=t.querySelector("input[type=range]"),n=t.querySelector(".art-value");i(e,"change",function(){var t=e.value;n.innerText=t,r.plugins.artplayerPluginDanmuku.config({fontSize:Number(t)})}),r.on("artplayerPluginDanmuku:config",function(t){e.value!==t.fontSize&&(e.value=t.fontSize,n.innerText=t.fontSize)})}}}function l(r){var t=r.i18n,i=r.events.proxy;return{name:"danmuku-speed",index:12,html:'\n <div class="art-setting-header">\n '.concat(t.get("Danmu speed"),': <span class="art-value">5</span>s\n </div>\n <div class="art-setting-range">\n <input type="range" value="5" min="1" max="10" step="1">\n </div>\n '),mounted:function(t){var e=t.querySelector("input[type=range]"),n=t.querySelector(".art-value");i(e,"change",function(){var t=e.value;n.innerText=t,r.plugins.artplayerPluginDanmuku.config({speed:Number(t)})}),r.on("artplayerPluginDanmuku:config",function(t){e.value!==t.speed&&(e.value=t.speed,n.innerText=t.speed)})}}}function c(n){var t=n.i18n,r=n.events.proxy;return{name:"danmuku-synchronousPlayback",index:13,html:'\n <label class="art-setting-checkbox">\n <input type="checkbox"/>'.concat(t.get("Danmu speed synchronous playback multiple"),"\n </label>\n "),mounted:function(t){var e=t.querySelector("input[type=checkbox]");r(e,"change",function(){n.plugins.artplayerPluginDanmuku.config({synchronousPlayback:e.checked})}),n.on("artplayerPluginDanmuku:config",function(t){e.checked!==t.synchronousPlayback&&(e.checked=t.synchronousPlayback)})}}}function n(t,e,n){return t.filter(function(t){return t.$state===e}).map(n)}function p(t,e){var n=t.getBoundingClientRect();return e?n[e]:n}var f=function(t){if(Array.isArray(t))return t};var m=function(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var n=[],r=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(r=(o=u.next()).done)&&(n.push(o.value),!e||n.length!==e);r=!0);}catch(t){i=!0,a=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw a}}return n}};var h=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")};var x=function(t,e){return f(t)||m(t,e)||h()};function d(t){if("string"!=typeof t)return[];var e=t.match(/<d([\S ]*?>[\S ]*?)<\/d>/gi);return e.length?e.map(function(t){var e=t.match(/<d p="(.+)">(.+)<\/d>/),n=x(e,3),r=n[1],i=n[2],a=r.split(",");return 8===a.length&&i.trim()?{text:i,time:Number(a[0]),mode:function(t){switch(t){case 1:case 2:case 3:return"scroLine truncated
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).artplayerPluginDanmuku=e()}(this,(function(){"use strict";var t=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t};var e=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var r=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t},i={"zh-cn":{"Danmu opacity":"弹幕透明度","Danmu speed":"弹幕速度","Danmu size":"弹幕大小","Danmu text cannot be empty":"弹幕文本不能为空","The length of the danmu does not exceed":"弹幕文本字数不能超过","Danmu speed synchronous playback multiple":"弹幕速度同步播放倍数"},"zh-tw":{"Danmu opacity":"彈幕透明度","Danmu speed":"彈幕速度","Danmu size":"弹幕大小","Danmu text cannot be empty":"彈幕文本不能為空","The length of the danmu does not exceed":"彈幕文本字數不能超過","Danmu speed synchronous playback multiple":"彈幕速度同步播放倍數"}};function a(t){var e=t.i18n,n=t.events.proxy;return{name:"danmuku-opacity",index:10,html:'\n <div class="art-setting-header">\n '.concat(e.get("Danmu opacity"),': <span class="art-value">100</span>%\n </div>\n <div class="art-setting-range">\n <input type="range" value="1" min="0.1" max="1" step="0.1">\n </div>\n '),mounted:function(e){var r=e.querySelector("input[type=range]"),i=e.querySelector(".art-value");n(r,"change",(function(){var e=r.value;i.innerText=100*Number(e),t.plugins.artplayerPluginDanmuku.config({opacity:Number(e)})})),t.on("artplayerPluginDanmuku:config",(function(t){r.value!==t.opacity&&(r.value=t.opacity,i.innerText=100*t.opacity)}))}}}function o(t){var e=t.i18n,n=t.events.proxy;return{name:"danmuku-size",index:11,html:'\n <div class="art-setting-header">\n '.concat(e.get("Danmu size"),': <span class="art-value">25</span>px\n </div>\n <div class="art-setting-range">\n <input type="range" value="25" min="14" max="30" step="1">\n </div>\n '),mounted:function(e){var r=e.querySelector("input[type=range]"),i=e.querySelector(".art-value");n(r,"change",(function(){var e=r.value;i.innerText=e,t.plugins.artplayerPluginDanmuku.config({fontSize:Number(e)})})),t.on("artplayerPluginDanmuku:config",(function(t){r.value!==t.fontSize&&(r.value=t.fontSize,i.innerText=t.fontSize)}))}}}function u(t){var e=t.i18n,n=t.events.proxy;return{name:"danmuku-speed",index:12,html:'\n <div class="art-setting-header">\n '.concat(e.get("Danmu speed"),': <span class="art-value">5</span>s\n </div>\n <div class="art-setting-range">\n <input type="range" value="5" min="1" max="10" step="1">\n </div>\n '),mounted:function(e){var r=e.querySelector("input[type=range]"),i=e.querySelector(".art-value");n(r,"change",(function(){var e=r.value;i.innerText=e,t.plugins.artplayerPluginDanmuku.config({speed:Number(e)})})),t.on("artplayerPluginDanmuku:config",(function(t){r.value!==t.speed&&(r.value=t.speed,i.innerText=t.speed)}))}}}function s(t){var e=t.i18n,n=t.events.proxy;return{name:"danmuku-synchronousPlayback",index:13,html:'\n <label class="art-setting-checkbox">\n <input type="checkbox"/>'.concat(e.get("Danmu speed synchronous playback multiple"),"\n </label>\n "),mounted:function(e){var r=e.querySelector("input[type=checkbox]");n(r,"change",(function(){t.plugins.artplayerPluginDanmuku.config({synchronousPlayback:r.checked})})),t.on("artplayerPluginDanmuku:config",(function(t){r.checked!==t.synchronousPlayback&&(r.checked=t.synchronousPlayback)}))}}}function l(t,e,n){return t.filter((function(t){return t.$state===e})).map(n)}function c(t,e){var n=t.getBoundingClientRect();return e?n[e]:n}var p=function(t){if(Array.isArray(t))return t};var f=function(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var n=[],r=!0,i=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(r=(o=u.next()).done)&&(n.push(o.value),!e||n.length!==e);r=!0);}catch(t){i=!0,a=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw a}}return n}};var m=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")};var h=function(t,e){return p(t)||f(t,e)||m()};function d(t){switch(t){case 1:case 2:case 3:return"scroll";case 4:case 5:return"static";default:return null}}function y(t){return fetch(t).then((function(t){return t.text()})).then((function(t){return function(t){if("string"!=typeof t)return[];var e=t.match(/<d([\S ]*?>[\S ]*?)<\/d>/gi);return
Line truncated
|
||||
@@ -5,4 +5,4 @@
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).artplayerPluginGif=t()}(this,function(){"use strict";var S=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e};function e(e,t){return e(t={exports:{}},t.exports),t.exports}var x=e(function(S,e){!function(e,z,t,G){function r(){}var i,n,B={URL:e.URL||e.webkitURL||e.mozURL||e.msURL,getUserMedia:(n=t.getUserMedia||t.webkitGetUserMedia||t.mozGetUserMedia||t.msGetUserMedia,n?n.bind(t):n),requestAnimFrame:e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame,requestTimeout:function(r,i){if(r=r||B.noop,i=i||0,!B.requestAnimFrame)return setTimeout(r,i);var n=(new Date).getTime(),o=new Object,a=B.requestAnimFrame;return o.value=a(function e(){var t=(new Date).getTime();i<=t-n?r.call():o.value=a(e)}),o},Blob:e.Blob||e.BlobBuilder||e.WebKitBlobBuilder||e.MozBlobBuilder||e.MSBlobBuilder,btoa:(i=e.btoa||function(e){for(var t="",r=0,i=e.length,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=void 0,a=void 0,s=void 0,c=void 0,d=void 0,l=void 0,u=void 0;r<i;)c=(o=e.charCodeAt(r++))>>2,d=(3&o)<<4|(a=e.charCodeAt(r++))>>4,l=(15&a)<<2|(s=e.charCodeAt(r++))>>6,u=63&s,isNaN(a)?l=u=64:isNaN(s)&&(u=64),t=t+n.charAt(c)+n.charAt(d)+n.charAt(l)+n.charAt(u);return t},i?i.bind(e):B.noop),isObject:function(e){return e&&"[object Object]"===Object.prototype.toString.call(e)},isEmptyObject:function(e){return B.isObject(e)&&!Object.keys(e).length},isArray:function(e){return e&&Array.isArray(e)},isFunction:function(e){return e&&"function"==typeof e},isElement:function(e){return e&&1===e.nodeType},isString:function(e){return"string"==typeof e||"[object String]"===Object.prototype.toString.call(e)},isSupported:{canvas:function(){var e=z.createElement("canvas");return e&&e.getContext&&e.getContext("2d")},webworkers:function(){return e.Worker},blob:function(){return B.Blob},Uint8Array:function(){return e.Uint8Array},Uint32Array:function(){return e.Uint32Array},videoCodecs:function(){var e=z.createElement("video"),t={mp4:!1,h264:!1,ogv:!1,ogg:!1,webm:!1};try{e&&e.canPlayType&&(t.mp4=""!==e.canPlayType('video/mp4; codecs="mp4v.20.8"'),t.h264=""!==(e.canPlayType('video/mp4; codecs="avc1.42E01E"')||e.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"')),t.ogv=""!==e.canPlayType('video/ogg; codecs="theora"'),t.ogg=""!==e.canPlayType('video/ogg; codecs="theora"'),t.webm=-1!==e.canPlayType('video/webm; codecs="vp8, vorbis"'))}catch(e){}return t}()},noop:function(){},each:function(e,t){var r=void 0,i=void 0;if(B.isArray(e))for(r=-1,i=e.length;++r<i&&!1!==t(r,e[r]););else if(B.isObject(e))for(r in e)if(e.hasOwnProperty(r)&&!1===t(r,e[r]))break},mergeOptions:function(i,n){if(B.isObject(i)&&B.isObject(n)&&Object.keys){var o={};return B.each(i,function(e,t){o[e]=i[e]}),B.each(n,function(e,t){var r=n[e];B.isObject(r)&&i[e]?o[e]=B.mergeOptions(i[e],r):o[e]=r}),o}},setCSSAttr:function(r,e,t){B.isElement(r)&&(B.isString(e)&&B.isString(t)?r.style[e]=t:B.isObject(e)&&B.each(e,function(e,t){r.style[e]=t}))},removeElement:function(e){B.isElement(e)&&e.parentNode&&e.parentNode.removeChild(e)},createWebWorker:function(e){if(!B.isString(e))return{};try{var t=new B.Blob([e],{type:"text/javascript"}),r=B.URL.createObjectURL(t);return{objectUrl:r,worker:new Worker(r)}}catch(e){return""+e}},getExtension:function(e){return e.substr(e.lastIndexOf(".")+1,e.length)},getFontSize:function(e){var t=0<arguments.length&&e!==G?e:{};if(!z.body||!1===t.resizeFont)return t.fontSize;var r=t.text,i=t.gifWidth,n=parseInt(t.fontSize,10),o=parseInt(t.minFontSize,10),a=z.createElement("div"),s=z.createElement("span");for(a.setAttribute("width",i),a.appendChild(s),s.innerHTML=r,s.style.fontSize=n+"px",s.style.textIndent="-9999px",s.style.visibility="hidden",z.body.appendChild(s);s.offsetWidth>i&&o<=n;)s.style.fontSize=--n+"px";return z.body.removeChild(s),n+"px"},webWorkerError:!1},o=Object.freeze({default:B}),f={validate:function(i){i=B.isObject(i)?i:{};var n={};return B.each(f.validators,function(e,t){var r=t.errorCode;if(!i[r]&&!t.condition)return!((n=t).error=!0)}),delete n.condition,n},isValid:function(e){var t=!0!==f.validate(e).error;return t},validators:[{condition:B.isFunction(B.getUserMedia),errorCode:"getUserMedia",errorMsg:"The getUserMedia API is not supported in your browser"},{condition:B.isSupported.canvas(),errorCode:"canvas",errorMsg:"Canvas elements are not supported in your browser"},{condition:B.isSupported.webworkers(),errorCode:"webworkers",errorMsg:"The Web Workers API is not supported in your browser"},{condition:B.isFunction(B.URL),errorCode:"window.URL",errorMsg:"The window.URL API is not supported in your browser"},{condition:B.isSupported.blob(),errorCode:"window.Blob",errorMsg:"The window.Blob File API is not supported in your browser"},{condiLine truncated
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).artplayerPluginGif=t()}(this,(function(){"use strict";var e=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function t(e,t){return e(t={exports:{}},t.exports),t.exports}var r=t((function(e,t){!function(t,r,i,n){var o,a,s={URL:t.URL||t.webkitURL||t.mozURL||t.msURL,getUserMedia:(a=i.getUserMedia||i.webkitGetUserMedia||i.mozGetUserMedia||i.msGetUserMedia,a?a.bind(i):a),requestAnimFrame:t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame,requestTimeout:function(e,t){if(e=e||s.noop,t=t||0,!s.requestAnimFrame)return setTimeout(e,t);var r=(new Date).getTime(),i=new Object,n=s.requestAnimFrame;return i.value=n((function o(){(new Date).getTime()-r>=t?e.call():i.value=n(o)})),i},Blob:t.Blob||t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder,btoa:(o=t.btoa||function(e){for(var t="",r=0,i=e.length,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=void 0,a=void 0,s=void 0,c=void 0,d=void 0,l=void 0,u=void 0;r<i;)c=(o=e.charCodeAt(r++))>>2,d=(3&o)<<4|(a=e.charCodeAt(r++))>>4,l=(15&a)<<2|(s=e.charCodeAt(r++))>>6,u=63&s,isNaN(a)?l=u=64:isNaN(s)&&(u=64),t=t+n.charAt(c)+n.charAt(d)+n.charAt(l)+n.charAt(u);return t},o?o.bind(t):s.noop),isObject:function(e){return e&&"[object Object]"===Object.prototype.toString.call(e)},isEmptyObject:function(e){return s.isObject(e)&&!Object.keys(e).length},isArray:function(e){return e&&Array.isArray(e)},isFunction:function(e){return e&&"function"==typeof e},isElement:function(e){return e&&1===e.nodeType},isString:function(e){return"string"==typeof e||"[object String]"===Object.prototype.toString.call(e)},isSupported:{canvas:function(){var e=r.createElement("canvas");return e&&e.getContext&&e.getContext("2d")},webworkers:function(){return t.Worker},blob:function(){return s.Blob},Uint8Array:function(){return t.Uint8Array},Uint32Array:function(){return t.Uint32Array},videoCodecs:function(){var e=r.createElement("video"),t={mp4:!1,h264:!1,ogv:!1,ogg:!1,webm:!1};try{e&&e.canPlayType&&(t.mp4=""!==e.canPlayType('video/mp4; codecs="mp4v.20.8"'),t.h264=""!==(e.canPlayType('video/mp4; codecs="avc1.42E01E"')||e.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"')),t.ogv=""!==e.canPlayType('video/ogg; codecs="theora"'),t.ogg=""!==e.canPlayType('video/ogg; codecs="theora"'),t.webm=-1!==e.canPlayType('video/webm; codecs="vp8, vorbis"'))}catch(e){}return t}()},noop:function(){},each:function(e,t){var r=void 0,i=void 0;if(s.isArray(e))for(r=-1,i=e.length;++r<i&&!1!==t(r,e[r]););else if(s.isObject(e))for(r in e)if(e.hasOwnProperty(r)&&!1===t(r,e[r]))break},mergeOptions:function(e,t){if(s.isObject(e)&&s.isObject(t)&&Object.keys){var r={};return s.each(e,(function(t,i){r[t]=e[t]})),s.each(t,(function(i,n){var o=t[i];s.isObject(o)&&e[i]?r[i]=s.mergeOptions(e[i],o):r[i]=o})),r}},setCSSAttr:function(e,t,r){s.isElement(e)&&(s.isString(t)&&s.isString(r)?e.style[t]=r:s.isObject(t)&&s.each(t,(function(t,r){e.style[t]=r})))},removeElement:function(e){s.isElement(e)&&e.parentNode&&e.parentNode.removeChild(e)},createWebWorker:function(e){if(!s.isString(e))return{};try{var t=new s.Blob([e],{type:"text/javascript"}),r=s.URL.createObjectURL(t);return{objectUrl:r,worker:new Worker(r)}}catch(e){return""+e}},getExtension:function(e){return e.substr(e.lastIndexOf(".")+1,e.length)},getFontSize:function(){var e=arguments.length>0&&arguments[0]!==n?arguments[0]:{};if(!r.body||!1===e.resizeFont)return e.fontSize;var t=e.text,i=e.gifWidth,o=parseInt(e.fontSize,10),a=parseInt(e.minFontSize,10),s=r.createElement("div"),c=r.createElement("span");for(s.setAttribute("width",i),s.appendChild(c),c.innerHTML=t,c.style.fontSize=o+"px",c.style.textIndent="-9999px",c.style.visibility="hidden",r.body.appendChild(c);c.offsetWidth>i&&o>=a;)c.style.fontSize=--o+"px";return r.body.removeChild(c),o+"px"},webWorkerError:!1},c=Object.freeze({default:s}),d={validate:function(e){e=s.isObject(e)?e:{};var t={};return s.each(d.validators,(function(r,i){var n=i.errorCode;if(!e[n]&&!i.condition)return(t=i).error=!0,!1})),delete t.condition,t},isValid:function(e){var t=!0!==d.validate(e).error;return t},validators:[{condition:s.isFunction(s.getUserMedia),errorCode:"getUserMedia",errorMsg:"The getUserMedia API is not supported in your browser"},{condition:s.isSupported.canvas(),errorCode:"canvas",errorMsg:"Canvas elements are not supported in your browser"},{condition:s.isSupported.webworkers(),errorCode:"webworkers",errorMsg:"The Web Workers API is not supported in your browser"},{condition:s.isFunction(s.URL),errorCode:"window.URL",errorMsg:"The window.URL API is not supporteLine truncated
|
||||
@@ -5,4 +5,4 @@
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t=t||self).artplayerPluginPlaylist=n()}(this,function(){"use strict";return function(h){return function(e){var t=e.constructor.utils,n=t.append,r=t.errorHandle,i=t.sleep,a=t.inverseClass,l=e.player,o=e.events.proxy,s=e.template,u=s.$player,c=s.$video,y=n(u,'\n <div class="artplayer-playlist">\n <div class="artplayer-playlist-inner artplayer-backdrop-filter"></div>\n </div>\n ');r(Array.isArray(h),"Playlist is not an array type"),r(0<h.length,"Playlist cannot be empty");var f=h.map(function(t){return r(t.url,"Playlist items require url attribute"),r(t.title,"Playlist items require title attribute"),t}),p=y.querySelector(".artplayer-playlist-inner");function d(t){var n=f[t];return l.switchUrl(n.url,n.title).then(function(){e.emit("artplayerPluginPlaylist:change",n)})}function v(){var t=f.findIndex(function(t){return t.url===c.src});return r(-1!==t,"Can't find Playlist item"),1===f.length?d(0):d(t+1===f.length?0:t+1)}return p.innerHTML=f.map(function(t,n){return'<div class="artplayer-playlist-item" data-option-index="'.concat(n,'">').concat(t.title,"</div>")}).join(""),o(p,"click",function(t){var n=t.target.dataset.optionIndex;n&&Number(n)<=f.length-1&&d(n)}),o(y,"click",function(t){t.target===y&&u.classList.remove("artplayer-playlist-show")}),e.on("video:ended",function(){v().then(function(){i(1e3).then(function(){l.play=!0})})}),e.on("afterAttachUrl",function(){var t=f.findIndex(function(t){return t.url===c.src}),n=Array.from(p.children)[t];-1!==t&&n&&a(n,"active")}),{name:"artplayerPluginPlaylist",show:function(){u.classList.add("artplayer-playlist-show")},hide:function(){u.classList.remove("artplayer-playlist-show")},next:function(){v()},prev:function(){!function(){var t=f.findIndex(function(t){return t.url===c.src});r(-1!==t,"Can't find Playlist item"),1===f.length?d(0):d(t-1==-1?f.length-1:t-1)}()}}}}});
|
||||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t=t||self).artplayerPluginPlaylist=n()}(this,(function(){"use strict";return function(t){return function(n){var e=n.constructor.utils,r=e.append,i=e.errorHandle,a=e.sleep,l=e.inverseClass,o=n.player,s=n.events.proxy,u=n.template,c=u.$player,y=u.$video,f=r(c,'\n <div class="artplayer-playlist">\n <div class="artplayer-playlist-inner artplayer-backdrop-filter"></div>\n </div>\n ');i(Array.isArray(t),"Playlist is not an array type"),i(t.length>0,"Playlist cannot be empty");var p=t.map((function(t){return i(t.url,"Playlist items require url attribute"),i(t.title,"Playlist items require title attribute"),t})),d=f.querySelector(".artplayer-playlist-inner");function v(t){var e=p[t];return o.switchUrl(e.url,e.title).then((function(){n.emit("artplayerPluginPlaylist:change",e)}))}function h(){var t=p.findIndex((function(t){return t.url===y.src}));return i(-1!==t,"Can't find Playlist item"),1===p.length?v(0):v(t+1===p.length?0:t+1)}return d.innerHTML=p.map((function(t,n){return'<div class="artplayer-playlist-item" data-option-index="'.concat(n,'">').concat(t.title,"</div>")})).join(""),s(d,"click",(function(t){var n=t.target.dataset.optionIndex;n&&Number(n)<=p.length-1&&v(n)})),s(f,"click",(function(t){t.target===f&&c.classList.remove("artplayer-playlist-show")})),n.on("video:ended",(function(){h().then((function(){a(1e3).then((function(){o.play=!0}))}))})),n.on("afterAttachUrl",(function(){var t=p.findIndex((function(t){return t.url===y.src})),n=Array.from(d.children)[t];-1!==t&&n&&l(n,"active")})),{name:"artplayerPluginPlaylist",show:function(){c.classList.add("artplayer-playlist-show")},hide:function(){c.classList.remove("artplayer-playlist-show")},next:function(){h()},prev:function(){var t;t=p.findIndex((function(t){return t.url===y.src})),i(-1!==t,"Can't find Playlist item"),1===p.length?v(0):v(t-1==-1?p.length-1:t-1)}}}}}));
|
||||
+12
-1
@@ -5,4 +5,15 @@
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).ArtplayerReact=t()}(this,function(){"use strict";var a=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],0<=t.indexOf(n)||(o[n]=e[n]);return o};var r=function(e,t){if(null==e)return{};var n,r,o=a(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o};var c=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e};function e(e,t){return e(t={exports:{}},t.exports),t.exports}var o=e(function(t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?t.exports=r=function(e){return n(e)}:t.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(e)}t.exports=r});var u=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e};var l=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e};var f=function(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?l(e):t},p=e(function(t){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}t.exports=n}),d=e(function(n){function r(e,t){return n.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}n.exports=r});var t=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)},y=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var _e=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,o=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),i=1;i<arguments.length;i++){for(var a in n=Object(arguments[i]))h.call(n,a)&&(o[a]=n[a]);if(y){r=y(n);for(var c=0;c<r.length;c++)v.call(n,r[c])&&(o[r[c]]=n[r[c]])}}return o},n="function"==typeof Symbol&&Symbol.for,m=n?Symbol.for("react.element"):60103,g=n?Symbol.for("react.portal"):60106,b=n?Symbol.for("react.fragment"):60107,w=n?Symbol.for("react.strict_mode"):60108,O=n?Symbol.for("react.profiler"):60114,k=n?Symbol.for("react.provider"):60109,j=n?Symbol.for("react.context"):60110,P=n?Symbol.for("react.forward_ref"):60112,x=n?Symbol.for("react.suspense"):60113,S=n?Symbol.for("react.suspense_list"):60120,E=n?Symbol.for("react.memo"):60115,R=n?Symbol.for("react.lazy"):60116,$="function"==typeof Symbol&&Symbol.iterator;function C(e){for(var t=e.message,n="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)n+="&args[]="+encodeURIComponent(arguments[r]);return e.message="Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",e}var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T={};function _(e,t,n){this.props=e,this.context=t,this.refs=T,this.updater=n||D}function A(){}function L(e,t,n){this.props=e,this.context=t,this.refs=T,this.updater=n||D}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw C(Error(85));this.updater.enqueueSetState(this,e,t,"setState")},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},A.prototype=_.prototype;var M=L.prototype=new A;M.constructor=L,_e(M,_.prototype),M.isPureReactComponent=!0;var z={current:null},q={suspense:null},I={current:null},F=Object.prototype.hasOwnProperty,W={key:!0,ref:!0,__self:!0,__source:!0};function N(e,t,n){var r=void 0,o={},i=null,a=nullLine truncated
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).ArtplayerReact=t()}(this,(function(){"use strict";var e=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o};var t=function(t,n){if(null==t)return{};var r,o,i=e(t,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(o=0;o<a.length;o++)r=a[o],n.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i};var n=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function r(e,t){return e(t={exports:{}},t.exports),t.exports}var o=r((function(e){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(r){return"function"==typeof Symbol&&"symbol"===t(Symbol.iterator)?e.exports=n=function(e){return t(e)}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":t(e)},n(r)}e.exports=n}));var i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")};function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var c=function(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e};var u=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e};var s=function(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?u(e):t},l=r((function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(n)}e.exports=t})),f=r((function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(n,r)}e.exports=t}));var p=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)},d=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable;
|
||||
/*
|
||||
object-assign
|
||||
(c) Sindre Sorhus
|
||||
@license MIT
|
||||
*/function v(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var m=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,o=v(e),i=1;i<arguments.length;i++){for(var a in n=Object(arguments[i]))y.call(n,a)&&(o[a]=n[a]);if(d){r=d(n);for(var c=0;c<r.length;c++)h.call(n,r[c])&&(o[r[c]]=n[r[c]])}}return o},g="function"==typeof Symbol&&Symbol.for,b=g?Symbol.for("react.element"):60103,w=g?Symbol.for("react.portal"):60106,O=g?Symbol.for("react.fragment"):60107,k=g?Symbol.for("react.strict_mode"):60108,j=g?Symbol.for("react.profiler"):60114,P=g?Symbol.for("react.provider"):60109,x=g?Symbol.for("react.context"):60110,S=g?Symbol.for("react.forward_ref"):60112,E=g?Symbol.for("react.suspense"):60113,R=g?Symbol.for("react.suspense_list"):60120,$=g?Symbol.for("react.memo"):60115,C=g?Symbol.for("react.lazy"):60116,D="function"==typeof Symbol&&Symbol.iterator;function T(e){for(var t=e.message,n="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)n+="&args[]="+encodeURIComponent(arguments[r]);return e.message="Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",e}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A={};function L(e,t,n){this.props=e,this.context=t,this.refs=A,this.updater=n||_}function M(){}function z(e,t,n){this.props=e,this.context=t,this.refs=A,this.updater=n||_}L.prototype.isReactComponent={},L.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw T(Error(85));this.updater.enqueueSetState(this,e,t,"setState")},L.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},M.prototype=L.prototype;var q=z.prototype=new M;q.constructor=z,m(q,L.prototype),q.isPureReactComponent=!0;var I={current:null},F={suspense:null},W={current:null},N=Object.prototype.hasOwnProperty,V={key:!0,ref:!0,__self:!0,__source:!0};function U(e,t,n){var r=void 0,o={},i=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(i=""+t.key),t)N.call(t,r)&&!V.hasOwnProperty(r)&&(o[r]=t[r]);var c=arguments.length-2;if(1===c)o.children=n;else if(1<c){for(var u=Array(c),s=0;s<c;s++)u[s]=arguments[s+2];o.children=u}if(e&&e.defaultProps)for(r in c=e.defaultProps)void 0===o[r]&&(o[r]=c[r]);return{$$typeof:b,type:e,key:i,ref:a,props:o,_owner:W.current}}function H(e){return"object"==typeof e&&null!==e&&e.$$typeof===b}var B=/\/+/g,Y=[];function X(e,t,n,r){if(Y.length){var o=Y.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function Z(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>Y.length&&Y.push(e)}function J(e,t,n){return null==e?0:function e(t,n,r,o){var i=typeof t;"undefined"!==i&&"boolean"!==i||(t=null);var a=!1;if(null===t)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case b:case w:a=!0}}if(a)return r(o,t,""===n?"."+G(t,0):n),1;if(a=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;c<t.length;c++){var u=n+G(i=t[c],c);a+=e(i,u,r,o)}else if(null===t||"object"!=typeof t?u=null:u="function"==typeof(u=D&&t[D]||t["@@iterator"])?u:null,"function"==typeof u)for(t=u.call(t),c=0;!(i=t.next()).done;)a+=e(i=i.value,u=n+G(i,c++),r,o);else if("object"===i)throw r=""+t,T(Error(31),"[object Object]"===r?"object with keys {"+Object.keys(t).join(", ")+"}":r,"");return a}(e,"",t,n)}function G(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function Q(e,t){e.func.call(e.context,t,e.count++)}function K(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?ee(e,r,n,(function(e){return e})):null!=e&&(H(e)&&(e=function(e,t){return{$$typeof:b,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(B,"$&/")+"/")+n)),r.push(e))}function ee(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(B,"$&/")+"/"),J(e,K,t=X(t,i,r,o)),Z(t)}function te(){var e=I.current;if(null===e)throw T(Error(321));return e}var ne={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return ee(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;J(e,Q,t=X(null,null,t,n)),Z(t)},count:function(e){return J(e,(function(){return null}),null)},toLine truncated
|
||||
/*!
|
||||
* screenfull
|
||||
* v5.0.0 - 2019-09-09
|
||||
* (c) Sindre Sorhus; MIT License
|
||||
*/
|
||||
!function(){var t="undefined"!=typeof window&&void 0!==window.document?window.document:{},n=e.exports,r=function(){for(var e,n=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],r=0,o=n.length,i={};r<o;r++)if((e=n[r])&&e[1]in t){for(r=0;r<e.length;r++)i[n[0][r]]=e[r];return i}return!1}(),o={change:r.fullscreenchange,error:r.fullscreenerror},i={request:function(e){return new Promise(function(n,o){var i=function(){this.off("change",i),n()}.bind(this);this.on("change",i),e=e||t.documentElement,Promise.resolve(e[r.requestFullscreen]()).catch(o)}.bind(this))},exit:function(){return new Promise(function(e,n){if(this.isFullscreen){var o=function(){this.off("change",o),e()}.bind(this);this.on("change",o),Promise.resolve(t[r.exitFullscreen]()).catch(n)}else e()}.bind(this))},toggle:function(e){return this.isFullscreen?this.exit():this.request(e)},onchange:function(e){this.on("change",e)},onerror:function(e){this.on("error",e)},on:function(e,n){var r=o[e];r&&t.addEventListener(r,n,!1)},off:function(e,n){var r=o[e];r&&t.removeEventListener(r,n,!1)},raw:r};r?(Object.defineProperties(i,{isFullscreen:{get:function(){return Boolean(t[r.fullscreenElement])}},element:{enumerable:!0,get:function(){return t[r.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(t[r.fullscreenEnabled])}}}),n?e.exports=i:window.screenfull=i):n?e.exports={isEnabled:!1}:window.screenfull={isEnabled:!1}}()}));ot.isEnabled;function it(e,t){var n=e.template.$video;document.pictureInPictureEnabled?function(e,t){var n=e.template.$video,r=e.events.proxy,o=e.notice;n.disablePictureInPicture=!1,Object.defineProperty(t,"pip",{get:function(){return document.pictureInPictureElement},set:function(e){e?n.requestPictureInPicture().catch((function(e){throw o.show(e),e})):document.exitPictureInPicture().catch((function(e){throw o.show(e),e}))}}),r(n,"enterpictureinpicture",(function(){e.emit("pipEnabled")})),r(n,"leavepictureinpicture",(function(){e.emit("pipExit")})),e.on("destroy",(function(){t.pip&&(t.pip=!1)}))}(e,t):n.webkitSupportsPresentationMode?function(e,t){var n=e.template.$video;n.webkitSetPresentationMode("inline"),Object.defineProperty(t,"pip",{get:function(){return"picture-in-picture"===n.webkitPresentationMode},set:function(t){t?(n.webkitSetPresentationMode("picture-in-picture"),e.emit("pipEnabled")):(n.webkitSetPresentationMode("inline"),e.emit("pipExit"))}})}(e,t):function(e,t){var n=e.option,r=e.i18n,o=e.template,i=o.$player,a=o.$pipClose,c=o.$pipTitle,u=o.$pipHeader,s=e.events.proxy,l="",f=!1,p=0,d=0,y=0,h=0;s(u,"mousedown",(function(e){f=!0,p=e.pageX,d=e.pageY,y=t.left,h=t.top})),s(u,"mousemove",(function(e){f&&(ge(i,"is-dragging"),ke(i,"left","".concat(y+e.pageX-p,"px")),ke(i,"top","".concat(h+e.pageY-d,"px")))})),s(document,"mouseup",(function(){f=!1,be(i,"is-dragging")})),s(a,"click",(function(){t.pip=!1,f=!1,be(i,"is-dragging")})),Oe(c,n.title||r.get("Mini player"));var v={get:function(){return we(i,"artplayer-pip")},set:function(n){if(n){t.autoSize=!1,l=i.style.cssText,ge(i,"artplayer-pip");var r=document.body;ke(i,"top","".concat(r.clientHeight-t.height-50,"px")),ke(i,"left","".concat(r.clientWidth-t.width-50,"px")),t.fullscreen=!1,t.fullscreenWeb=!1,t.aspectRatio=!1,t.playbackRate=!1,e.emit("pipEnabled")}else t.pip&&(i.style.cssText=l,be(i,"artplayer-pip"),ke(i,"top",null),ke(i,"left",null),t.fullscreen=!1,t.fullscreenWeb=!1,t.aspectRatio=!1,t.playbackRate=!1,t.autoSize=!0,e.emit("pipExit"))}};Object.defineProperty(t,"pip",v)}(e,t),Object.defineProperty(t,"pipToggle",{set:function(e){e&&(t.pip=!t.pip)}})}var at=function e(t){var n;i(this,e),function(e,t){var n=e.option,r=n.type,o=n.customType,i=e.template.$video;Object.defineProperty(t,"url",{get:function(){return i.src},set:function(){De(!1,"You should use this method: art.attachUrl()")}}),Object.defineProperty(t,"attachUrl",{value:function(t){return Ue().then((function(){function n(t){var n=r||Le(t),a=o[n];return n&&a?(e.loading.show=!0,e.emit("beforeCustomType",n),a.call(e,i,t,e),e.emit("afterCustomType",n)):(e.emit("beforeAttachUrl",t),i.src=t,e.emit("afterAttachUrl",t)),Promise.resolve(t)}if("function"==typeof t){var a=t.call(e);return De("function"==typeof a.then,"If url is a function, it needs to return a promise."),a.then((function(t){return e.loading.show=!0,n(t)}))}return n(t)}))}})}(t,this),function(e,t){var n=e.option,Line truncated
|
||||
@@ -5,4 +5,4 @@
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).ArtplayerToolGithub=e()}(this,function(){"use strict";var t;return function(t,e){t.exports=function(){var o=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},i=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),n.forEach(function(t){o(e,t,r[t])})}return e},t,a=(function(t){var e=function(i){var u,t=Object.prototype,s=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},o=e.iterator||"@@iterator",r=e.asyncIterator||"@@asyncIterator",n=e.toStringTag||"@@toStringTag";function a(t,e,r,n){var o=e&&e.prototype instanceof c?e:c,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(i,a,c){var u=f;return function(t,e){if(u===p)throw new Error("Generator is already running");if(u===y){if("throw"===t)throw e;return S()}for(c.method=t,c.arg=e;;){var r=c.delegate;if(r){var n=O(r,c);if(n){if(n===d)continue;return n}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if(u===f)throw u=y,c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);u=p;var o=h(i,a,c);if("normal"===o.type){if(u=c.done?y:l,o.arg===d)continue;return{value:o.arg,done:c.done}}"throw"===o.type&&(u=y,c.method="throw",c.arg=o.arg)}}}(t,r,a),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}i.wrap=a;var f="suspendedStart",l="suspendedYield",p="executing",y="completed",d={};function c(){}function g(){}function v(){}var m={};m[o]=function(){return this};var w=Object.getPrototypeOf,b=w&&w(w(P([])));b&&b!==t&&s.call(b,o)&&(m=b);var x=v.prototype=c.prototype=Object.create(m);function k(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function L(u){var e;this._invoke=function(r,n){function t(){return new Promise(function(t,e){!function e(t,r,n,o){var i=h(u[t],u,r);if("throw"!==i.type){var a=i.arg,c=a.value;return c&&"object"==typeof c&&s.call(c,"__await")?Promise.resolve(c.__await).then(function(t){e("next",t,n,o)},function(t){e("throw",t,n,o)}):Promise.resolve(c).then(function(t){a.value=t,n(a)},function(t){return e("throw",t,n,o)})}o(i.arg)}(r,n,t,e)})}return e=e?e.then(t,t):t()}}function O(t,e){var r=t.iterator[e.method];if(r===u){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=u,O(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var n=h(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,d;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=u),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function P(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(s.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=u,t.done=!0,t};return n.next=n}}return{next:S}}function S(){return{value:u,done:!0}}return g.prototype=x.constructor=v,v.constructor=g,v[n]=g.displayName="GeneratorFunction",i.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},i.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,n in t||(t[n]="GeneratorFunction")),t.prototype=Object.create(x),t},i.awrap=function(t){return{__await:t}},k(L.prototype),L.prototype[r]=function(){return this},i.AsyncIterator=L,i.async=function(t,e,r,n){var o=new L(a(t,e,r,n));return i.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},k(x),x[n]="Generator",x[o]=function(){return this},x.toString=function(){return"[object Generator]"},i.keys=function(r){var n=[];for(var t in r)n.push(t);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},i.values=P,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=u,this.done=!1,this.delegate=null,this.method="next",this.arg=u,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&s.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=u)},stop:function(){this.done=!0;var
Line truncated
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).ArtplayerToolGithub=e()}(this,(function(){"use strict";"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;return function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t,e){t.exports=function(){var t,e=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},r=function(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),o.forEach((function(r){e(t,r,n[r])}))}return t},n=(function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r,n){var o=e&&e.prototype instanceof d?e:d,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n=f;return function(o,i){if(n===l)throw new Error("Generator is already running");if(n===p){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=O(a,r);if(c){if(c===y)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=l;var u=s(t,e,r);if("normal"===u.type){if(n=r.done?p:h,u.arg===y)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=p,r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f="suspendedStart",h="suspendedYield",l="executing",p="completed",y={};function d(){}function g(){}function v(){}var m={};m[i]=function(){return this};var w=Object.getPrototypeOf,b=w&&w(w(P([])));b&&b!==r&&n.call(b,i)&&(m=b);var x=v.prototype=d.prototype=Object.create(m);function k(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function L(t){var e;this._invoke=function(r,o){function i(){return new Promise((function(e,i){!function e(r,o,i,a){var c=s(t[r],t,o);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==typeof f&&n.call(f,"__await")?Promise.resolve(f.__await).then((function(t){e("next",t,i,a)}),(function(t){e("throw",t,i,a)})):Promise.resolve(f).then((function(t){u.value=t,i(u)}),(function(t){return e("throw",t,i,a)}))}a(c.arg)}(r,o,e,i)}))}return e=e?e.then(i,i):i()}}function O(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,O(t,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=s(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function P(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:S}}function S(){return{value:e,done:!0}}return g.prototype=x.constructor=v,v.constructor=g,v[c]=g.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},k(L.prototype),L.prototype[a]=function(){return this},t.AsyncIterator=L,t.async=function(e,r,n,o){var i=new L(u(e,r,n,o));return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(x),x[c]="Generator",x[i]=function(){return this},x.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=P,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sentLine truncated
|
||||
@@ -5,4 +5,4 @@
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).ArtplayerToolThumbnail=e()}(this,function(){"use strict";var o=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function i(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var t=function(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t};function e(t,e){return t(e={exports:{}},e.exports),e.exports}var n=e(function(e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=o=function(t){return n(t)}:e.exports=o=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)},o(t)}e.exports=o});var r=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t};var a=function(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?r(t):e},s=e(function(e){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(t)}e.exports=n}),u=e(function(n){function o(t,e){return n.exports=o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}n.exports=o});var l=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)};function c(){}c.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var o=this;function i(){o.off(t,i),e.apply(n,arguments)}return i._=e,this.on(t,i,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,i=n.length;o<i;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],i=[];if(o&&e)for(var r=0,a=o.length;r<a;r++)o[r].fn!==e&&o[r].fn._!==e&&i.push(o[r]);return i.length?n[t]=i:delete n[t],this}};var h=c,f=c;function p(e){return new Promise(function(t){return setTimeout(t,e)})}function d(t,e,n){return Math.max(Math.min(t,Math.max(e,n)),Math.min(e,n))}return h.TinyEmitter=f,function(){function n(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return o(this,n),(t=a(this,s(n).call(this))).processing=!1,t.option={},t.setup(Object.assign({},n.DEFAULTS,e)),t.video=n.creatVideo(),t.inputChange=t.inputChange.bind(r(t)),t.ondrop=t.ondrop.bind(r(t)),t.option.fileInput.addEventListener("change",t.inputChange),t.option.fileInput.addEventListener("dragover",n.ondragover),t.option.fileInput.addEventListener("drop",n.ondrop),t}return l(n,h),t(n,[{key:"ondrop",value:function(t){t.preventDefault();var e=t.dataTransfer.files[0];this.loadVideo(e)}},{key:"setup",value:function(t){var e=this,n=0<arguments.length&&void 0!==t?t:{};this.option=Object.assign({},this.option,n);var o=this.option,i=o.fileInput,r=o.delay,a=o.number,s=o.width,u=o.height,l=o.column;if(this.errorHandle(i instanceof Element,"The 'fileInput' is not a Element"),"INPUT"!==i.tagName||"file"!==i.type){i.style.position="relative";var c=document.createElement("input");c.type="file",c.style.position="absolute",c.style.width="100%",c.style.height="100%",c.style.left="0",c.style.top="0",c.style.right="0",c.style.bottom="0",c.style.opacity="0",i.appendChild(c),this.option.fileInput=c}return["delay","number","width","height","column"].forEach(function(t){e.errorHandle("number"==typeof e.option[t],"The '".concat(t,"' is not a number"))}),this.option.delay=d(r,10,1e3),this.option.number=d(a,10,1e3),this.option.width=d(s,10,1e3),this.option.height=d(u,10,1e3),this.option.column=d(l,1,1e3),this}},{key:"inputChange",value:function(){var t=this.option.fileInput.files[0];this.loadVideo(t)}},{key:"loadVideo",value:function(t){var e=this,n=this.option.delay;if(t){var o=this.video.canPlayType(t.type);this.errorHandle("maybe"===o||"probably"===o,"Playback of this file format is not supported: ".concat(t.type));var i=URL.createObjectURL(t);this.videoUrl=i,this.file=t,this.emit("file",this.file),this.video.src=i,p(n).then(function(){e.emit("video",e.video)}).catch(function(t){throw e.emit("error",t.message),t})}}},{key:"start",value:function(){var o=this,t=this.option,i=t.width,r=t.height,a=t.number,s=t.delay;this.density=a/this.video.duration,this.errorHandle(this.file&&this.video,"Please select the video file first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment..."),this.errorHandle(this.density<=1,"The preview density cannot be greater than 1, but goLine truncated
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).ArtplayerToolThumbnail=e()}(this,(function(){"use strict";var t=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function e(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var n=function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t};function o(t,e){return t(e={exports:{}},e.exports),e.exports}var i=o((function(t){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(o){return"function"==typeof Symbol&&"symbol"===e(Symbol.iterator)?t.exports=n=function(t){return e(t)}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":e(t)},n(o)}t.exports=n}));var r=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t};var a=function(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?r(t):e},s=o((function(t){function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},e(n)}t.exports=e})),u=o((function(t){function e(n,o){return t.exports=e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(n,o)}t.exports=e}));var l=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)};function c(){}c.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var o=this;function i(){o.off(t,i),e.apply(n,arguments)}return i._=e,this.on(t,i,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,i=n.length;o<i;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],i=[];if(o&&e)for(var r=0,a=o.length;r<a;r++)o[r].fn!==e&&o[r].fn._!==e&&i.push(o[r]);return i.length?n[t]=i:delete n[t],this}};var h=c,f=c;function p(t){return new Promise((function(e){return setTimeout(e,t)}))}function d(t,e,n){return Math.max(Math.min(t,Math.max(e,n)),Math.min(e,n))}return h.TinyEmitter=f,function(e){function o(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t(this,o),(e=a(this,s(o).call(this))).processing=!1,e.option={},e.setup(Object.assign({},o.DEFAULTS,n)),e.video=o.creatVideo(),e.inputChange=e.inputChange.bind(r(e)),e.ondrop=e.ondrop.bind(r(e)),e.option.fileInput.addEventListener("change",e.inputChange),e.option.fileInput.addEventListener("dragover",o.ondragover),e.option.fileInput.addEventListener("drop",o.ondrop),e}return l(o,e),n(o,[{key:"ondrop",value:function(t){t.preventDefault();var e=t.dataTransfer.files[0];this.loadVideo(e)}},{key:"setup",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.option=Object.assign({},this.option,e);var n=this.option,o=n.fileInput,i=n.delay,r=n.number,a=n.width,s=n.height,u=n.column;if(this.errorHandle(o instanceof Element,"The 'fileInput' is not a Element"),"INPUT"!==o.tagName||"file"!==o.type){o.style.position="relative";var l=document.createElement("input");l.type="file",l.style.position="absolute",l.style.width="100%",l.style.height="100%",l.style.left="0",l.style.top="0",l.style.right="0",l.style.bottom="0",l.style.opacity="0",o.appendChild(l),this.option.fileInput=l}return["delay","number","width","height","column"].forEach((function(e){t.errorHandle("number"==typeof t.option[e],"The '".concat(e,"' is not a number"))})),this.option.delay=d(i,10,1e3),this.option.number=d(r,10,1e3),this.option.width=d(a,10,1e3),this.option.height=d(s,10,1e3),this.option.column=d(u,1,1e3),this}},{key:"inputChange",value:function(){var t=this.option.fileInput.files[0];this.loadVideo(t)}},{key:"loadVideo",value:function(t){var e=this,n=this.option.delay;if(t){var o=this.video.canPlayType(t.type);this.errorHandle("maybe"===o||"probably"===o,"Playback of this file format is not supported: ".concat(t.type));var i=URL.createObjectURL(t);this.videoUrl=i,this.file=t,this.emit("file",this.file),this.video.src=i,p(n).then((function(){e.emit("video",e.video)})).catch((function(t){throw e.emit("error",t.message),t}))}}},{key:"start",value:function(){var t=this,e=this.option,n=e.width,o=e.height,i=e.number,r=e.delay;this.density=i/this.video.duration,this.errorHandle(this.file&&this.video,"Please select the video file first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment..."),this.errorHandle(this.density<=1,"The preview denLine truncated
|
||||
+7
-1
@@ -5,4 +5,10 @@
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).ArtplayerVue=e()}(this,function(){"use strict";var c=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t};var s=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t};function t(t,e){return t(e={exports:{}},e.exports),e.exports}var a=t(function(e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(t){return n(t)}:e.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)},r(t)}e.exports=r});var o=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t};var u=function(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?o(t):e},l=t(function(e){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(t)}e.exports=n}),f=t(function(n){function r(t,e){return n.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(t,e)}n.exports=r});var e=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)},p=t(function(t,e){t.exports=function(){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r=Object.prototype.toString,s=function(t){if(void 0===t)return"undefined";if(null===t)return"null";var e=n(t);if("boolean"===e)return"boolean";if("string"===e)return"string";if("number"===e)return"number";if("symbol"===e)return"symbol";if("function"===e)return function(t){return"GeneratorFunction"===i(t)}(t)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(t))return"array";if(function(t){if(t.constructor&&"function"==typeof t.constructor.isBuffer)return t.constructor.isBuffer(t);return!1}(t))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(t){if(-1!==t.message.indexOf("callee"))return!0}return!1}(t))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(t))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(t))return"error";if(function(t){return t instanceof RegExp||"string"==typeof t.flags&&"boolean"==typeof t.ignoreCase&&"boolean"==typeof t.multiline&&"boolean"==typeof t.global}(t))return"regexp";switch(i(t)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(t){return"function"==typeof t.throw&&"function"==typeof t.return&&"function"==typeof t.next}(t))return"generator";switch(e=r.call(t)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")};function i(t){return t.constructor?t.constructor.name:null}function u(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:["option"];return l(t,e,n),f(t,e,n),function(o,a,c){var t=s(a),e=s(o);if("object"===t){if("object"!==e)throw new Error("[Type Error]: '".concat(c.join("."),"' require 'object' type, but got '").concat(e,"'"));Object.keys(a).forEach(function(t){var e=o[t],n=a[t],r=c.slice();r.push(t),l(e,n,r),f(e,n,r),u(e,n,r)})}if("array"===t){if("array"!==e)throw new Error("[Type Error]: '".concat(c.join("."),"' require 'array' type, but got '").concat(e,"'"));o.forEach(fuLine truncated
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).ArtplayerVue=e()}(this,(function(){"use strict";var t=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t};var e=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var r=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function i(t,e){return t(e={exports:{}},e.exports),e.exports}var o=i((function(t){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(r){return"function"==typeof Symbol&&"symbol"===e(Symbol.iterator)?t.exports=n=function(t){return e(t)}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":e(t)},n(r)}t.exports=n}));var a=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t};var c=function(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?a(t):e},s=i((function(t){function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},e(n)}t.exports=e})),u=i((function(t){function e(n,r){return t.exports=e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(n,r)}t.exports=e}));var l=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)},f=i((function(t,e){t.exports=function(){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var e=Object.prototype.toString,n=function(n){if(void 0===n)return"undefined";if(null===n)return"null";var i=t(n);if("boolean"===i)return"boolean";if("string"===i)return"string";if("number"===i)return"number";if("symbol"===i)return"symbol";if("function"===i)return function(t){return"GeneratorFunction"===r(t)}(n)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(n))return"array";if(function(t){return!(!t.constructor||"function"!=typeof t.constructor.isBuffer)&&t.constructor.isBuffer(t)}(n))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(t){if(-1!==t.message.indexOf("callee"))return!0}return!1}(n))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(n))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(n))return"error";if(function(t){return t instanceof RegExp||"string"==typeof t.flags&&"boolean"==typeof t.ignoreCase&&"boolean"==typeof t.multiline&&"boolean"==typeof t.global}(n))return"regexp";switch(r(n)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(t){return"function"==typeof t.throw&&"function"==typeof t.return&&"function"==typeof t.next}(n))return"generator";switch(i=e.call(n)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return i.slice(8,-1).toLowerCase().replace(/\s/g,"")};function r(t){return t.constructor?t.constructor.name:null}function i(t,e){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:["option"];return o(t,e,r),a(t,e,r),function(t,e,r){var c=n(e),s=n(t);if("object"===c){if("object"!==s)throw new Error("[Type Error]: '".concat(r.join("."),"' require 'object' type, but got '").concat(s,"'"));Object.keys(e).forEach((function(n){var c=t[n],s=e[n],u=r.slice();u.push(n),o(c,s,u),a(c,s,u),i(c,s,u)}))}if("aLine truncated
|
||||
/*!
|
||||
* screenfull
|
||||
* v5.0.0 - 2019-09-09
|
||||
* (c) Sindre Sorhus; MIT License
|
||||
*/
|
||||
!function(){var e="undefined"!=typeof window&&void 0!==window.document?window.document:{},n=t.exports,r=function(){for(var t,n=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],r=0,i=n.length,o={};r<i;r++)if((t=n[r])&&t[1]in e){for(r=0;r<t.length;r++)o[n[0][r]]=t[r];return o}return!1}(),i={change:r.fullscreenchange,error:r.fullscreenerror},o={request:function(t){return new Promise(function(n,i){var o=function(){this.off("change",o),n()}.bind(this);this.on("change",o),t=t||e.documentElement,Promise.resolve(t[r.requestFullscreen]()).catch(i)}.bind(this))},exit:function(){return new Promise(function(t,n){if(this.isFullscreen){var i=function(){this.off("change",i),t()}.bind(this);this.on("change",i),Promise.resolve(e[r.exitFullscreen]()).catch(n)}else t()}.bind(this))},toggle:function(t){return this.isFullscreen?this.exit():this.request(t)},onchange:function(t){this.on("change",t)},onerror:function(t){this.on("error",t)},on:function(t,n){var r=i[t];r&&e.addEventListener(r,n,!1)},off:function(t,n){var r=i[t];r&&e.removeEventListener(r,n,!1)},raw:r};r?(Object.defineProperties(o,{isFullscreen:{get:function(){return Boolean(e[r.fullscreenElement])}},element:{enumerable:!0,get:function(){return e[r.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(e[r.fullscreenEnabled])}}}),n?t.exports=o:window.screenfull=o):n?t.exports={isEnabled:!1}:window.screenfull={isEnabled:!1}}()}));et.isEnabled;function nt(t,e){var n=t.template.$video;document.pictureInPictureEnabled?function(t,e){var n=t.template.$video,r=t.events.proxy,i=t.notice;n.disablePictureInPicture=!1,Object.defineProperty(e,"pip",{get:function(){return document.pictureInPictureElement},set:function(t){t?n.requestPictureInPicture().catch((function(t){throw i.show(t),t})):document.exitPictureInPicture().catch((function(t){throw i.show(t),t}))}}),r(n,"enterpictureinpicture",(function(){t.emit("pipEnabled")})),r(n,"leavepictureinpicture",(function(){t.emit("pipExit")})),t.on("destroy",(function(){e.pip&&(e.pip=!1)}))}(t,e):n.webkitSupportsPresentationMode?function(t,e){var n=t.template.$video;n.webkitSetPresentationMode("inline"),Object.defineProperty(e,"pip",{get:function(){return"picture-in-picture"===n.webkitPresentationMode},set:function(e){e?(n.webkitSetPresentationMode("picture-in-picture"),t.emit("pipEnabled")):(n.webkitSetPresentationMode("inline"),t.emit("pipExit"))}})}(t,e):function(t,e){var n=t.option,r=t.i18n,i=t.template,o=i.$player,a=i.$pipClose,c=i.$pipTitle,s=i.$pipHeader,u=t.events.proxy,l="",f=!1,p=0,d=0,h=0,w=0;u(s,"mousedown",(function(t){f=!0,p=t.pageX,d=t.pageY,h=e.left,w=e.top})),u(s,"mousemove",(function(t){f&&(y(o,"is-dragging"),b(o,"left","".concat(h+t.pageX-p,"px")),b(o,"top","".concat(w+t.pageY-d,"px")))})),u(document,"mouseup",(function(){f=!1,v(o,"is-dragging")})),u(a,"click",(function(){e.pip=!1,f=!1,v(o,"is-dragging")})),g(c,n.title||r.get("Mini player"));var O={get:function(){return m(o,"artplayer-pip")},set:function(n){if(n){e.autoSize=!1,l=o.style.cssText,y(o,"artplayer-pip");var r=document.body;b(o,"top","".concat(r.clientHeight-e.height-50,"px")),b(o,"left","".concat(r.clientWidth-e.width-50,"px")),e.fullscreen=!1,e.fullscreenWeb=!1,e.aspectRatio=!1,e.playbackRate=!1,t.emit("pipEnabled")}else e.pip&&(o.style.cssText=l,v(o,"artplayer-pip"),b(o,"top",null),b(o,"left",null),e.fullscreen=!1,e.fullscreenWeb=!1,e.aspectRatio=!1,e.playbackRate=!1,e.autoSize=!0,t.emit("pipExit"))}};Object.defineProperty(e,"pip",O)}(t,e),Object.defineProperty(e,"pipToggle",{set:function(t){t&&(e.pip=!e.pip)}})}var rt=function t(n){var r;e(this,t),function(t,e){var n=t.option,r=n.type,i=n.customType,o=t.template.$video;Object.defineProperty(e,"url",{get:function(){return o.src},set:function(){$(!1,"You should use this method: art.attachUrl()")}}),Object.defineProperty(e,"attachUrl",{value:function(e){return V().then((function(){function n(e){var n=r||C(e),a=i[n];return n&&a?(t.loading.show=!0,t.emit("beforeCustomType",n),a.call(t,o,e,t),t.emit("afterCustomType",n)):(t.emit("beforeAttachUrl",e),o.src=e,t.emit("afterAttachUrl",e)),Promise.resolve(e)}if("function"==typeof e){var a=e.call(t);return $("function"==typeof a.then,"If url is a function, it needs to return a promise."),a.then((function(e){return t.loading.show=!0,n(e)}))}return n(e)}))}})}(n,this),function(t,e){var n=t.option,r=t.events.proxy,Line truncated
|
||||
Vendored
+7
-1
@@ -5,4 +5,10 @@
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Artplayer=e()}(this,function(){"use strict";var c=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var i=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t};function t(t,e){return t(e={exports:{}},e.exports),e.exports}var a=t(function(e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(t){return n(t)}:e.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)},r(t)}e.exports=r});var o=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t};var s=function(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?o(t):e},u=t(function(e){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(t)}e.exports=n}),l=t(function(n){function r(t,e){return n.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(t,e)}n.exports=r});var e=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)},f=t(function(t,e){t.exports=function(){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r=Object.prototype.toString,s=function(t){if(void 0===t)return"undefined";if(null===t)return"null";var e=n(t);if("boolean"===e)return"boolean";if("string"===e)return"string";if("number"===e)return"number";if("symbol"===e)return"symbol";if("function"===e)return function(t){return"GeneratorFunction"===i(t)}(t)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(t))return"array";if(function(t){if(t.constructor&&"function"==typeof t.constructor.isBuffer)return t.constructor.isBuffer(t);return!1}(t))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(t){if(-1!==t.message.indexOf("callee"))return!0}return!1}(t))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(t))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(t))return"error";if(function(t){return t instanceof RegExp||"string"==typeof t.flags&&"boolean"==typeof t.ignoreCase&&"boolean"==typeof t.multiline&&"boolean"==typeof t.global}(t))return"regexp";switch(i(t)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(t){return"function"==typeof t.throw&&"function"==typeof t.return&&"function"==typeof t.next}(t))return"generator";switch(e=r.call(t)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")};function i(t){return t.constructor?t.constructor.name:null}function u(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:["option"];return l(t,e,n),f(t,e,n),function(o,a,c){var t=s(a),e=s(o);if("object"===t){if("object"!==e)throw new Error("[Type Error]: '".concat(c.join("."),"' require 'object' type, but got '").concat(e,"'"));Object.keys(a).forEach(function(t){var e=o[t],n=a[t],r=c.slice();r.push(t),l(e,n,r),f(e,n,r),u(e,n,r)})}if("array"===t){if("array"!==e)throw new Error("[Type Error]: '".concat(c.join("."),"' require 'array' type, but got '").concat(e,"'"));o.forEach(function(t,e){var n=o[e],r=a[e]||a[0],i=c.slice();i.push(e),l(n,r,i),f(n,r,i),u(n,r,i)})}}(t,e,n),t}function l(t,e,n){if("string"=Line truncated
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Artplayer=e()}(this,(function(){"use strict";var t=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var n=function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function r(t,e){return t(e={exports:{}},e.exports),e.exports}var i=r((function(t){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(r){return"function"==typeof Symbol&&"symbol"===e(Symbol.iterator)?t.exports=n=function(t){return e(t)}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":e(t)},n(r)}t.exports=n}));var o=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t};var a=function(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?o(t):e},c=r((function(t){function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},e(n)}t.exports=e})),s=r((function(t){function e(n,r){return t.exports=e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(n,r)}t.exports=e}));var u=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)},l=r((function(t,e){t.exports=function(){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var e=Object.prototype.toString,n=function(n){if(void 0===n)return"undefined";if(null===n)return"null";var i=t(n);if("boolean"===i)return"boolean";if("string"===i)return"string";if("number"===i)return"number";if("symbol"===i)return"symbol";if("function"===i)return function(t){return"GeneratorFunction"===r(t)}(n)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(n))return"array";if(function(t){return!(!t.constructor||"function"!=typeof t.constructor.isBuffer)&&t.constructor.isBuffer(t)}(n))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(t){if(-1!==t.message.indexOf("callee"))return!0}return!1}(n))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(n))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(n))return"error";if(function(t){return t instanceof RegExp||"string"==typeof t.flags&&"boolean"==typeof t.ignoreCase&&"boolean"==typeof t.multiline&&"boolean"==typeof t.global}(n))return"regexp";switch(r(n)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(t){return"function"==typeof t.throw&&"function"==typeof t.return&&"function"==typeof t.next}(n))return"generator";switch(i=e.call(n)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return i.slice(8,-1).toLowerCase().replace(/\s/g,"")};function r(t){return t.constructor?t.constructor.name:null}function i(t,e){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:["option"];return o(t,e,r),a(t,e,r),function(t,e,r){var c=n(e),s=n(t);if("object"===c){if("object"!==s)throw new Error("[Type Error]: '".concat(r.join("."),"' require 'object' type, but got '").concat(s,"'"));Object.keys(e).forEach((function(n){var c=t[n],s=e[n],u=r.slice();u.push(n),o(c,s,u),a(c,s,u),i(c,s,u)}))}if("array"===c){if("array"!==s)throw new Error("[Type Error]: '".concat(r.join("."),"' require 'array' type, but got '").concat(s,"'"Line truncated
|
||||
/*!
|
||||
* screenfull
|
||||
* v5.0.0 - 2019-09-09
|
||||
* (c) Sindre Sorhus; MIT License
|
||||
*/
|
||||
!function(){var e="undefined"!=typeof window&&void 0!==window.document?window.document:{},n=t.exports,r=function(){for(var t,n=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],r=0,i=n.length,o={};r<i;r++)if((t=n[r])&&t[1]in e){for(r=0;r<t.length;r++)o[n[0][r]]=t[r];return o}return!1}(),i={change:r.fullscreenchange,error:r.fullscreenerror},o={request:function(t){return new Promise(function(n,i){var o=function(){this.off("change",o),n()}.bind(this);this.on("change",o),t=t||e.documentElement,Promise.resolve(t[r.requestFullscreen]()).catch(i)}.bind(this))},exit:function(){return new Promise(function(t,n){if(this.isFullscreen){var i=function(){this.off("change",i),t()}.bind(this);this.on("change",i),Promise.resolve(e[r.exitFullscreen]()).catch(n)}else t()}.bind(this))},toggle:function(t){return this.isFullscreen?this.exit():this.request(t)},onchange:function(t){this.on("change",t)},onerror:function(t){this.on("error",t)},on:function(t,n){var r=i[t];r&&e.addEventListener(r,n,!1)},off:function(t,n){var r=i[t];r&&e.removeEventListener(r,n,!1)},raw:r};r?(Object.defineProperties(o,{isFullscreen:{get:function(){return Boolean(e[r.fullscreenElement])}},element:{enumerable:!0,get:function(){return e[r.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(e[r.fullscreenEnabled])}}}),n?t.exports=o:window.screenfull=o):n?t.exports={isEnabled:!1}:window.screenfull={isEnabled:!1}}()}));tt.isEnabled;function et(t,e){var n=t.template.$video;document.pictureInPictureEnabled?function(t,e){var n=t.template.$video,r=t.events.proxy,i=t.notice;n.disablePictureInPicture=!1,Object.defineProperty(e,"pip",{get:function(){return document.pictureInPictureElement},set:function(t){t?n.requestPictureInPicture().catch((function(t){throw i.show(t),t})):document.exitPictureInPicture().catch((function(t){throw i.show(t),t}))}}),r(n,"enterpictureinpicture",(function(){t.emit("pipEnabled")})),r(n,"leavepictureinpicture",(function(){t.emit("pipExit")})),t.on("destroy",(function(){e.pip&&(e.pip=!1)}))}(t,e):n.webkitSupportsPresentationMode?function(t,e){var n=t.template.$video;n.webkitSetPresentationMode("inline"),Object.defineProperty(e,"pip",{get:function(){return"picture-in-picture"===n.webkitPresentationMode},set:function(e){e?(n.webkitSetPresentationMode("picture-in-picture"),t.emit("pipEnabled")):(n.webkitSetPresentationMode("inline"),t.emit("pipExit"))}})}(t,e):function(t,e){var n=t.option,r=t.i18n,i=t.template,o=i.$player,a=i.$pipClose,c=i.$pipTitle,s=i.$pipHeader,u=t.events.proxy,l="",f=!1,p=0,d=0,b=0,w=0;u(s,"mousedown",(function(t){f=!0,p=t.pageX,d=t.pageY,b=e.left,w=e.top})),u(s,"mousemove",(function(t){f&&(h(o,"is-dragging"),g(o,"left","".concat(b+t.pageX-p,"px")),g(o,"top","".concat(w+t.pageY-d,"px")))})),u(document,"mouseup",(function(){f=!1,y(o,"is-dragging")})),u(a,"click",(function(){e.pip=!1,f=!1,y(o,"is-dragging")})),m(c,n.title||r.get("Mini player"));var O={get:function(){return v(o,"artplayer-pip")},set:function(n){if(n){e.autoSize=!1,l=o.style.cssText,h(o,"artplayer-pip");var r=document.body;g(o,"top","".concat(r.clientHeight-e.height-50,"px")),g(o,"left","".concat(r.clientWidth-e.width-50,"px")),e.fullscreen=!1,e.fullscreenWeb=!1,e.aspectRatio=!1,e.playbackRate=!1,t.emit("pipEnabled")}else e.pip&&(o.style.cssText=l,y(o,"artplayer-pip"),g(o,"top",null),g(o,"left",null),e.fullscreen=!1,e.fullscreenWeb=!1,e.aspectRatio=!1,e.playbackRate=!1,e.autoSize=!0,t.emit("pipExit"))}};Object.defineProperty(e,"pip",O)}(t,e),Object.defineProperty(e,"pipToggle",{set:function(t){t&&(e.pip=!e.pip)}})}var nt=function e(n){var r;t(this,e),function(t,e){var n=t.option,r=n.type,i=n.customType,o=t.template.$video;Object.defineProperty(e,"url",{get:function(){return o.src},set:function(){S(!1,"You should use this method: art.attachUrl()")}}),Object.defineProperty(e,"attachUrl",{value:function(e){return H().then((function(){function n(e){var n=r||D(e),a=i[n];return n&&a?(t.loading.show=!0,t.emit("beforeCustomType",n),a.call(t,o,e,t),t.emit("afterCustomType",n)):(t.emit("beforeAttachUrl",e),o.src=e,t.emit("afterAttachUrl",e)),Promise.resolve(e)}if("function"==typeof e){var a=e.call(t);return S("function"==typeof a.then,"If url is a function, it needs to return a promise."),a.then((function(e){return t.loading.show=!0,n(e)}))}return n(e)}))}})}(n,this),function(t,e){var n=t.option,r=t.events.proxy,Line truncated
|
||||
@@ -9,7 +9,8 @@ const autoprefixer = require('autoprefixer');
|
||||
const cssnano = require('cssnano');
|
||||
const replace = require('rollup-plugin-replace');
|
||||
const svgo = require('rollup-plugin-svgo');
|
||||
const { uglify } = require('rollup-plugin-uglify');
|
||||
const { sizeSnapshot } = require('rollup-plugin-size-snapshot');
|
||||
const { terser } = require('rollup-plugin-terser');
|
||||
const copyAfterBuild = require('./copyAfterBuild');
|
||||
const json = require('rollup-plugin-json');
|
||||
|
||||
@@ -41,7 +42,12 @@ module.exports = function creatRollupConfig(projectPath) {
|
||||
exclude: ['node_modules/**', 'packages/**/node_modules/**'],
|
||||
}),
|
||||
eslint({
|
||||
exclude: ['node_modules/**', 'packages/*/src/**/*.scss', 'packages/*/src/**/*.svg', 'packages/*/src/**/*.json'],
|
||||
exclude: [
|
||||
'node_modules/**',
|
||||
'packages/*/src/**/*.scss',
|
||||
'packages/*/src/**/*.svg',
|
||||
'packages/*/src/**/*.json',
|
||||
],
|
||||
}),
|
||||
postcss({
|
||||
plugins: [
|
||||
@@ -50,8 +56,8 @@ module.exports = function creatRollupConfig(projectPath) {
|
||||
preset: [
|
||||
'default',
|
||||
{
|
||||
calc: false
|
||||
}
|
||||
calc: false,
|
||||
},
|
||||
],
|
||||
}),
|
||||
],
|
||||
@@ -66,10 +72,7 @@ module.exports = function creatRollupConfig(projectPath) {
|
||||
runtimeHelpers: true,
|
||||
exclude: ['node_modules/**', 'packages/**/node_modules/**'],
|
||||
presets: [['@babel/env', { modules: false }]],
|
||||
plugins: [
|
||||
'@babel/plugin-external-helpers',
|
||||
'@babel/plugin-transform-runtime',
|
||||
],
|
||||
plugins: ['@babel/plugin-external-helpers', '@babel/plugin-transform-runtime'],
|
||||
}),
|
||||
svgo({
|
||||
raw: true,
|
||||
@@ -79,8 +82,9 @@ module.exports = function creatRollupConfig(projectPath) {
|
||||
__ENV__: JSON.stringify(process.env.NODE_ENV || 'development'),
|
||||
__VERSION__: version,
|
||||
}),
|
||||
isProd && sizeSnapshot(),
|
||||
isProd &&
|
||||
uglify({
|
||||
terser({
|
||||
output: {
|
||||
preamble: banner,
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user