mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 10:56:15 -08:00
* init * init * add example * add initControl * add initControl * update style * update style * update style * update style * update style * update style * update style * update style * build all * build all * update style
7 lines
5.0 KiB
JavaScript
7 lines
5.0 KiB
JavaScript
/*!
|
|
* artplayer-plugin-control.js v1.0.0
|
|
* Github: https://github.com/zhw2590582/ArtPlayer
|
|
* (c) 2017-2022 Harvey Zack
|
|
* Released under the MIT License.
|
|
*/
|
|
!function(e,r,t,n,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i[n]&&i[n],l=a.cache||{},p="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(r,t){if(!l[r]){if(!e[r]){var o="function"==typeof i[n]&&i[n];if(!t&&o)return o(r,!0);if(a)return a(r,!0);if(p&&"string"==typeof r)return p(r);var d=new Error("Cannot find module '"+r+"'");throw d.code="MODULE_NOT_FOUND",d}c.resolve=function(t){var n=e[r][1][t];return null!=n?n:t},c.cache={};var s=l[r]=new u.Module(r);e[r][0].call(s.exports,c,s,s.exports,this)}return l[r].exports;function c(e){var r=c.resolve(e);return!1===r?{}:u(r)}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=l,u.parent=a,u.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]},Object.defineProperty(u,"root",{get:function(){return i[n]}}),i[n]=u;for(var d=0;d<r.length;d++)u(r[d]);if(t){var s=u(t);"object"==typeof exports&&"undefined"!=typeof module?module.exports=s:"function"==typeof define&&define.amd&&define((function(){return s}))}}({"19iYR":[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(t);var o=e("bundle-text:./style.less"),i=n.interopDefault(o);function a(){return e=>{!function(e){const{version:r,utils:{errorHandle:t}}=e.constructor,n=r.split(".").map(Number);t(n[0]+n[1]/100>=4.06,`Artplayer.js@${r} is not compatible the artplayerPluginControl@${a.version}. Please update it to version Artplayer.js@4.6.x`)}(e);const{template:{$bottom:r},constructor:{utils:{append:t,secondToTime:n,addClass:o}}}=e;o(r,"artplayer-plugin-control");const i=t(r,'<div class="apa-control-current"></div>'),l=t(r,'<div class="apa-control-duration"></div>'),p=["video:loadedmetadata","video:timeupdate","video:progress"];for(let r=0;r<p.length;r++)e.on(p[r],(()=>{i.innerText=n(e.currentTime),l.innerText=n(e.duration)}));return{name:"artplayerPluginControl"}}}if(t.default=a,a.env="production",a.version="1.0.0",a.build="2022-12-31 19:31:41","undefined"!=typeof document&&!document.getElementById("artplayer-plugin-control")){const e=document.createElement("style");e.id="artplayer-plugin-control",e.textContent=i.default,document.head.appendChild(e)}"undefined"!=typeof window&&(window.artplayerPluginControl=a)},{"bundle-text:./style.less":"71LXF","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"71LXF":[function(e,r,t){r.exports=".art-video-player .artplayer-plugin-control{height:68px;max-width:520px;user-select:none;-webkit-backdrop-filter:saturate(180%)blur(20px);backdrop-filter:saturate(180%)blur(20px);background-color:#000000b3;background-image:none;border-radius:10px;flex-direction:column;align-items:center;padding:0;font-size:13px;transition:opacity .3s;display:flex;position:absolute;bottom:10px;left:50%;transform:translate(-50%);box-shadow:0 10px 15px -3px #0003,0 4px 6px -4px #0003}.art-video-player .artplayer-plugin-control .art-progress{width:70%;justify-content:space-between;align-items:center;gap:10px;display:flex}.art-video-player .artplayer-plugin-control .art-progress .art-control-thumbnails{border-radius:5px;bottom:35px}.art-video-player .artplayer-plugin-control .art-progress .art-control-progress{width:100%}.art-video-player .artplayer-plugin-control .art-progress .art-control-progress .art-control-progress-inner{height:100%;border-radius:5px}.art-video-player .artplayer-plugin-control .art-progress .art-control-progress .art-progress-loaded,.art-video-player .artplayer-plugin-control .art-progress .art-control-progress .art-progress-played{border-radius:5px}.art-video-player .artplayer-plugin-control .art-controls{width:100%;height:auto;flex:1;padding:0 5px}.art-video-player .artplayer-plugin-control .art-controls .art-control-time{display:none}.art-video-player .artplayer-plugin-control .art-controls .art-volume-panel{width:60px!important}.art-video-player .artplayer-plugin-control .apa-control-current,.art-video-player .artplayer-plugin-control .apa-control-duration{width:15%;justify-content:center;line-height:1;display:flex;position:absolute;top:10px}.art-video-player .artplayer-plugin-control .apa-control-current{left:0}.art-video-player .artplayer-plugin-control .apa-control-duration{right:0}.art-video-player.art-control-show .art-subtitle{bottom:80px}"},{}],"9pCYc":[function(e,r,t){t.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},t.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.exportAll=function(e,r){return Object.keys(e).forEach((function(t){"default"===t||"__esModule"===t||r.hasOwnProperty(t)||Object.defineProperty(r,t,{enumerable:!0,get:function(){return e[t]}})})),r},t.export=function(e,r,t){Object.defineProperty(e,r,{enumerable:!0,get:t})}},{}]},["19iYR"],"19iYR","parcelRequire4dc0"); |