mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 19:06:15 -08:00
25 lines
5.3 KiB
JavaScript
25 lines
5.3 KiB
JavaScript
/*!
|
|
* artplayer-plugin-control.js v2.0.0
|
|
* Github: https://github.com/zhw2590582/ArtPlayer
|
|
* (c) 2017-2023 Harvey Zack
|
|
* Released under the MIT License.
|
|
*/
|
|
!// modules are defined as an array
|
|
// [ module function, map of requires ]
|
|
//
|
|
// map of requires is short require name -> numeric require
|
|
//
|
|
// anything defined in a previous bundle is accessed via the
|
|
// orig method which is the require for previous bundles
|
|
function(e,t,r,o,n){/* eslint-disable no-undef */var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof l[o]&&l[o],i=a.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(t,r){if(!i[t]){if(!e[t]){// if we cannot find the module within our internal map or
|
|
// cache jump to the current global require ie. the last bundle
|
|
// that was added to the page.
|
|
var n="function"==typeof l[o]&&l[o];if(!r&&n)return n(t,!0);// If there are other bundles on this page the require from the
|
|
// previous one is saved to 'previousRequire'. Repeat this as
|
|
// many times as there are bundles until the module is found or
|
|
// we exhaust the require chain.
|
|
if(a)return a(t,!0);// Try the node require function if it exists.
|
|
if(u&&"string"==typeof t)return u(t);var c=Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}s.resolve=function(r){var o=e[t][1][r];return null!=o?o:r},s.cache={};var d=i[t]=new p.Module(t);e[t][0].call(d.exports,s,d,d.exports,this)}return i[t].exports;function s(e){var t=s.resolve(e);return!1===t?{}:p(t)}}p.isParcelRequire=!0,p.Module=function(e){this.id=e,this.bundle=p,this.exports={}},p.modules=e,p.cache=i,p.parent=a,p.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(p,"root",{get:function(){return l[o]}}),l[o]=p;for(var c=0;c<t.length;c++)p(t[c]);if(r){// Expose entry point to Node, AMD or browser globals
|
|
// Based on https://github.com/ForbesLindesay/umd/blob/master/template.js
|
|
var d=p(r);// CommonJS
|
|
"object"==typeof exports&&"undefined"!=typeof module?module.exports=d:"function"==typeof define&&define.amd?define(function(){return d}):n&&(this[n]=d)}}({"16V0T":[function(e,t,r){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"default",()=>a);var n=e("bundle-text:./style.less"),l=o.interopDefault(n);function a(){return e=>{!function(e){let{version:t,utils:{errorHandle:r}}=e.constructor,o=t.split(".").map(Number),n=o[0],l=o[1]/100;r(n+l>=5,`Artplayer.js@${t} is not compatible the artplayerPluginControl@${a.version}. Please update it to version Artplayer.js@5.x.x`)}(e);let{template:{$bottom:t,$player:r},constructor:{utils:{append:o,secondToTime:n,addClass:l,removeClass:i,hasClass:u,isMobile:p}}}=e;if(p)return;let c="artplayer-plugin-control";l(r,c);let d=o(t,'<div class="apa-control-current"></div>'),s=o(t,'<div class="apa-control-duration"></div>'),f=["video:loadedmetadata","video:timeupdate","video:progress"];for(let t=0;t<f.length;t++)e.on(f[t],()=>{d.innerText=n(e.currentTime),s.innerText=n(e.duration)});return{name:"artplayerPluginControl",get enable(){return u(r,c)},set enable(state){state?l(r,c):i(r,c)}}}}if(a.env="production",a.version="2.0.0",a.build="2023-11-23 23:22:00","undefined"!=typeof document&&!document.getElementById("artplayer-plugin-control")){let e=document.createElement("style");e.id="artplayer-plugin-control",e.textContent=l.default,document.head.appendChild(e)}"undefined"!=typeof window&&(window.artplayerPluginControl=a)},{"bundle-text:./style.less":"klrMD","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],klrMD:[function(e,t,r){t.exports=".artplayer-plugin-control{--art-control-height:46px;--art-control-icon-scale:1.1}.artplayer-plugin-control .apa-control-current,.artplayer-plugin-control .apa-control-duration{display:flex}.artplayer-plugin-control .art-control-time,.artplayer-plugin-control .art-controls-center{display:none}.artplayer-plugin-control .art-settings{bottom:85px}.artplayer-plugin-control .art-bottom{backdrop-filter:saturate(180%)blur(20px);background-color:#000000b3;background-image:none;border-radius:10px;align-items:center;width:400px;height:70px;margin-left:-200px;inset:auto auto 10px 50%;overflow:visible;box-shadow:0 10px 15px -3px #0003,0 4px 6px -4px #0003}.artplayer-plugin-control .art-bottom .art-progress{width:70%}.artplayer-plugin-control .art-bottom .art-controls{width:100%}.artplayer-plugin-control .art-bottom .apa-control-current,.artplayer-plugin-control .art-bottom .apa-control-duration{justify-content:center;width:15%;font-size:12px;line-height:1;display:flex;position:absolute;top:10px}.artplayer-plugin-control .art-bottom .apa-control-current{left:0}.artplayer-plugin-control .art-bottom .apa-control-duration{right:0}.apa-control-current,.apa-control-duration{display:none}"},{}],"9pCYc":[function(e,t,r){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||t.hasOwnProperty(r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}]},["16V0T"],"16V0T","parcelRequire4dc0"); |