diff --git a/docs/uncompiled/artplayer-plugin-control/index.js b/docs/uncompiled/artplayer-plugin-control/index.js index b6b587ce8..548c85056 100644 --- a/docs/uncompiled/artplayer-plugin-control/index.js +++ b/docs/uncompiled/artplayer-plugin-control/index.js @@ -199,7 +199,7 @@ if (typeof document !== "undefined") { if (typeof window !== "undefined") window["artplayerPluginControl"] = artplayerPluginControl; },{"bundle-text:./style.less":"cLvfB","@parcel/transformer-js/src/esmodule-helpers.js":"5dUr6"}],"cLvfB":[function(require,module,exports) { -module.exports = ".artplayer-plugin-control .art-bottom {\n height: 68px;\n min-width: 400px;\n max-width: 600px;\n user-select: none;\n -webkit-backdrop-filter: saturate(180%) blur(20px);\n backdrop-filter: saturate(180%) blur(20px);\n pointer-events: auto;\n background-color: #000000b3;\n background-image: none;\n border-radius: 10px;\n flex-direction: column;\n align-items: center;\n padding: 0;\n font-size: 13px;\n transition: opacity .3s;\n display: flex;\n position: absolute;\n bottom: 10px;\n left: 50%;\n transform: translateX(-50%);\n box-shadow: 0 10px 15px -3px #0003, 0 4px 6px -4px #0003;\n}\n\n.artplayer-plugin-control .art-bottom .art-progress {\n width: 65%;\n justify-content: space-between;\n align-items: center;\n gap: 10px;\n display: flex;\n}\n\n.artplayer-plugin-control .art-bottom .art-progress .art-control-thumbnails {\n bottom: 35px;\n}\n\n.artplayer-plugin-control .art-bottom .art-progress .art-control-progress {\n width: 100%;\n}\n\n.artplayer-plugin-control .art-bottom .art-progress .art-control-progress .art-control-progress-inner, .artplayer-plugin-control .art-bottom .art-progress .art-control-progress .art-progress-loaded, .artplayer-plugin-control .art-bottom .art-progress .art-control-progress .art-progress-played {\n border-radius: 5px;\n}\n\n.artplayer-plugin-control .art-bottom .art-progress .art-progress-tip {\n top: -40px !important;\n}\n\n.artplayer-plugin-control .art-bottom .art-controls {\n width: 100%;\n height: auto;\n flex: 1;\n padding: 0 5px;\n}\n\n.artplayer-plugin-control .art-bottom .art-controls .art-control-time, .artplayer-plugin-control .art-bottom .art-controls .art-controls-center {\n display: none;\n}\n\n.artplayer-plugin-control .art-bottom .art-controls .art-volume-panel {\n width: 60px !important;\n}\n\n.artplayer-plugin-control .art-bottom .art-selector-list {\n background-color: #000c !important;\n}\n\n.artplayer-plugin-control .art-bottom .apa-control-current, .artplayer-plugin-control .art-bottom .apa-control-duration {\n width: 17.5%;\n justify-content: center;\n line-height: 1;\n display: flex;\n position: absolute;\n top: 10px;\n}\n\n.artplayer-plugin-control .art-bottom .apa-control-current {\n left: 0;\n}\n\n.artplayer-plugin-control .art-bottom .apa-control-duration {\n right: 0;\n}\n\n.artplayer-plugin-control .art-settings {\n bottom: 85px;\n}\n\n.artplayer-plugin-control.art-control-show .art-subtitle {\n bottom: 80px;\n}\n\n.apa-control-current, .apa-control-duration {\n display: none;\n}\n\n"; +module.exports = ".artplayer-plugin-control .art-bottom {\n height: 68px;\n min-width: 400px;\n max-width: 600px;\n user-select: none;\n -webkit-backdrop-filter: saturate(180%) blur(20px);\n backdrop-filter: saturate(180%) blur(20px);\n pointer-events: auto;\n background-color: #000000b3;\n background-image: none;\n border-radius: 10px;\n flex-direction: column;\n align-items: center;\n padding: 0;\n font-size: 13px;\n display: flex;\n position: absolute;\n bottom: 10px;\n left: 50%;\n transform: translateX(-50%);\n box-shadow: 0 10px 15px -3px #0003, 0 4px 6px -4px #0003;\n}\n\n.artplayer-plugin-control .art-bottom .art-progress {\n width: 65%;\n justify-content: space-between;\n align-items: center;\n gap: 10px;\n display: flex;\n}\n\n.artplayer-plugin-control .art-bottom .art-progress .art-control-thumbnails {\n bottom: 35px;\n}\n\n.artplayer-plugin-control .art-bottom .art-progress .art-control-progress {\n width: 100%;\n}\n\n.artplayer-plugin-control .art-bottom .art-progress .art-control-progress .art-control-progress-inner, .artplayer-plugin-control .art-bottom .art-progress .art-control-progress .art-progress-loaded, .artplayer-plugin-control .art-bottom .art-progress .art-control-progress .art-progress-played {\n border-radius: 5px;\n}\n\n.artplayer-plugin-control .art-bottom .art-progress .art-progress-tip {\n top: -40px !important;\n}\n\n.artplayer-plugin-control .art-bottom .art-controls {\n width: 100%;\n height: auto;\n flex: 1;\n padding: 0 5px;\n}\n\n.artplayer-plugin-control .art-bottom .art-controls .art-control-time, .artplayer-plugin-control .art-bottom .art-controls .art-controls-center {\n display: none;\n}\n\n.artplayer-plugin-control .art-bottom .art-controls .art-volume-panel {\n width: 60px !important;\n}\n\n.artplayer-plugin-control .art-bottom .art-selector-list {\n background-color: #000c !important;\n}\n\n.artplayer-plugin-control .art-bottom .apa-control-current, .artplayer-plugin-control .art-bottom .apa-control-duration {\n width: 17.5%;\n justify-content: center;\n line-height: 1;\n display: flex;\n position: absolute;\n top: 10px;\n}\n\n.artplayer-plugin-control .art-bottom .apa-control-current {\n left: 0;\n}\n\n.artplayer-plugin-control .art-bottom .apa-control-duration {\n right: 0;\n}\n\n.artplayer-plugin-control .art-settings {\n bottom: 85px;\n}\n\n.artplayer-plugin-control.art-control-show .art-subtitle {\n bottom: 80px;\n}\n\n.apa-control-current, .apa-control-duration {\n display: none;\n}\n\n"; },{}],"5dUr6":[function(require,module,exports) { exports.interopDefault = function(a) { diff --git a/docs/uncompiled/artplayer-plugin-control/index.js.map b/docs/uncompiled/artplayer-plugin-control/index.js.map index 826172c46..6a30a89b4 100644 --- a/docs/uncompiled/artplayer-plugin-control/index.js.map +++ b/docs/uncompiled/artplayer-plugin-control/index.js.map @@ -1 +1 @@ -{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAAA,oDAA6C;;AAE7C,SAAS,YAAY,CAAC,GAAG,EAAE;IACvB,MAAM,EACF,OAAO,CAAA,EACP,KAAK,EAAE,EAAE,WAAW,CAAA,EAAE,CAAA,IACzB,GAAG,GAAG,CAAC,WAAW,AAAC;IACpB,MA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C,UAAU,GAAG,CAAC,GAAG;QAAC,OAAO,EAAE,CAAC;KAAC,CAAC;CAC7C,CAAC;AAEF,OAAO,CAAC,iBAAiB,GAAG,SAAU,CAAC,EAAE;IACvC,MAAM,CAAC,cAAc,CAAC,CAAC,EAAE,YAAY,EAAE;QAAC,KAAK,EAAE,IAAI;KAAC,CAAC,CAAC;CACvD,CAAC;AAEF,OAAO,CAAC,SAAS,GAAG,SAAU,MAAM,EAAE,IAAI,EAAE;IAC1C,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,SAAU,GAAG,EAAE;QACzC,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,YAAY,IAAI,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EACvE,OAAO;QAGT,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE;YAC/B,UAAU,EAAE,IAAI;YAChB,GAAG,EAAE,WAAY;gBACf,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;aACpB;SACF,CAAC,CAAC;KACJ,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;CACb,CAAC;AAEF,OAAO,CAAC,MAAM,GAAG,SAAU,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE;IAC9C,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,QAAQ,EAAE;QACpC,UAAU,EAAE,IAAI;QAChB,GAAG,EAAE,GAAG;KACT,CAAC,CAAC;CACJ,CAAC","sources":["packages/artplayer-plugin-control/src/index.js","node_modules/@parcel/runtime-js/lib/bundles/runtime-3b06b37497366e99.js","node_modules/@parcel/transformer-js/src/esmodule-helpers.js"],"sourcesContent":["import style from 'bundle-text:./style.less';\n\nfunction checkVersion(art) {\n const {\n version,\n utils: { errorHandle },\n } = art.constructor;\n const arr = version.split('.').map(Number);\n const major = arr[0];\n const minor = arr[1] / 100;\n errorHandle(\n major + minor >= 4.06,\n `Artplayer.js@${version} is not compatible the artplayerPluginControl@${artplayerPluginControl.version}. Please update it to version Artplayer.js@4.6.x`,\n );\n}\n\nexport default function artplayerPluginControl() {\n return (art) => {\n checkVersion(art);\n\n const {\n template: { $bottom, $player },\n constructor: {\n utils: { append, secondToTime, addClass, removeClass, hasClass, isMobile },\n },\n } = art;\n\n if (isMobile) return;\n const className = 'artplayer-plugin-control';\n addClass($player, className);\n\n const $current = append($bottom, `
`);\n const $duration = append($bottom, `
`);\n\n const events = ['video:loadedmetadata', 'video:timeupdate', 'video:progress'];\n\n for (let index = 0; index < events.length; index++) {\n art.on(events[index], () => {\n $current.innerText = secondToTime(art.currentTime);\n $duration.innerText = secondToTime(art.duration);\n });\n }\n\n return {\n name: 'artplayerPluginControl',\n get enable() {\n return hasClass($player, className);\n },\n set enable(state) {\n if (state) {\n addClass($player, className);\n } else {\n removeClass($player, className);\n }\n },\n };\n };\n}\n\nartplayerPluginControl.env = process.env.NODE_ENV;\nartplayerPluginControl.version = process.env.APP_VER;\nartplayerPluginControl.build = process.env.BUILD_DATE;\n\nif (typeof document !== 'undefined') {\n if (!document.getElementById('artplayer-plugin-control')) {\n const $style = document.createElement('style');\n $style.id = 'artplayer-plugin-control';\n $style.textContent = style;\n document.head.appendChild($style);\n }\n}\n\nif (typeof window !== 'undefined') {\n window['artplayerPluginControl'] = artplayerPluginControl;\n}\n","module.exports = \"18666cb8629c0715\";","exports.interopDefault = function (a) {\n return a && a.__esModule ? a : {default: a};\n};\n\nexports.defineInteropFlag = function (a) {\n Object.defineProperty(a, '__esModule', {value: true});\n};\n\nexports.exportAll = function (source, dest) {\n Object.keys(source).forEach(function (key) {\n if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function () {\n return source[key];\n },\n });\n });\n\n return dest;\n};\n\nexports.export = function (dest, destName, get) {\n Object.defineProperty(dest, destName, {\n enumerable: true,\n get: get,\n });\n};\n"],"names":[],"version":3,"file":"index.js.map","sourceRoot":"../../../"} \ No newline at end of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G,EAAE,GAAG;KACT,CAAC,CAAC;CACJ,CAAC","sources":["packages/artplayer-plugin-control/src/index.js","node_modules/@parcel/runtime-js/lib/bundles/runtime-3b06b37497366e99.js","node_modules/@parcel/transformer-js/src/esmodule-helpers.js"],"sourcesContent":["import style from 'bundle-text:./style.less';\n\nfunction checkVersion(art) {\n const {\n version,\n utils: { errorHandle },\n } = art.constructor;\n const arr = version.split('.').map(Number);\n const major = arr[0];\n const minor = arr[1] / 100;\n errorHandle(\n major + minor >= 4.06,\n `Artplayer.js@${version} is not compatible the artplayerPluginControl@${artplayerPluginControl.version}. Please update it to version Artplayer.js@4.6.x`,\n );\n}\n\nexport default function artplayerPluginControl() {\n return (art) => {\n checkVersion(art);\n\n const {\n template: { $bottom, $player },\n constructor: {\n utils: { append, secondToTime, addClass, removeClass, hasClass, isMobile },\n },\n } = art;\n\n if (isMobile) return;\n\n const className = 'artplayer-plugin-control';\n addClass($player, className);\n\n const $current = append($bottom, `
`);\n const $duration = append($bottom, `
`);\n\n const events = ['video:loadedmetadata', 'video:timeupdate', 'video:progress'];\n\n for (let index = 0; index < events.length; index++) {\n art.on(events[index], () => {\n $current.innerText = secondToTime(art.currentTime);\n $duration.innerText = secondToTime(art.duration);\n });\n }\n\n return {\n name: 'artplayerPluginControl',\n get enable() {\n return hasClass($player, className);\n },\n set enable(state) {\n if (state) {\n addClass($player, className);\n } else {\n removeClass($player, className);\n }\n },\n };\n };\n}\n\nartplayerPluginControl.env = process.env.NODE_ENV;\nartplayerPluginControl.version = process.env.APP_VER;\nartplayerPluginControl.build = process.env.BUILD_DATE;\n\nif (typeof document !== 'undefined') {\n if (!document.getElementById('artplayer-plugin-control')) {\n const $style = document.createElement('style');\n $style.id = 'artplayer-plugin-control';\n $style.textContent = style;\n document.head.appendChild($style);\n }\n}\n\nif (typeof window !== 'undefined') {\n window['artplayerPluginControl'] = artplayerPluginControl;\n}\n","module.exports = \"18666cb8629c0715\";","exports.interopDefault = function (a) {\n return a && a.__esModule ? a : {default: a};\n};\n\nexports.defineInteropFlag = function (a) {\n Object.defineProperty(a, '__esModule', {value: true});\n};\n\nexports.exportAll = function (source, dest) {\n Object.keys(source).forEach(function (key) {\n if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function () {\n return source[key];\n },\n });\n });\n\n return dest;\n};\n\nexports.export = function (dest, destName, get) {\n Object.defineProperty(dest, destName, {\n enumerable: true,\n get: get,\n });\n};\n"],"names":[],"version":3,"file":"index.js.map","sourceRoot":"../../../"} \ No newline at end of file diff --git a/packages/artplayer-plugin-control/src/style.less b/packages/artplayer-plugin-control/src/style.less index 713b6d379..eb8f13316 100644 --- a/packages/artplayer-plugin-control/src/style.less +++ b/packages/artplayer-plugin-control/src/style.less @@ -9,7 +9,6 @@ max-width: 600px; user-select: none; border-radius: 10px; - transition: opacity 0.3s ease; left: 50%; transform: translateX(-50%); bottom: 10px;