mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 10:56:15 -08:00
update docs
This commit is contained in:
1 parent
9700b2dff9
commit
ec38a16be0
166 files changed
+2964
-2669
No files matched your search
@@ -4,4 +4,4 @@
|
||||
* (c) 2017-2023 Harvey Zack
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
!function(t,e,r,n,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i.parcelRequire4dc0&&i.parcelRequire4dc0,u=a.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function l(e,r){if(!u[e]){if(!t[e]){var n="function"==typeof i.parcelRequire4dc0&&i.parcelRequire4dc0;if(!r&&n)return n(e,!0);if(a)return a(e,!0);if(c&&"string"==typeof e)return c(e);var o=new Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}f.resolve=function(r){var n=t[e][1][r];return null!=n?n:r},f.cache={};var s=u[e]=new l.Module(e);t[e][0].call(s.exports,f,s,s.exports,this)}return u[e].exports;function f(t){var e=f.resolve(t);return!1===e?{}:l(e)}}l.isParcelRequire=!0,l.Module=function(t){this.id=t,this.bundle=l,this.exports={}},l.modules=t,l.cache=u,l.parent=a,l.register=function(e,r){t[e]=[function(t,e){e.exports=r},{}]},Object.defineProperty(l,"root",{get:function(){return i.parcelRequire4dc0}}),i.parcelRequire4dc0=l;for(var s=0;s<e.length;s++)l(e[s]);var f=l(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=f:"function"==typeof define&&define.amd&&define((function(){return f}))}({flifo:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var o=t("@swc/helpers/src/_async_to_generator.mjs"),i=n.interopDefault(o),a=t("regenerator-runtime"),u=n.interopDefault(a),c=t("./getVttArray"),l=n.interopDefault(c);function s(t){return e=(0,i.default)(u.default.mark((function e(r){var n,o,a,c,s,f,h,p;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return p=function(t,e){var r=t.template.$progress,n=r.getBoundingClientRect().left,o=c(e.pageX-n,0,r.clientWidth);return{width:o,second:o/r.clientWidth*t.duration}},n=r.constructor,o=n.utils,a=o.setStyle,c=o.clamp,s=r.template.$progress,f=r.events.proxy,e.next=4,(0,l.default)(t.vtt);case 4:return h=e.sent,r.controls.add({name:"thumbnails",position:"top",index:20,style:t.style||{},mounted:function(t){f(s,"mousemove",function(){var e=(0,i.default)(u.default.mark((function e(n){var o,i,c,l;return u.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a(t,"display","block"),o=p(r,n),i=o.second,c=o.width,l=h.find((function(t){return i>=t.start&&i<=t.end}))){e.next=5;break}return e.abrupt("return",a(t,"display","none"));case 5:a(t,"backgroundImage","url(".concat(l.url,")")),a(t,"height","".concat(l.h,"px")),a(t,"width","".concat(l.w,"px")),a(t,"backgroundPosition","-".concat(l.x,"px -").concat(l.y,"px")),c<=l.w/2?a(t,"left",0):c>s.clientWidth-l.w/2?a(t,"left","".concat(s.clientWidth-l.w,"px")):a(t,"left","".concat(c-l.w/2,"px"));case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),f(s,"mouseleave",(function(){a(t,"display","none")})),r.on("hover",(function(e){e||a(t,"display","none")}))}}),e.abrupt("return",{name:"artplayerPluginVttThumbnail"});case 8:case"end":return e.stop()}}),e)}))),function(t){return e.apply(this,arguments)};var e}r.default=s,s.env="production",s.version="1.0.0",s.build="2023-02-24 11:14:39","undefined"!=typeof window&&(window.artplayerPluginVttThumbnail=s)},{"@swc/helpers/src/_async_to_generator.mjs":"eiCdg","regenerator-runtime":"kuNhv","./getVttArray":"5fcbX","@parcel/transformer-js/src/esmodule-helpers.js":"47PTV"}],eiCdg:[function(t,e,r){function n(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function u(t){n(a,o,i,u,c,"next",t)}function c(t){n(a,o,i,u,c,"throw",t)}u(void 0)}))}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"47PTV"}],"47PTV":[function(t,e,r){r.interopDefault=function(t){return t&&t.__esModule?t:{default:t}},r.defineInteropFlag=function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.exportAll=function(t,e){return Object.keys(t).forEach((function(r){"default"===r||"__esModule"===r||e.hasOwnProperty(r)||Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})})),e},r.export=function(t,e,r){Object.defineProperty(t,e,{enumerable:!0,get:r})}},{}],kuNhv:[function(t,e,r){var n=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof g?e:g,i=Object.create(o.prototype),a=new P(n||[]);return i._invoke=function(t,e,r){var n=f;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===d){ifLine truncated
|
||||
!function(e,t,n,r,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof i[r]&&i[r],u=l.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function s(t,n){if(!u[t]){if(!e[t]){var o="function"==typeof i[r]&&i[r];if(!n&&o)return o(t,!0);if(l)return l(t,!0);if(f&&"string"==typeof t)return f(t);var a=new Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}d.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},d.cache={};var c=u[t]=new s.Module(t);e[t][0].call(c.exports,d,c,c.exports,this)}return u[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:s(t)}}s.isParcelRequire=!0,s.Module=function(e){this.id=e,this.bundle=s,this.exports={}},s.modules=e,s.cache=u,s.parent=l,s.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(s,"root",{get:function(){return i[r]}}),i[r]=s;for(var a=0;a<t.length;a++)s(t[a]);if(n){var c=s(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof define&&define.amd&&define((function(){return c}))}}({flifo:[function(e,t,n){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(n);var o=e("./getVttArray"),i=r.interopDefault(o);function l(e){return async t=>{const{constructor:{utils:{setStyle:n,clamp:r}},template:{$progress:o},events:{proxy:l}}=t,u=await(0,i.default)(e.vtt);return t.controls.add({name:"thumbnails",position:"top",index:20,style:e.style||{},mounted(e){l(o,"mousemove",(async i=>{n(e,"display","block");const{second:l,width:f}=function(e,t){const{$progress:n}=e.template,{left:o}=n.getBoundingClientRect(),i=r(t.pageX-o,0,n.clientWidth);return{width:i,second:i/n.clientWidth*e.duration}}(t,i),s=u.find((e=>l>=e.start&&l<=e.end));if(!s)return n(e,"display","none");n(e,"backgroundImage",`url(${s.url})`),n(e,"height",`${s.h}px`),n(e,"width",`${s.w}px`),n(e,"backgroundPosition",`-${s.x}px -${s.y}px`),f<=s.w/2?n(e,"left",0):f>o.clientWidth-s.w/2?n(e,"left",o.clientWidth-s.w+"px"):n(e,"left",f-s.w/2+"px")})),l(o,"mouseleave",(()=>{n(e,"display","none")})),t.on("hover",(t=>{t||n(e,"display","none")}))}}),{name:"artplayerPluginVttThumbnail"}}}n.default=l,l.env="production",l.version="1.0.0",l.build="2023-02-24 21:42:23","undefined"!=typeof window&&(window.artplayerPluginVttThumbnail=l)},{"./getVttArray":"5fcbX","@parcel/transformer-js/src/esmodule-helpers.js":"47PTV"}],"5fcbX":[function(e,t,n){function r(e){var t,n,r,o=e.split("."),i=o[0].split(":")||[],l=(t=o[1]||"0",n=3,r="0",t.length>n?String(t):((n-=t.length)>r.length&&(r+=r.repeat(n/r.length)),String(t)+r.slice(0,n))),u=Number(l)/1e3;return 3600*Number(i[i.length-3]||0)+60*Number(i[i.length-2]||0)+Number(i[i.length-1]||0)+u}e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(n),n.default=async function(e=""){const t=(await(await fetch(e)).text()).split(/[\n\r]/gm).filter((e=>e.trim())),n=[];for(let o=1;o<t.length;o+=2){const i=t[o],l=t[o+1];if(!l.trim())continue;const u=/((?:[0-9]{2}:)?(?:[0-9]{2}:)?[0-9]{2}(?:.[0-9]{3})?)(?: ?--> ?)((?:[0-9]{2}:)?(?:[0-9]{2}:)?[0-9]{2}(?:.[0-9]{3})?)/,f=i.match(u),s=/(.*)#(\w{4})=(.*)/i,a=l.match(s),c=Math.floor(r(f[1])),d=Math.floor(r(f[2])),p=e.split("/");p.pop(),p.push(a[1]);const h={start:c,end:d,url:p.join("/")},m=a[2].split(""),g=a[3].split(",");for(let e=0;e<m.length;e++)h[m[e]]=g[e];n.push(h)}return n}},{"@parcel/transformer-js/src/esmodule-helpers.js":"47PTV"}],"47PTV":[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach((function(n){"default"===n||"__esModule"===n||t.hasOwnProperty(n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})})),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["flifo"],"flifo","parcelRequire4dc0");
|
||||
Reference in new issue
Block a user