mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 19:06:15 -08:00
refactor(core): CORE-12 type template resources and verify bundled notices
This commit is contained in:
1 parent
b8039ad1f1
commit
9eb7c945ca
101 files changed
+7363
-664
No files matched your search
+2
-1
@@ -1,2 +1,3 @@
|
||||
* text=auto
|
||||
*.js text eol=lf
|
||||
*.js text eol=lf
|
||||
refactor/baselines/core-vendor/*.txt text eol=lf
|
||||
@@ -3,5 +3,68 @@
|
||||
* Github: https://github.com/zhw2590582/ArtPlayer
|
||||
* (c) 2017-2026 Harvey Zhao
|
||||
* Released under the MIT License.
|
||||
*
|
||||
* ArtPlayer bundled third-party notices
|
||||
*
|
||||
*
|
||||
* screenfull - reference v6.0.2, locally adapted
|
||||
* https://github.com/sindresorhus/screenfull
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Hint.css v2.7.0 - scoped and styled for ArtPlayer
|
||||
* https://github.com/chinchang/hint.css
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) 2021 Kushagra Gour
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* option-validator v2.0.6
|
||||
* https://github.com/zhw2590582/option-validator
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) 2018 Harvey Zack
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
!function(t,e){"object"===typeof exports&&"undefined"!==typeof module?module.exports=e():"function"==typeof define&&define.amd?(t.Artplayer=e(),define(function(){return t.Artplayer})):(t="undefined"!==typeof globalThis?globalThis:t||self).Artplayer=e()}(this,function(){"use strict";function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var e,r={exports:{}};var o=(e||(e=1,r.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,r=function(r){if(void 0===r)return"undefined";if(null===r)return"null";var a=t(r);if("boolean"===a)return"boolean";if("string"===a)return"string";if("number"===a)return"number";if("symbol"===a)return"symbol";if("function"===a)return"GeneratorFunction"===o(r)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(r))return"array";if(function(t){return!(!t.constructor||"function"!=typeof t.constructor.isBuffer)&&t.constructor.isBuffer(t)}(r))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(r))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(r))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(r))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}(r))return"regexp";switch(o(r)){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}(r))return"generator";switch(a=e.call(r)){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 a.slice(8,-1).toLowerCase().replace(/\s/g,"")};function o(t){return t.constructor?t.constructor.name:null}function a(t,e){var o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:["option"];return n(t,e,o),i(t,e,o),function(t,e,o){var s=r(e),l=r(t);if("object"===s){if("object"!==l)throw new Error("[Type Error]: '".concat(o.join("."),"' require 'object' type, but got '").concat(l,"'"));Object.keys(e).forEach(function(r){var s=t[r],l=e[r],c=o.slice();c.push(r),n(s,l,c),i(s,l,c),a(s,l,c)})}if("array"===s){if("array"!==l)throw new Error("[Type Error]: '".concat(o.join("."),"' require 'array' type, but got '").concat(l,"'"));t.forEach(function(r,s){var l=t[s],c=e[s]||e[0],d=o.slice();d.push(s),n(l,c,d),i(l,c,d),a(l,c,d)})}}(t,e,o),t}function n(t,e,o){if("string"===r(e)){var a=r(t);if("?"===e[0]&&(e=e.slice(1)+"|undefined"),!(-1<e.indexOf("|")?e.split("|").map(function(t){return t.toLowerCase().trim()}).filter(Boolean).some(function(t){return a===t}):e.toLowerCase().trim()===a))throw new Error("[Type Error]: '".concat(o.join("."),"' require '").concat(e,"' type, but got '").concat(a,"'"))}}function i(t,e,o){if("function"===r(e)){var a=e(t,r(t),o);if(!0!==a){var n=r(a);throw"string"===n?new Error(a):"error"===n?a:new Error("[Validator Error]: The scheme for '".concat(o.join("."),"' validator require return true, but got '").concat(a,"'"))}}}return a.kindOf=r,a}()),r.exports);const a=t(o),n="5.4.1",i={properties:["audioTracks","autoplay","buffered","controller","controls","crossOrigin","currentSrc","currentTime","defaultMuted","defaultPlaybackRate","duration","ended","error","loop","mediaGroup","muted","networkState","paused","playbackRate","played","preload","readyState","seekable","seeking","src","startDate","textTracks","videoTracks","volume"],methods:["addTextTrack","canPlayType","load","play","pause"],events:["abort","canplay","canplaythrough","durationchange","emptied","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],prototypes:["width","height","videoWidth","videoHeight","poster","webkitDecodedFrameCount","webkitDroppedFrameCount","playsInline","webLine truncated
|
||||
!function(t,e){"object"===typeof exports&&"undefined"!==typeof module?module.exports=e():"function"==typeof define&&define.amd?(t.Artplayer=e(),define(function(){return t.Artplayer})):(t="undefined"!==typeof globalThis?globalThis:t||self).Artplayer=e()}(this,function(){"use strict";function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var e,r={exports:{}};var o=(e||(e=1,r.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,r=function(r){if(void 0===r)return"undefined";if(null===r)return"null";var a=t(r);if("boolean"===a)return"boolean";if("string"===a)return"string";if("number"===a)return"number";if("symbol"===a)return"symbol";if("function"===a)return"GeneratorFunction"===o(r)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(r))return"array";if(function(t){return!(!t.constructor||"function"!=typeof t.constructor.isBuffer)&&t.constructor.isBuffer(t)}(r))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(r))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(r))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(r))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}(r))return"regexp";switch(o(r)){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}(r))return"generator";switch(a=e.call(r)){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 a.slice(8,-1).toLowerCase().replace(/\s/g,"")};function o(t){return t.constructor?t.constructor.name:null}function a(t,e){var o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:["option"];return n(t,e,o),i(t,e,o),function(t,e,o){var s=r(e),l=r(t);if("object"===s){if("object"!==l)throw new Error("[Type Error]: '".concat(o.join("."),"' require 'object' type, but got '").concat(l,"'"));Object.keys(e).forEach(function(r){var s=t[r],l=e[r],c=o.slice();c.push(r),n(s,l,c),i(s,l,c),a(s,l,c)})}if("array"===s){if("array"!==l)throw new Error("[Type Error]: '".concat(o.join("."),"' require 'array' type, but got '").concat(l,"'"));t.forEach(function(r,s){var l=t[s],c=e[s]||e[0],d=o.slice();d.push(s),n(l,c,d),i(l,c,d),a(l,c,d)})}}(t,e,o),t}function n(t,e,o){if("string"===r(e)){var a=r(t);if("?"===e[0]&&(e=e.slice(1)+"|undefined"),!(-1<e.indexOf("|")?e.split("|").map(function(t){return t.toLowerCase().trim()}).filter(Boolean).some(function(t){return a===t}):e.toLowerCase().trim()===a))throw new Error("[Type Error]: '".concat(o.join("."),"' require '").concat(e,"' type, but got '").concat(a,"'"))}}function i(t,e,o){if("function"===r(e)){var a=e(t,r(t),o);if(!0!==a){var n=r(a);throw"string"===n?new Error(a):"error"===n?a:new Error("[Validator Error]: The scheme for '".concat(o.join("."),"' validator require return true, but got '").concat(a,"'"))}}}return a.kindOf=r,a}()),r.exports);const a=t(o),n="5.4.1",i={properties:["audioTracks","autoplay","buffered","controller","controls","crossOrigin","currentSrc","currentTime","defaultMuted","defaultPlaybackRate","duration","ended","error","loop","mediaGroup","muted","networkState","paused","playbackRate","played","preload","readyState","seekable","seeking","src","startDate","textTracks","videoTracks","volume"],methods:["addTextTrack","canPlayType","load","play","pause"],events:["abort","canplay","canplaythrough","durationchange","emptied","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],prototypes:["width","height","videoWidth","videoHeight","poster","webkitDecodedFrameCount","webkitDroppedFrameCount","playsInline","webLine truncated
|
||||
@@ -3,5 +3,68 @@
|
||||
* Github: https://github.com/zhw2590582/ArtPlayer
|
||||
* (c) 2017-2026 Harvey Zhao
|
||||
* Released under the MIT License.
|
||||
*
|
||||
* ArtPlayer bundled third-party notices
|
||||
*
|
||||
*
|
||||
* screenfull - reference v6.0.2, locally adapted
|
||||
* https://github.com/sindresorhus/screenfull
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Hint.css v2.7.0 - scoped and styled for ArtPlayer
|
||||
* https://github.com/chinchang/hint.css
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) 2021 Kushagra Gour
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* option-validator v2.0.6
|
||||
* https://github.com/zhw2590582/option-validator
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) 2018 Harvey Zack
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
!function(t,e){"object"===typeof exports&&"undefined"!==typeof module?module.exports=e():"function"==typeof define&&define.amd?(t.Artplayer=e(),define(function(){return t.Artplayer})):(t="undefined"!==typeof globalThis?globalThis:t||self).Artplayer=e()}(this,function(){"use strict";var t,e=Object.defineProperty,r=Object.defineProperties,o=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,s=(t,r,o)=>r in t?e(t,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[r]=o,l=(t,e)=>{for(var r in e||(e={}))a.call(e,r)&&s(t,r,e[r]);if(n)for(var r of n(e))i.call(e,r)&&s(t,r,e[r]);return t},c=(t,e)=>r(t,o(e)),d=(t,e,r)=>new Promise((o,n)=>{var a=t=>{try{s(r.next(t))}catch(e){n(e)}},i=t=>{try{s(r.throw(t))}catch(e){n(e)}},s=t=>t.done?o(t.value):Promise.resolve(t.value).then(a,i);s((r=r.apply(t,e)).next())});function p(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var h,u={exports:{}};var m=(h||(h=1,u.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,r=function(r){if(void 0===r)return"undefined";if(null===r)return"null";var n=t(r);if("boolean"===n)return"boolean";if("string"===n)return"string";if("number"===n)return"number";if("symbol"===n)return"symbol";if("function"===n)return"GeneratorFunction"===o(r)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(r))return"array";if(function(t){return!(!t.constructor||"function"!=typeof t.constructor.isBuffer)&&t.constructor.isBuffer(t)}(r))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(r))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(r))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(r))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}(r))return"regexp";switch(o(r)){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}(r))return"generator";switch(n=e.call(r)){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 n.slice(8,-1).toLowerCase().replace(/\s/g,"")};function o(t){return t.constructor?t.constructor.name:null}function n(t,e){var o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:["option"];return a(t,e,o),i(t,e,o),function(t,e,o){var s=r(e),l=r(t);if("object"===s){if("object"!==l)throw new Error("[Type Error]: '".concat(o.join("."),"' require 'object' type, but got '").concat(l,"'"));Object.keys(e).forEach(function(r){var s=t[r],l=e[r],c=o.slice();c.push(r),a(s,l,c),i(s,l,c),n(s,l,c)})}if("array"===s){if("array"!==l)throw new Error("[Type Error]: '".concat(o.join("."),"' require 'array' type, but got '").concat(l,"'"));t.forEach(function(r,s){var l=t[s],c=e[s]||e[0],d=o.slice();d.push(s),a(l,c,d),i(l,c,d),n(l,c,d)})}}(t,e,o),t}function a(t,e,o){if("string"===r(e)){var n=r(t);if("?"===e[0]&&(e=e.slice(1)+"|undefined"),!(-1<e.indexOf("|")?e.split("|").map(function(t){return t.toLowerCase().trim()}).filter(Boolean).some(function(t){return n===t}):e.toLowerCase().trim()===n))throw new Error("[Type Error]: '".concat(o.join("."),"' require '").concat(e,"' type, but got '").concat(n,"'"))}}function i(t,e,o){if("function"===r(e)){var n=e(t,r(t),o);if(!0!==n){var a=r(n);throw"string"===a?new Error(n):"error"===a?n:new Error("[Validator Error]: The scheme for '".concat(o.join("."),"' validator require return true, but got '").concat(n,"'"))}}}return n.kindOf=r,n}()),u.exports);const f=p(m),g="5.4.1",v={properties:["audioTracks","autoplay","buffered","controller","controls","crossOrigin","currentSrc","currentTime","defaultMuted","defaultPlaybackRate","duration","ended","error","loop","meLine truncated
|
||||
!function(t,e){"object"===typeof exports&&"undefined"!==typeof module?module.exports=e():"function"==typeof define&&define.amd?(t.Artplayer=e(),define(function(){return t.Artplayer})):(t="undefined"!==typeof globalThis?globalThis:t||self).Artplayer=e()}(this,function(){"use strict";var t,e=Object.defineProperty,r=Object.defineProperties,o=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,s=(t,r,o)=>r in t?e(t,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[r]=o,l=(t,e)=>{for(var r in e||(e={}))a.call(e,r)&&s(t,r,e[r]);if(n)for(var r of n(e))i.call(e,r)&&s(t,r,e[r]);return t},c=(t,e)=>r(t,o(e)),d=(t,e,r)=>new Promise((o,n)=>{var a=t=>{try{s(r.next(t))}catch(e){n(e)}},i=t=>{try{s(r.throw(t))}catch(e){n(e)}},s=t=>t.done?o(t.value):Promise.resolve(t.value).then(a,i);s((r=r.apply(t,e)).next())});function p(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var u,h={exports:{}};var f=(u||(u=1,h.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,r=function(r){if(void 0===r)return"undefined";if(null===r)return"null";var n=t(r);if("boolean"===n)return"boolean";if("string"===n)return"string";if("number"===n)return"number";if("symbol"===n)return"symbol";if("function"===n)return"GeneratorFunction"===o(r)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(r))return"array";if(function(t){return!(!t.constructor||"function"!=typeof t.constructor.isBuffer)&&t.constructor.isBuffer(t)}(r))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(r))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(r))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(r))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}(r))return"regexp";switch(o(r)){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}(r))return"generator";switch(n=e.call(r)){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 n.slice(8,-1).toLowerCase().replace(/\s/g,"")};function o(t){return t.constructor?t.constructor.name:null}function n(t,e){var o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:["option"];return a(t,e,o),i(t,e,o),function(t,e,o){var s=r(e),l=r(t);if("object"===s){if("object"!==l)throw new Error("[Type Error]: '".concat(o.join("."),"' require 'object' type, but got '").concat(l,"'"));Object.keys(e).forEach(function(r){var s=t[r],l=e[r],c=o.slice();c.push(r),a(s,l,c),i(s,l,c),n(s,l,c)})}if("array"===s){if("array"!==l)throw new Error("[Type Error]: '".concat(o.join("."),"' require 'array' type, but got '").concat(l,"'"));t.forEach(function(r,s){var l=t[s],c=e[s]||e[0],d=o.slice();d.push(s),a(l,c,d),i(l,c,d),n(l,c,d)})}}(t,e,o),t}function a(t,e,o){if("string"===r(e)){var n=r(t);if("?"===e[0]&&(e=e.slice(1)+"|undefined"),!(-1<e.indexOf("|")?e.split("|").map(function(t){return t.toLowerCase().trim()}).filter(Boolean).some(function(t){return n===t}):e.toLowerCase().trim()===n))throw new Error("[Type Error]: '".concat(o.join("."),"' require '").concat(e,"' type, but got '").concat(n,"'"))}}function i(t,e,o){if("function"===r(e)){var n=e(t,r(t),o);if(!0!==n){var a=r(n);throw"string"===a?new Error(n):"error"===a?n:new Error("[Validator Error]: The scheme for '".concat(o.join("."),"' validator require return true, but got '").concat(n,"'"))}}}return n.kindOf=r,n}()),h.exports);const m=p(f),g="5.4.1",v={properties:["audioTracks","autoplay","buffered","controller","controls","crossOrigin","currentSrc","currentTime","defaultMuted","defaultPlaybackRate","duration","ended","error","loop","meLine truncated
|
||||
+196
-124
@@ -3,6 +3,69 @@
|
||||
* Github: https://github.com/zhw2590582/ArtPlayer
|
||||
* (c) 2017-2026 Harvey Zhao
|
||||
* Released under the MIT License.
|
||||
*
|
||||
* ArtPlayer bundled third-party notices
|
||||
*
|
||||
*
|
||||
* screenfull - reference v6.0.2, locally adapted
|
||||
* https://github.com/sindresorhus/screenfull
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Hint.css v2.7.0 - scoped and styled for ArtPlayer
|
||||
* https://github.com/chinchang/hint.css
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) 2021 Kushagra Gour
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* option-validator v2.0.6
|
||||
* https://github.com/zhw2590582/option-validator
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) 2018 Harvey Zack
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
function getDefaultExportFromCjs(x) {
|
||||
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
||||
@@ -245,6 +308,21 @@ const isIOS = /iPad|iPhone|iPod/i.test(userAgent) && !window.MSStream;
|
||||
const isIOS13 = isIOS || userAgent.includes("Macintosh") && navigator.maxTouchPoints >= 1;
|
||||
const isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(userAgent) || isIOS13;
|
||||
const isBrowser = typeof window !== "undefined" && typeof document !== "undefined";
|
||||
function setStyleText(id2, style) {
|
||||
let $style = document.getElementById(id2);
|
||||
if (!$style) {
|
||||
$style = document.createElement("style");
|
||||
$style.id = id2;
|
||||
if (document.readyState === "loading") {
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
document.head.appendChild($style);
|
||||
});
|
||||
} else {
|
||||
(document.head || document.documentElement).appendChild($style);
|
||||
}
|
||||
}
|
||||
$style.textContent = style;
|
||||
}
|
||||
function query(selector, parent = document) {
|
||||
return parent.querySelector(selector);
|
||||
}
|
||||
@@ -317,28 +395,13 @@ function replaceElement(newChild, oldChild) {
|
||||
function createElement(tag) {
|
||||
return document.createElement(tag);
|
||||
}
|
||||
function getIcon(key = "", html = "") {
|
||||
function getIcon(key = "", html2 = "") {
|
||||
const icon = createElement("i");
|
||||
addClass(icon, "art-icon");
|
||||
addClass(icon, `art-icon-${key}`);
|
||||
append(icon, html);
|
||||
append(icon, html2);
|
||||
return icon;
|
||||
}
|
||||
function setStyleText(id2, style2) {
|
||||
let $style = document.getElementById(id2);
|
||||
if (!$style) {
|
||||
$style = document.createElement("style");
|
||||
$style.id = id2;
|
||||
if (document.readyState === "loading") {
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
document.head.appendChild($style);
|
||||
});
|
||||
} else {
|
||||
(document.head || document.documentElement).appendChild($style);
|
||||
}
|
||||
}
|
||||
$style.textContent = style2;
|
||||
}
|
||||
function supportsFlex() {
|
||||
const div = document.createElement("div");
|
||||
div.style.display = "flex";
|
||||
@@ -397,12 +460,12 @@ function getSafeAreaInsets() {
|
||||
const div = document.createElement("div");
|
||||
div.style.cssText = "position:fixed;top:env(safe-area-inset-top,0px);right:env(safe-area-inset-right,0px);bottom:env(safe-area-inset-bottom,0px);left:env(safe-area-inset-left,0px);pointer-events:none;visibility:hidden;";
|
||||
document.body.appendChild(div);
|
||||
const style2 = getComputedStyle(div);
|
||||
const style = getComputedStyle(div);
|
||||
const insets = {
|
||||
top: Number.parseFloat(style2.top) || 0,
|
||||
right: Number.parseFloat(style2.right) || 0,
|
||||
bottom: Number.parseFloat(style2.bottom) || 0,
|
||||
left: Number.parseFloat(style2.left) || 0
|
||||
top: Number.parseFloat(style.top) || 0,
|
||||
right: Number.parseFloat(style.right) || 0,
|
||||
bottom: Number.parseFloat(style.bottom) || 0,
|
||||
left: Number.parseFloat(style.left) || 0
|
||||
};
|
||||
div.remove();
|
||||
return insets;
|
||||
@@ -877,12 +940,12 @@ function aspectRatio$2(option) {
|
||||
i18n,
|
||||
constructor: { ASPECT_RATIO }
|
||||
} = art;
|
||||
const html = ASPECT_RATIO.map(
|
||||
const html2 = ASPECT_RATIO.map(
|
||||
(item) => `<span data-value="${item}">${item === "default" ? i18n.get("Default") : item}</span>`
|
||||
).join("");
|
||||
return {
|
||||
...option,
|
||||
html: `${i18n.get("Aspect Ratio")}: ${html}`,
|
||||
html: `${i18n.get("Aspect Ratio")}: ${html2}`,
|
||||
click: (contextmenu, event) => {
|
||||
const { value } = event.target.dataset;
|
||||
if (value) {
|
||||
@@ -920,10 +983,10 @@ function flip$2(option) {
|
||||
i18n,
|
||||
constructor: { FLIP }
|
||||
} = art;
|
||||
const html = FLIP.map((item) => `<span data-value="${item}">${i18n.get(capitalize(item))}</span>`).join("");
|
||||
const html2 = FLIP.map((item) => `<span data-value="${item}">${i18n.get(capitalize(item))}</span>`).join("");
|
||||
return {
|
||||
...option,
|
||||
html: `${i18n.get("Video Flip")}: ${html}`,
|
||||
html: `${i18n.get("Video Flip")}: ${html2}`,
|
||||
click: (contextmenu, event) => {
|
||||
const { value } = event.target.dataset;
|
||||
if (value) {
|
||||
@@ -962,12 +1025,12 @@ function playbackRate$2(option) {
|
||||
i18n,
|
||||
constructor: { PLAYBACK_RATE }
|
||||
} = art;
|
||||
const html = PLAYBACK_RATE.map(
|
||||
const html2 = PLAYBACK_RATE.map(
|
||||
(item) => `<span data-value="${item}">${item === 1 ? i18n.get("Normal") : item.toFixed(1)}</span>`
|
||||
).join("");
|
||||
return {
|
||||
...option,
|
||||
html: `${i18n.get("Play Speed")}: ${html}`,
|
||||
html: `${i18n.get("Play Speed")}: ${html2}`,
|
||||
click: (contextmenu, event) => {
|
||||
const { value } = event.target.dataset;
|
||||
if (value) {
|
||||
@@ -1476,8 +1539,8 @@ function progress(options) {
|
||||
for (let index = 0; index < option.highlight.length; index++) {
|
||||
const item = option.highlight[index];
|
||||
const left = clamp(item.time, 0, art.duration) / art.duration * 100;
|
||||
const html = `<span data-text="${item.text}" data-time="${item.time}" style="left: ${left}%"></span>`;
|
||||
append($highlight, html);
|
||||
const html2 = `<span data-text="${item.text}" data-time="${item.time}" style="left: ${left}%"></span>`;
|
||||
append($highlight, html2);
|
||||
}
|
||||
}
|
||||
function setBar(type, percentage, event) {
|
||||
@@ -2298,6 +2361,12 @@ class Hotkey {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
function publishLanguage(name, value) {
|
||||
if (typeof window !== "undefined") {
|
||||
const globals = window;
|
||||
globals[name] = value;
|
||||
}
|
||||
}
|
||||
const zhCn = {
|
||||
"Video Info": "统计信息",
|
||||
"Close": "关闭",
|
||||
@@ -2336,24 +2405,20 @@ const zhCn = {
|
||||
"AirPlay": "隔空播放",
|
||||
"AirPlay Not Available": "隔空播放不可用"
|
||||
};
|
||||
if (typeof window !== "undefined") {
|
||||
window["artplayer-i18n-zh-cn"] = zhCn;
|
||||
}
|
||||
publishLanguage("artplayer-i18n-zh-cn", zhCn);
|
||||
class I18n {
|
||||
constructor(art) {
|
||||
this.art = art;
|
||||
this.languages = {
|
||||
"zh-cn": zhCn
|
||||
};
|
||||
this.languages = { "zh-cn": zhCn };
|
||||
this.language = {};
|
||||
this.update(art.option.i18n);
|
||||
}
|
||||
init() {
|
||||
const lang = this.art.option.lang.toLowerCase();
|
||||
this.language = this.languages[lang] || {};
|
||||
this.language = has(this.languages, lang) && this.languages[lang] || {};
|
||||
}
|
||||
get(key) {
|
||||
return this.language[key] || key;
|
||||
return has(this.language, key) && this.language[key] || key;
|
||||
}
|
||||
update(value) {
|
||||
this.languages = mergeDeep(this.languages, value);
|
||||
@@ -2387,38 +2452,38 @@ const switchOn = '<?xml version="1.0" standalone="no"?>\r\n<!DOCTYPE svg PUBLIC
|
||||
const unlock = '<?xml version="1.0" standalone="no"?>\r\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\r\n<svg t="1650612464266" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="20"><path d="M666.752 194.517333L617.386667 268.629333A128 128 0 0 0 384 341.333333l0.042667 85.333334h384a85.333333 85.333333 0 0 1 85.333333 85.333333v256a85.333333 85.333333 0 0 1-85.333333 85.333333H256a85.333333 85.333333 0 0 1-85.333333-85.333333v-256a85.333333 85.333333 0 0 1 85.333333-85.333333h42.666667V341.333333a213.333333 213.333333 0 0 1 368.085333-146.816z"></path></svg>\r\n';
|
||||
const volumeClose = '<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewBox="0 0 22 22">\r\n <path d="M15 11a3.998 3.998 0 0 0-2-3.465v2.636l1.865 1.865A4.02 4.02 0 0 0 15 11z"></path>\r\n <path d="M13.583 5.583A5.998 5.998 0 0 1 17 11a6 6 0 0 1-.585 2.587l1.477 1.477a8.001 8.001 0 0 0-3.446-11.286 1 1 0 0 0-.863 1.805zM18.778 18.778l-2.121-2.121-1.414-1.414-1.415-1.415L13 13l-2-2-3.889-3.889-3.889-3.889a.999.999 0 1 0-1.414 1.414L5.172 8H5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h1l4.188 3.35a.5.5 0 0 0 .812-.39v-3.131l2.587 2.587-.01.005a1 1 0 0 0 .86 1.806c.215-.102.424-.214.627-.333l2.3 2.3a1.001 1.001 0 0 0 1.414-1.416zM11 5.04a.5.5 0 0 0-.813-.39L8.682 5.854 11 8.172V5.04z"></path>\r\n</svg>';
|
||||
const volume = '<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewBox="0 0 22 22">\r\n <path d="M10.188 4.65L6 8H5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h1l4.188 3.35a.5.5 0 0 0 .812-.39V5.04a.498.498 0 0 0-.812-.39zM14.446 3.778a1 1 0 0 0-.862 1.804 6.002 6.002 0 0 1-.007 10.838 1 1 0 0 0 .86 1.806A8.001 8.001 0 0 0 19 11a8.001 8.001 0 0 0-4.554-7.222z"></path>\r\n <path d="M15 11a3.998 3.998 0 0 0-2-3.465v6.93A3.998 3.998 0 0 0 15 11z"></path>\r\n</svg>';
|
||||
const defaults = {
|
||||
loading,
|
||||
state,
|
||||
play,
|
||||
pause,
|
||||
check,
|
||||
volume,
|
||||
volumeClose,
|
||||
screenshot,
|
||||
setting,
|
||||
pip,
|
||||
arrowLeft,
|
||||
arrowRight,
|
||||
playbackRate: playbackRate$1,
|
||||
aspectRatio: aspectRatio$1,
|
||||
config,
|
||||
lock: lock$1,
|
||||
flip: flip$1,
|
||||
unlock,
|
||||
fullscreenOff,
|
||||
fullscreenOn,
|
||||
fullscreenWebOff,
|
||||
fullscreenWebOn,
|
||||
switchOn,
|
||||
switchOff,
|
||||
error,
|
||||
close,
|
||||
airplay
|
||||
};
|
||||
class Icons {
|
||||
constructor(art) {
|
||||
const icons = {
|
||||
loading,
|
||||
state,
|
||||
play,
|
||||
pause,
|
||||
check,
|
||||
volume,
|
||||
volumeClose,
|
||||
screenshot,
|
||||
setting,
|
||||
pip,
|
||||
arrowLeft,
|
||||
arrowRight,
|
||||
playbackRate: playbackRate$1,
|
||||
aspectRatio: aspectRatio$1,
|
||||
config,
|
||||
lock: lock$1,
|
||||
flip: flip$1,
|
||||
unlock,
|
||||
fullscreenOff,
|
||||
fullscreenOn,
|
||||
fullscreenWebOff,
|
||||
fullscreenWebOn,
|
||||
switchOn,
|
||||
switchOff,
|
||||
error,
|
||||
close,
|
||||
airplay,
|
||||
...art.option.icons
|
||||
};
|
||||
const icons = { ...defaults, ...art.option.icons };
|
||||
for (const key in icons) {
|
||||
def(this, key, {
|
||||
get: () => getIcon(key, icons[key])
|
||||
@@ -2609,8 +2674,8 @@ function createDefaults() {
|
||||
lang: navigator?.language.toLowerCase()
|
||||
};
|
||||
}
|
||||
function resolveOption(input, defaults) {
|
||||
const merged = mergeDeep(defaults, input);
|
||||
function resolveOption(input, defaults2) {
|
||||
const merged = mergeDeep(defaults2, input);
|
||||
merged.container = input.container;
|
||||
return validator(merged, scheme);
|
||||
}
|
||||
@@ -5063,7 +5128,7 @@ class Storage {
|
||||
}
|
||||
}
|
||||
}
|
||||
const style = ".art-video-player {\n --art-theme: #f00;\n --art-font-color: #fff;\n --art-background-color: #000;\n --art-text-shadow-color: rgba(0, 0, 0, 0.5);\n --art-transition-duration: 0.2s;\n --art-padding: 10px;\n --art-border-radius: 3px;\n --art-progress-height: 6px;\n --art-progress-color: rgba(255, 255, 255, 0.25);\n --art-progress-top-gap: 10px;\n --art-hover-color: rgba(255, 255, 255, 0.25);\n --art-loaded-color: rgba(255, 255, 255, 0.25);\n --art-state-size: 80px;\n --art-state-opacity: 0.8;\n --art-bottom-height: 100px;\n --art-bottom-offset: 20px;\n --art-bottom-gap: 5px;\n --art-highlight-width: 8px;\n --art-highlight-color: rgba(255, 255, 255, 0.5);\n --art-control-height: 46px;\n --art-control-opacity: 0.75;\n --art-control-icon-size: 36px;\n --art-control-icon-scale: 1.1;\n --art-volume-height: 120px;\n --art-volume-handle-size: 14px;\n --art-lock-size: 36px;\n --art-indicator-scale: 0;\n --art-indicator-size: 16px;\n --art-fullscreen-web-index: 9999;\n --art-settings-icon-size: 24px;\n --art-settings-max-height: 300px;\n --art-selector-max-height: 300px;\n --art-contextmenus-min-width: 250px;\n --art-subtitle-font-size: 20px;\n --art-subtitle-gap: 5px;\n --art-subtitle-bottom: 15px;\n --art-subtitle-border: #000;\n --art-widget-background: rgba(0, 0, 0, 0.85);\n --art-tip-background: rgba(0, 0, 0, 0.7);\n --art-scrollbar-size: 4px;\n --art-scrollbar-background: rgba(255, 255, 255, 0.25);\n --art-scrollbar-background-hover: rgba(255, 255, 255, 0.5);\n --art-mini-progress-height: 2px;\n}\n.art-bg-cover {\n background-position: center center;\n background-repeat: no-repeat;\n background-size: cover;\n}\n.art-bottom-gradient {\n background-image: linear-gradient(to top, #000, rgba(0, 0, 0, 0.4), transparent);\n background-repeat: repeat-x;\n background-position: center bottom;\n}\n.art-backdrop-filter {\n -webkit-backdrop-filter: saturate(180%) blur(20px);\n backdrop-filter: saturate(180%) blur(20px);\n background-color: rgba(0, 0, 0, 0.75) !important;\n}\n.art-truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.art-video-player {\n position: relative;\n margin: 0 auto;\n width: 100%;\n height: 100%;\n outline: 0;\n zoom: 1;\n padding: 0;\n text-align: left;\n direction: ltr;\n font-size: 14px;\n line-height: 1.3;\n user-select: none;\n box-sizing: border-box;\n color: var(--art-font-color);\n background-color: var(--art-background-color);\n text-shadow: 0 0 2px var(--art-text-shadow-color);\n font-family: PingFang SC, Helvetica Neue, Microsoft YaHei, Roboto, Arial, sans-serif;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n -ms-touch-action: manipulation;\n touch-action: manipulation;\n -ms-high-contrast-adjust: none;\n}\n.art-video-player *,\n.art-video-player *::before,\n.art-video-player *::after {\n box-sizing: border-box;\n}\n.art-video-player ::-webkit-scrollbar {\n width: var(--art-scrollbar-size);\n height: var(--art-scrollbar-size);\n}\n.art-video-player ::-webkit-scrollbar-thumb {\n background-color: var(--art-scrollbar-background);\n}\n.art-video-player ::-webkit-scrollbar-thumb:hover {\n background-color: var(--art-scrollbar-background-hover);\n}\n.art-video-player img {\n max-width: 100%;\n vertical-align: top;\n}\n.art-video-player svg {\n fill: var(--art-font-color);\n}\n.art-video-player a {\n color: var(--art-font-color);\n text-decoration: none;\n}\n.art-icon {\n line-height: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.art-video-player.art-backdrop .art-contextmenus,\n.art-video-player.art-backdrop .art-info,\n.art-video-player.art-backdrop .art-settings,\n.art-video-player.art-backdrop .art-layer-auto-playback,\n.art-video-player.art-backdrop .art-selector-list,\n.art-video-player.art-backdrop .art-volume-inner {\n -webkit-backdrop-filter: saturate(180%) blur(20px);\n backdrop-filter: saturate(180%) blur(20px);\n background-color: rgba(0, 0, 0, 0.75) !important;\n}\n.art-video {\n position: absolute;\n inset: 0;\n z-index: 10;\n width: 100%;\n height: 100%;\n}\n.art-poster {\n position: absolute;\n inset: 0;\n z-index: 11;\n width: 100%;\n height: 100%;\n background-position: center center;\n background-repeat: no-repeat;\n background-size: cover;\n pointer-events: none;\n}\n.art-video-player .art-subtitle {\n display: none;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n position: absolute;\n z-index: 20;\n width: 100%;\n padding: 0 5%;\n text-align: center;\n pointer-events: none;\n gap: var(--art-subtitle-gap);\n bottom: var(--art-subtitle-bottom);\n font-size: var(--art-subtitle-font-size);\n transition: bottom var(--art-transition-duration) ease;\n text-shadow: var(--art-subtitle-border) 1px 0 1px, var(--art-subtitle-border) 0 1px 1px, var(--art-subtitle-border) -1px 0 1px, var(--art-subtitle-border) 0 -1px 1px, var(--art-subtitle-border) 1px 1px 1pLine truncated
|
||||
const css = ".art-video-player {\n --art-theme: #f00;\n --art-font-color: #fff;\n --art-background-color: #000;\n --art-text-shadow-color: rgba(0, 0, 0, 0.5);\n --art-transition-duration: 0.2s;\n --art-padding: 10px;\n --art-border-radius: 3px;\n --art-progress-height: 6px;\n --art-progress-color: rgba(255, 255, 255, 0.25);\n --art-progress-top-gap: 10px;\n --art-hover-color: rgba(255, 255, 255, 0.25);\n --art-loaded-color: rgba(255, 255, 255, 0.25);\n --art-state-size: 80px;\n --art-state-opacity: 0.8;\n --art-bottom-height: 100px;\n --art-bottom-offset: 20px;\n --art-bottom-gap: 5px;\n --art-highlight-width: 8px;\n --art-highlight-color: rgba(255, 255, 255, 0.5);\n --art-control-height: 46px;\n --art-control-opacity: 0.75;\n --art-control-icon-size: 36px;\n --art-control-icon-scale: 1.1;\n --art-volume-height: 120px;\n --art-volume-handle-size: 14px;\n --art-lock-size: 36px;\n --art-indicator-scale: 0;\n --art-indicator-size: 16px;\n --art-fullscreen-web-index: 9999;\n --art-settings-icon-size: 24px;\n --art-settings-max-height: 300px;\n --art-selector-max-height: 300px;\n --art-contextmenus-min-width: 250px;\n --art-subtitle-font-size: 20px;\n --art-subtitle-gap: 5px;\n --art-subtitle-bottom: 15px;\n --art-subtitle-border: #000;\n --art-widget-background: rgba(0, 0, 0, 0.85);\n --art-tip-background: rgba(0, 0, 0, 0.7);\n --art-scrollbar-size: 4px;\n --art-scrollbar-background: rgba(255, 255, 255, 0.25);\n --art-scrollbar-background-hover: rgba(255, 255, 255, 0.5);\n --art-mini-progress-height: 2px;\n}\n.art-bg-cover {\n background-position: center center;\n background-repeat: no-repeat;\n background-size: cover;\n}\n.art-bottom-gradient {\n background-image: linear-gradient(to top, #000, rgba(0, 0, 0, 0.4), transparent);\n background-repeat: repeat-x;\n background-position: center bottom;\n}\n.art-backdrop-filter {\n -webkit-backdrop-filter: saturate(180%) blur(20px);\n backdrop-filter: saturate(180%) blur(20px);\n background-color: rgba(0, 0, 0, 0.75) !important;\n}\n.art-truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.art-video-player {\n position: relative;\n margin: 0 auto;\n width: 100%;\n height: 100%;\n outline: 0;\n zoom: 1;\n padding: 0;\n text-align: left;\n direction: ltr;\n font-size: 14px;\n line-height: 1.3;\n user-select: none;\n box-sizing: border-box;\n color: var(--art-font-color);\n background-color: var(--art-background-color);\n text-shadow: 0 0 2px var(--art-text-shadow-color);\n font-family: PingFang SC, Helvetica Neue, Microsoft YaHei, Roboto, Arial, sans-serif;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n -ms-touch-action: manipulation;\n touch-action: manipulation;\n -ms-high-contrast-adjust: none;\n}\n.art-video-player *,\n.art-video-player *::before,\n.art-video-player *::after {\n box-sizing: border-box;\n}\n.art-video-player ::-webkit-scrollbar {\n width: var(--art-scrollbar-size);\n height: var(--art-scrollbar-size);\n}\n.art-video-player ::-webkit-scrollbar-thumb {\n background-color: var(--art-scrollbar-background);\n}\n.art-video-player ::-webkit-scrollbar-thumb:hover {\n background-color: var(--art-scrollbar-background-hover);\n}\n.art-video-player img {\n max-width: 100%;\n vertical-align: top;\n}\n.art-video-player svg {\n fill: var(--art-font-color);\n}\n.art-video-player a {\n color: var(--art-font-color);\n text-decoration: none;\n}\n.art-icon {\n line-height: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.art-video-player.art-backdrop .art-contextmenus,\n.art-video-player.art-backdrop .art-info,\n.art-video-player.art-backdrop .art-settings,\n.art-video-player.art-backdrop .art-layer-auto-playback,\n.art-video-player.art-backdrop .art-selector-list,\n.art-video-player.art-backdrop .art-volume-inner {\n -webkit-backdrop-filter: saturate(180%) blur(20px);\n backdrop-filter: saturate(180%) blur(20px);\n background-color: rgba(0, 0, 0, 0.75) !important;\n}\n.art-video {\n position: absolute;\n inset: 0;\n z-index: 10;\n width: 100%;\n height: 100%;\n}\n.art-poster {\n position: absolute;\n inset: 0;\n z-index: 11;\n width: 100%;\n height: 100%;\n background-position: center center;\n background-repeat: no-repeat;\n background-size: cover;\n pointer-events: none;\n}\n.art-video-player .art-subtitle {\n display: none;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n position: absolute;\n z-index: 20;\n width: 100%;\n padding: 0 5%;\n text-align: center;\n pointer-events: none;\n gap: var(--art-subtitle-gap);\n bottom: var(--art-subtitle-bottom);\n font-size: var(--art-subtitle-font-size);\n transition: bottom var(--art-transition-duration) ease;\n text-shadow: var(--art-subtitle-border) 1px 0 1px, var(--art-subtitle-border) 0 1px 1px, var(--art-subtitle-border) -1px 0 1px, var(--art-subtitle-border) 0 -1px 1px, var(--art-subtitle-border) 1px 1px 1px,Line truncated
|
||||
class Subtitle extends Component {
|
||||
constructor(art) {
|
||||
super(art);
|
||||
@@ -5234,30 +5299,7 @@ function captureTemplate(container) {
|
||||
}
|
||||
};
|
||||
}
|
||||
class Template {
|
||||
constructor(art) {
|
||||
this.art = art;
|
||||
const { option, constructor } = art;
|
||||
if (option.container instanceof Element) {
|
||||
this.$container = option.container;
|
||||
} else {
|
||||
this.$container = query(option.container);
|
||||
errorHandle(this.$container, `No container element found by ${option.container}`);
|
||||
}
|
||||
errorHandle(supportsFlex(), "The current browser does not support flex layout");
|
||||
const type = this.$container.tagName.toLowerCase();
|
||||
errorHandle(type === "div", `Unsupported container element type, only support 'div' but got '${type}'`);
|
||||
errorHandle(
|
||||
constructor.instances.every((ins) => ins.template.$container !== this.$container),
|
||||
"Cannot mount multiple instances on the same dom element"
|
||||
);
|
||||
this.query = this.query.bind(this);
|
||||
ownContainer(art, this.$container, captureTemplate(this.$container));
|
||||
this.$container.dataset.artId = art.id;
|
||||
this.init();
|
||||
}
|
||||
static get html() {
|
||||
return `
|
||||
const html = `
|
||||
<div class="art-video-player art-subtitle-show art-layer-show art-control-show art-mask-show">
|
||||
<video class="art-video">
|
||||
<track default kind="metadata" src=""></track>
|
||||
@@ -5316,6 +5358,55 @@ class Template {
|
||||
<div class="art-contextmenus"></div>
|
||||
</div>
|
||||
`;
|
||||
function bindNodes(target) {
|
||||
target.$player = target.query(".art-video-player");
|
||||
target.$video = target.query(".art-video");
|
||||
target.$track = target.query("track");
|
||||
target.$poster = target.query(".art-poster");
|
||||
target.$subtitle = target.query(".art-subtitle");
|
||||
target.$danmuku = target.query(".art-danmuku");
|
||||
target.$bottom = target.query(".art-bottom");
|
||||
target.$progress = target.query(".art-progress");
|
||||
target.$controls = target.query(".art-controls");
|
||||
target.$controlsLeft = target.query(".art-controls-left");
|
||||
target.$controlsCenter = target.query(".art-controls-center");
|
||||
target.$controlsRight = target.query(".art-controls-right");
|
||||
target.$layer = target.query(".art-layers");
|
||||
target.$loading = target.query(".art-loading");
|
||||
target.$notice = target.query(".art-notice");
|
||||
target.$noticeInner = target.query(".art-notice-inner");
|
||||
target.$mask = target.query(".art-mask");
|
||||
target.$state = target.query(".art-state");
|
||||
target.$setting = target.query(".art-settings");
|
||||
target.$info = target.query(".art-info");
|
||||
target.$infoPanel = target.query(".art-info-panel");
|
||||
target.$infoClose = target.query(".art-info-close");
|
||||
target.$contextmenu = target.query(".art-contextmenus");
|
||||
}
|
||||
class Template {
|
||||
constructor(art) {
|
||||
this.art = art;
|
||||
const { option, constructor } = art;
|
||||
if (option.container instanceof Element) {
|
||||
this.$container = option.container;
|
||||
} else {
|
||||
this.$container = query(option.container);
|
||||
errorHandle(this.$container, `No container element found by ${option.container}`);
|
||||
}
|
||||
errorHandle(supportsFlex(), "The current browser does not support flex layout");
|
||||
const type = this.$container.tagName.toLowerCase();
|
||||
errorHandle(type === "div", `Unsupported container element type, only support 'div' but got '${type}'`);
|
||||
errorHandle(
|
||||
constructor.instances.every((ins) => ins.template.$container !== this.$container),
|
||||
"Cannot mount multiple instances on the same dom element"
|
||||
);
|
||||
this.query = this.query.bind(this);
|
||||
ownContainer(art, this.$container, captureTemplate(this.$container));
|
||||
this.$container.dataset.artId = String(art.id);
|
||||
this.init();
|
||||
}
|
||||
static get html() {
|
||||
return html;
|
||||
}
|
||||
query(className) {
|
||||
return query(className, this.$container);
|
||||
@@ -5325,35 +5416,10 @@ class Template {
|
||||
if (!option.useSSR) {
|
||||
this.$container.innerHTML = Template.html;
|
||||
}
|
||||
this.$player = this.query(".art-video-player");
|
||||
this.$video = this.query(".art-video");
|
||||
this.$track = this.query("track");
|
||||
this.$poster = this.query(".art-poster");
|
||||
this.$subtitle = this.query(".art-subtitle");
|
||||
this.$danmuku = this.query(".art-danmuku");
|
||||
this.$bottom = this.query(".art-bottom");
|
||||
this.$progress = this.query(".art-progress");
|
||||
this.$controls = this.query(".art-controls");
|
||||
this.$controlsLeft = this.query(".art-controls-left");
|
||||
this.$controlsCenter = this.query(".art-controls-center");
|
||||
this.$controlsRight = this.query(".art-controls-right");
|
||||
this.$layer = this.query(".art-layers");
|
||||
this.$loading = this.query(".art-loading");
|
||||
this.$notice = this.query(".art-notice");
|
||||
this.$noticeInner = this.query(".art-notice-inner");
|
||||
this.$mask = this.query(".art-mask");
|
||||
this.$state = this.query(".art-state");
|
||||
this.$setting = this.query(".art-settings");
|
||||
this.$info = this.query(".art-info");
|
||||
this.$infoPanel = this.query(".art-info-panel");
|
||||
this.$infoClose = this.query(".art-info-close");
|
||||
this.$contextmenu = this.query(".art-contextmenus");
|
||||
bindNodes(this);
|
||||
if (option.proxy) {
|
||||
const video = option.proxy.call(this.art, this.art);
|
||||
errorHandle(
|
||||
video instanceof HTMLVideoElement || video instanceof HTMLCanvasElement,
|
||||
`Function 'option.proxy' needs to return 'HTMLVideoElement' or 'HTMLCanvasElement'`
|
||||
);
|
||||
assertProxy(video);
|
||||
replaceElement(video, this.$video);
|
||||
video.className = "art-video";
|
||||
this.$video = video;
|
||||
@@ -5373,6 +5439,12 @@ class Template {
|
||||
}
|
||||
}
|
||||
}
|
||||
function assertProxy(video) {
|
||||
errorHandle(
|
||||
video instanceof HTMLVideoElement || video instanceof HTMLCanvasElement,
|
||||
"Function 'option.proxy' needs to return 'HTMLVideoElement' or 'HTMLCanvasElement'"
|
||||
);
|
||||
}
|
||||
const owns = (object, key) => Object.prototype.hasOwnProperty.call(object, key);
|
||||
class Emitter {
|
||||
on(name, fn, ctx) {
|
||||
@@ -5531,7 +5603,7 @@ class Artplayer extends Emitter {
|
||||
destroyInstance(this, instances, removeHtml, Artplayer.REMOVE_SRC_WHEN_DESTROY);
|
||||
}
|
||||
}
|
||||
Artplayer.STYLE = style;
|
||||
Artplayer.STYLE = css;
|
||||
Artplayer.DEBUG = false;
|
||||
Artplayer.CONTEXTMENU = true;
|
||||
Artplayer.NOTICE_TIME = 2e3;
|
||||
@@ -5567,7 +5639,7 @@ Artplayer.USE_RAF = false;
|
||||
Artplayer.REMOVE_SRC_WHEN_DESTROY = true;
|
||||
if (isBrowser) {
|
||||
window.Artplayer = Artplayer;
|
||||
setStyleText("artplayer-style", style);
|
||||
setStyleText("artplayer-style", css);
|
||||
setTimeout(() => {
|
||||
if (Artplayer.LOG_VERSION) {
|
||||
console.log(
|
||||
|
||||
@@ -1 +1 @@
|
||||
(function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.artplayerI18nAr=t())})(this,(function(){"use strict";const e={"Video Info":"معلومات الفيديو",Close:"إغلاق","Video Load Failed":"فشل تحميل الفيديو",Volume:"الصوت",Play:"تشغيل",Pause:"إيقاف مؤقت",Rate:"السرعة",Mute:"كتم الصوت","Video Flip":"تدوير الفيديو",Horizontal:"أفقي",Vertical:"عمودي",Reconnect:"إعادة الاتصال","Show Setting":"إظهار الإعدادات","Hide Setting":"إخفاء الإعدادات",Screenshot:"لقطة شاشة","Play Speed":"سرعة التشغيل","Aspect Ratio":"نسبة العرض إلى الارتفاع",Default:"افتراضي",Normal:"عادي",Open:"فتح","Switch Video":"تبديل الفيديو","Switch Subtitle":"تبديل الترجمة",Fullscreen:"وضع ملء الشاشة","Exit Fullscreen":"الخروج من وضع ملء الشاشة","Web Fullscreen":"وضع ملء الشاشة في المتصفح","Exit Web Fullscreen":"الخروج من وضع ملء الشاشة في المتصفح","Mini Player":"مشغل صغير","PIP Mode":"الوضع العائم","Exit PIP Mode":"الخروج من الوضع العائم","PIP Not Supported":"الوضع العائم غير مدعوم","Fullscreen Not Supported":"وضع ملء الشاشة غير مدعوم","Subtitle Offset":"إزاحة الترجمة","Last Seen":"آخر مشاهدة","Jump Play":"التشغيل القافز",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay غير متاح"};return typeof window<"u"&&(window["artplayer-i18n-ar"]=e),e}));
|
||||
(function(t,e){typeof exports=="object"&&typeof module<"u"?module.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.artplayerI18nAr=e())})(this,(function(){"use strict";function t(i,n){if(typeof window<"u"){const o=window;o[i]=n}}const e={"Video Info":"معلومات الفيديو",Close:"إغلاق","Video Load Failed":"فشل تحميل الفيديو",Volume:"الصوت",Play:"تشغيل",Pause:"إيقاف مؤقت",Rate:"السرعة",Mute:"كتم الصوت","Video Flip":"تدوير الفيديو",Horizontal:"أفقي",Vertical:"عمودي",Reconnect:"إعادة الاتصال","Show Setting":"إظهار الإعدادات","Hide Setting":"إخفاء الإعدادات",Screenshot:"لقطة شاشة","Play Speed":"سرعة التشغيل","Aspect Ratio":"نسبة العرض إلى الارتفاع",Default:"افتراضي",Normal:"عادي",Open:"فتح","Switch Video":"تبديل الفيديو","Switch Subtitle":"تبديل الترجمة",Fullscreen:"وضع ملء الشاشة","Exit Fullscreen":"الخروج من وضع ملء الشاشة","Web Fullscreen":"وضع ملء الشاشة في المتصفح","Exit Web Fullscreen":"الخروج من وضع ملء الشاشة في المتصفح","Mini Player":"مشغل صغير","PIP Mode":"الوضع العائم","Exit PIP Mode":"الخروج من الوضع العائم","PIP Not Supported":"الوضع العائم غير مدعوم","Fullscreen Not Supported":"وضع ملء الشاشة غير مدعوم","Subtitle Offset":"إزاحة الترجمة","Last Seen":"آخر مشاهدة","Jump Play":"التشغيل القافز",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay غير متاح"};return t("artplayer-i18n-ar",e),e}));
|
||||
@@ -1,4 +1,10 @@
|
||||
const e = {
|
||||
function i(e, t) {
|
||||
if (typeof window < "u") {
|
||||
const l = window;
|
||||
l[e] = t;
|
||||
}
|
||||
}
|
||||
const o = {
|
||||
"Video Info": "معلومات الفيديو",
|
||||
Close: "إغلاق",
|
||||
"Video Load Failed": "فشل تحميل الفيديو",
|
||||
@@ -36,7 +42,7 @@ const e = {
|
||||
AirPlay: "AirPlay",
|
||||
"AirPlay Not Available": "AirPlay غير متاح"
|
||||
};
|
||||
typeof window < "u" && (window["artplayer-i18n-ar"] = e);
|
||||
i("artplayer-i18n-ar", o);
|
||||
export {
|
||||
e as default
|
||||
o as default
|
||||
};
|
||||
@@ -1 +1 @@
|
||||
(function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.artplayerI18nCs=t())})(this,(function(){"use strict";const e={"Video Info":"Info o videu",Close:"Zavřít","Video Load Failed":"Nahrání videa selhalo",Volume:"Hlasitost",Play:"Přehrát",Pause:"Pozastavit",Rate:"Hodnocení",Mute:"Ztlumit","Video Flip":"Otočit video",Horizontal:"Horizontálně",Vertical:"Vertikálně",Reconnect:"Opětovné připojení","Show Setting":"Zobrazit nastavení","Hide Setting":"Skrýt nastavení",Screenshot:"Snímek obrazovky","Play Speed":"Rychlost přehrávání","Aspect Ratio":"Poměr stran",Default:"Výchozí",Normal:"Normální",Open:"Otevřít","Switch Video":"Přepnout video","Switch Subtitle":"Přepnout titulky",Fullscreen:"Celá obrazovka","Exit Fullscreen":"Opustit režim celé obrazovky","Web Fullscreen":"Celá stránka","Exit Web Fullscreen":"Zavřít režim celé stránky","Mini Player":"Mini přehrávač","PIP Mode":"Režim PIP","Exit PIP Mode":"Opustit režim PIP","PIP Not Supported":"Režim PIP není podporován","Fullscreen Not Supported":"Režim celé obrazovky není podporován","Subtitle Offset":"Posun titulků","Last Seen":"Naposledy viděn","Jump Play":"Hra na skok",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay není k dispozici"};return typeof window<"u"&&(window["artplayer-i18n-cs"]=e),e}));
|
||||
(function(t,e){typeof exports=="object"&&typeof module<"u"?module.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.artplayerI18nCs=e())})(this,(function(){"use strict";function t(o,i){if(typeof window<"u"){const n=window;n[o]=i}}const e={"Video Info":"Info o videu",Close:"Zavřít","Video Load Failed":"Nahrání videa selhalo",Volume:"Hlasitost",Play:"Přehrát",Pause:"Pozastavit",Rate:"Hodnocení",Mute:"Ztlumit","Video Flip":"Otočit video",Horizontal:"Horizontálně",Vertical:"Vertikálně",Reconnect:"Opětovné připojení","Show Setting":"Zobrazit nastavení","Hide Setting":"Skrýt nastavení",Screenshot:"Snímek obrazovky","Play Speed":"Rychlost přehrávání","Aspect Ratio":"Poměr stran",Default:"Výchozí",Normal:"Normální",Open:"Otevřít","Switch Video":"Přepnout video","Switch Subtitle":"Přepnout titulky",Fullscreen:"Celá obrazovka","Exit Fullscreen":"Opustit režim celé obrazovky","Web Fullscreen":"Celá stránka","Exit Web Fullscreen":"Zavřít režim celé stránky","Mini Player":"Mini přehrávač","PIP Mode":"Režim PIP","Exit PIP Mode":"Opustit režim PIP","PIP Not Supported":"Režim PIP není podporován","Fullscreen Not Supported":"Režim celé obrazovky není podporován","Subtitle Offset":"Posun titulků","Last Seen":"Naposledy viděn","Jump Play":"Hra na skok",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay není k dispozici"};return t("artplayer-i18n-cs",e),e}));
|
||||
@@ -1,4 +1,10 @@
|
||||
const e = {
|
||||
function i(e, t) {
|
||||
if (typeof window < "u") {
|
||||
const o = window;
|
||||
o[e] = t;
|
||||
}
|
||||
}
|
||||
const n = {
|
||||
"Video Info": "Info o videu",
|
||||
Close: "Zavřít",
|
||||
"Video Load Failed": "Nahrání videa selhalo",
|
||||
@@ -36,7 +42,7 @@ const e = {
|
||||
AirPlay: "AirPlay",
|
||||
"AirPlay Not Available": "AirPlay není k dispozici"
|
||||
};
|
||||
typeof window < "u" && (window["artplayer-i18n-cs"] = e);
|
||||
i("artplayer-i18n-cs", n);
|
||||
export {
|
||||
e as default
|
||||
n as default
|
||||
};
|
||||
@@ -1 +1 @@
|
||||
(function(e,a){typeof exports=="object"&&typeof module<"u"?module.exports=a():typeof define=="function"&&define.amd?define(a):(e=typeof globalThis<"u"?globalThis:e||self,e.artplayerI18nEs=a())})(this,(function(){"use strict";const e={"Video Info":"Información del video",Close:"Cerrar","Video Load Failed":"Falló carga de video",Volume:"Volumen",Play:"Reproduciendo",Pause:"Pausa",Rate:"Velocidad",Mute:"Silencio","Video Flip":"Rotar video",Horizontal:"Horizontal",Vertical:"Vertical",Reconnect:"Reconectando","Show Setting":"Mostrar ajustes","Hide Setting":"Ocultar ajustes",Screenshot:"Captura de Pantalla","Play Speed":"Velocidad de reproducción","Aspect Ratio":"Relación de aspecto",Default:"Por defecto",Normal:"Normal",Open:"Abrir","Switch Video":"Cambiar video","Switch Subtitle":"Cambiar subtítulo",Fullscreen:"Pantalla completa","Exit Fullscreen":"Salir de Pantalla completa","Web Fullscreen":"Pantalla completa Web","Exit Web Fullscreen":"Salir de Pantalla completa","Mini Player":"Mini reproductor","PIP Mode":"Modo PiP","Exit PIP Mode":"Cerrar modo PiP","PIP Not Supported":"Modo PiP no compatible","Fullscreen Not Supported":"Pantalla completa no soportada","Subtitle Offset":"Ajuste subtítulo","Last Seen":"Visto última vez","Jump Play":"Saltar",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay no disponible"};return typeof window<"u"&&(window["artplayer-i18n-es"]=e),e}));
|
||||
(function(a,e){typeof exports=="object"&&typeof module<"u"?module.exports=e():typeof define=="function"&&define.amd?define(e):(a=typeof globalThis<"u"?globalThis:a||self,a.artplayerI18nEs=e())})(this,(function(){"use strict";function a(o,t){if(typeof window<"u"){const l=window;l[o]=t}}const e={"Video Info":"Información del video",Close:"Cerrar","Video Load Failed":"Falló carga de video",Volume:"Volumen",Play:"Reproduciendo",Pause:"Pausa",Rate:"Velocidad",Mute:"Silencio","Video Flip":"Rotar video",Horizontal:"Horizontal",Vertical:"Vertical",Reconnect:"Reconectando","Show Setting":"Mostrar ajustes","Hide Setting":"Ocultar ajustes",Screenshot:"Captura de Pantalla","Play Speed":"Velocidad de reproducción","Aspect Ratio":"Relación de aspecto",Default:"Por defecto",Normal:"Normal",Open:"Abrir","Switch Video":"Cambiar video","Switch Subtitle":"Cambiar subtítulo",Fullscreen:"Pantalla completa","Exit Fullscreen":"Salir de Pantalla completa","Web Fullscreen":"Pantalla completa Web","Exit Web Fullscreen":"Salir de Pantalla completa","Mini Player":"Mini reproductor","PIP Mode":"Modo PiP","Exit PIP Mode":"Cerrar modo PiP","PIP Not Supported":"Modo PiP no compatible","Fullscreen Not Supported":"Pantalla completa no soportada","Subtitle Offset":"Ajuste subtítulo","Last Seen":"Visto última vez","Jump Play":"Saltar",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay no disponible"};return a("artplayer-i18n-es",e),e}));
|
||||
@@ -1,4 +1,10 @@
|
||||
const e = {
|
||||
function l(e, a) {
|
||||
if (typeof window < "u") {
|
||||
const o = window;
|
||||
o[e] = a;
|
||||
}
|
||||
}
|
||||
const t = {
|
||||
"Video Info": "Información del video",
|
||||
Close: "Cerrar",
|
||||
"Video Load Failed": "Falló carga de video",
|
||||
@@ -36,7 +42,7 @@ const e = {
|
||||
AirPlay: "AirPlay",
|
||||
"AirPlay Not Available": "AirPlay no disponible"
|
||||
};
|
||||
typeof window < "u" && (window["artplayer-i18n-es"] = e);
|
||||
l("artplayer-i18n-es", t);
|
||||
export {
|
||||
e as default
|
||||
t as default
|
||||
};
|
||||
@@ -1 +1 @@
|
||||
(function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.artplayerI18nFa=t())})(this,(function(){"use strict";const e={"Video Info":"اطلاعات ویدیو",Close:"بستن","Video Load Failed":"بارگذاری ناموفق",Play:"پخش",Volume:"میزان صدا",Pause:"توقف",Rate:"نرخ",Mute:"سکوت","Video Flip":"چرخش تصویر",Horizontal:"افقی",Vertical:"عمودی",Reconnect:"اتصال مجدد","Show Setting":"تنظیمات","Hide Setting":"بستن تنظیمات",Screenshot:"عکس از صفحه","Play Speed":"سرعت پخش","Aspect Ratio":"نسبت تصویر",Default:"حالت پیشفرض",Normal:" حالت عادی",Open:"بازکردن","Switch Video":"تغییر ویدیو","Switch Subtitle":"نغییر زیرنویس",Fullscreen:"تمام صفحه","Exit Fullscreen":"کوچک کردن","Web Fullscreen":"حالت تئاتر","Exit Web Fullscreen":"خروج از حالت تئاتر","Mini Player":"حالت پخش کوچک","PIP Mode":" مینی پلیر","Exit PIP Mode":"خروج از مینی پلیر","PIP Not Supported":"عدم پشتیبانی از مینی پلیر","Fullscreen Not Supported":"عدم پشتیبانی از حالت تمام صفحه","Subtitle Offset":"افست زیرنویس","Last Seen":"آخرین بازدید","Jump Play":"جامپ پلی",AirPlay:"ایر پلی","AirPlay Not Available":"عدم پشتیبانی از ایرپلی"};return typeof window<"u"&&(window["artplayer-i18n-fa"]=e),e}));
|
||||
(function(t,e){typeof exports=="object"&&typeof module<"u"?module.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.artplayerI18nFa=e())})(this,(function(){"use strict";function t(i,n){if(typeof window<"u"){const o=window;o[i]=n}}const e={"Video Info":"اطلاعات ویدیو",Close:"بستن","Video Load Failed":"بارگذاری ناموفق",Play:"پخش",Volume:"میزان صدا",Pause:"توقف",Rate:"نرخ",Mute:"سکوت","Video Flip":"چرخش تصویر",Horizontal:"افقی",Vertical:"عمودی",Reconnect:"اتصال مجدد","Show Setting":"تنظیمات","Hide Setting":"بستن تنظیمات",Screenshot:"عکس از صفحه","Play Speed":"سرعت پخش","Aspect Ratio":"نسبت تصویر",Default:"حالت پیشفرض",Normal:" حالت عادی",Open:"بازکردن","Switch Video":"تغییر ویدیو","Switch Subtitle":"نغییر زیرنویس",Fullscreen:"تمام صفحه","Exit Fullscreen":"کوچک کردن","Web Fullscreen":"حالت تئاتر","Exit Web Fullscreen":"خروج از حالت تئاتر","Mini Player":"حالت پخش کوچک","PIP Mode":" مینی پلیر","Exit PIP Mode":"خروج از مینی پلیر","PIP Not Supported":"عدم پشتیبانی از مینی پلیر","Fullscreen Not Supported":"عدم پشتیبانی از حالت تمام صفحه","Subtitle Offset":"افست زیرنویس","Last Seen":"آخرین بازدید","Jump Play":"جامپ پلی",AirPlay:"ایر پلی","AirPlay Not Available":"عدم پشتیبانی از ایرپلی"};return t("artplayer-i18n-fa",e),e}));
|
||||
@@ -1,4 +1,10 @@
|
||||
const e = {
|
||||
function i(e, t) {
|
||||
if (typeof window < "u") {
|
||||
const l = window;
|
||||
l[e] = t;
|
||||
}
|
||||
}
|
||||
const o = {
|
||||
"Video Info": "اطلاعات ویدیو",
|
||||
Close: "بستن",
|
||||
"Video Load Failed": "بارگذاری ناموفق",
|
||||
@@ -36,7 +42,7 @@ const e = {
|
||||
AirPlay: "ایر پلی",
|
||||
"AirPlay Not Available": "عدم پشتیبانی از ایرپلی"
|
||||
};
|
||||
typeof window < "u" && (window["artplayer-i18n-fa"] = e);
|
||||
i("artplayer-i18n-fa", o);
|
||||
export {
|
||||
e as default
|
||||
o as default
|
||||
};
|
||||
@@ -1 +1 @@
|
||||
(function(e,i){typeof exports=="object"&&typeof module<"u"?module.exports=i():typeof define=="function"&&define.amd?define(i):(e=typeof globalThis<"u"?globalThis:e||self,e.artplayerI18nFr=i())})(this,(function(){"use strict";const e={"Video Info":"Informations de la vidéo",Close:"Fermer","Video Load Failed":"Téléchargement de la vidéo échoué",Volume:"Volume",Play:"Lire",Pause:"Pause",Rate:"Vitesse",Mute:"Muet","Video Flip":"Rotation de la vidéo",Horizontal:"Horizontal",Vertical:"Vertical",Reconnect:"Reconnexion","Show Setting":"Afficher les paramètres","Hide Setting":"Cacher les paramètres",Screenshot:"Capture d'écran","Play Speed":"Vitesse de lecture","Aspect Ratio":"Rapport d'aspect",Default:"Défaut",Normal:"Normal",Open:"Ouvrir","Switch Video":"Basculer la vidéo","Switch Subtitle":"Basculer le sous-titre",Fullscreen:"Plein écran","Exit Fullscreen":"Quitter le plein écran","Web Fullscreen":"Plein écran Web","Exit Web Fullscreen":"Quitter le plein écran Web","Mini Player":"Mini lecteur","PIP Mode":"Mode PiP","Exit PIP Mode":"Fermer le mode PiP","PIP Not Supported":"Mode PiP non supporté","Fullscreen Not Supported":"Plein écran non supporté","Subtitle Offset":"Réglage des sous-titres","Last Seen":"Dernière position","Jump Play":"Continuer",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay non disponible"};return typeof window<"u"&&(window["artplayer-i18n-fr"]=e),e}));
|
||||
(function(i,e){typeof exports=="object"&&typeof module<"u"?module.exports=e():typeof define=="function"&&define.amd?define(e):(i=typeof globalThis<"u"?globalThis:i||self,i.artplayerI18nFr=e())})(this,(function(){"use strict";function i(t,n){if(typeof window<"u"){const o=window;o[t]=n}}const e={"Video Info":"Informations de la vidéo",Close:"Fermer","Video Load Failed":"Téléchargement de la vidéo échoué",Volume:"Volume",Play:"Lire",Pause:"Pause",Rate:"Vitesse",Mute:"Muet","Video Flip":"Rotation de la vidéo",Horizontal:"Horizontal",Vertical:"Vertical",Reconnect:"Reconnexion","Show Setting":"Afficher les paramètres","Hide Setting":"Cacher les paramètres",Screenshot:"Capture d'écran","Play Speed":"Vitesse de lecture","Aspect Ratio":"Rapport d'aspect",Default:"Défaut",Normal:"Normal",Open:"Ouvrir","Switch Video":"Basculer la vidéo","Switch Subtitle":"Basculer le sous-titre",Fullscreen:"Plein écran","Exit Fullscreen":"Quitter le plein écran","Web Fullscreen":"Plein écran Web","Exit Web Fullscreen":"Quitter le plein écran Web","Mini Player":"Mini lecteur","PIP Mode":"Mode PiP","Exit PIP Mode":"Fermer le mode PiP","PIP Not Supported":"Mode PiP non supporté","Fullscreen Not Supported":"Plein écran non supporté","Subtitle Offset":"Réglage des sous-titres","Last Seen":"Dernière position","Jump Play":"Continuer",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay non disponible"};return i("artplayer-i18n-fr",e),e}));
|
||||
@@ -1,4 +1,10 @@
|
||||
const e = {
|
||||
function l(e, i) {
|
||||
if (typeof window < "u") {
|
||||
const t = window;
|
||||
t[e] = i;
|
||||
}
|
||||
}
|
||||
const o = {
|
||||
"Video Info": "Informations de la vidéo",
|
||||
Close: "Fermer",
|
||||
"Video Load Failed": "Téléchargement de la vidéo échoué",
|
||||
@@ -36,7 +42,7 @@ const e = {
|
||||
AirPlay: "AirPlay",
|
||||
"AirPlay Not Available": "AirPlay non disponible"
|
||||
};
|
||||
typeof window < "u" && (window["artplayer-i18n-fr"] = e);
|
||||
l("artplayer-i18n-fr", o);
|
||||
export {
|
||||
e as default
|
||||
o as default
|
||||
};
|
||||
@@ -1 +1 @@
|
||||
(function(e,a){typeof exports=="object"&&typeof module<"u"?module.exports=a():typeof define=="function"&&define.amd?define(a):(e=typeof globalThis<"u"?globalThis:e||self,e.artplayerI18nId=a())})(this,(function(){"use strict";const e={"Video Info":"Informasi Video",Close:"Tutup","Video Load Failed":"Gagal Memuat Video",Volume:"Volume",Play:"Putar",Pause:"Jeda",Rate:"Kecepatan",Mute:"Senyap","Video Flip":"Memutar Video",Horizontal:"Horizontal",Vertical:"Vertikal",Reconnect:"Menyambung Kembali","Show Setting":"Tampilkan Pengaturan","Hide Setting":"Sembunyikan Pengaturan",Screenshot:"Tangkapan Layar","Play Speed":"Kecepatan Putar","Aspect Ratio":"Rasio Aspek",Default:"Default",Normal:"Normal",Open:"Buka","Switch Video":"Ganti Video","Switch Subtitle":"Ganti Subtitle",Fullscreen:"Layar Penuh","Exit Fullscreen":"Keluar dari Layar Penuh","Web Fullscreen":"Layar Penuh Web","Exit Web Fullscreen":"Keluar dari Layar Penuh Web","Mini Player":"Pemutar Mini","PIP Mode":"Mode PIP","Exit PIP Mode":"Keluar dari Mode PIP","PIP Not Supported":"PIP Tidak Didukung","Fullscreen Not Supported":"Layar Penuh Tidak Didukung","Subtitle Offset":"Pergeseran Subtitle","Last Seen":"Terakhir Dilihat","Jump Play":"Lompat Putar",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay Tidak Tersedia"};return typeof window<"u"&&(window["artplayer-i18n-id"]=e),e}));
|
||||
(function(a,e){typeof exports=="object"&&typeof module<"u"?module.exports=e():typeof define=="function"&&define.amd?define(e):(a=typeof globalThis<"u"?globalThis:a||self,a.artplayerI18nId=e())})(this,(function(){"use strict";function a(i,t){if(typeof window<"u"){const n=window;n[i]=t}}const e={"Video Info":"Informasi Video",Close:"Tutup","Video Load Failed":"Gagal Memuat Video",Volume:"Volume",Play:"Putar",Pause:"Jeda",Rate:"Kecepatan",Mute:"Senyap","Video Flip":"Memutar Video",Horizontal:"Horizontal",Vertical:"Vertikal",Reconnect:"Menyambung Kembali","Show Setting":"Tampilkan Pengaturan","Hide Setting":"Sembunyikan Pengaturan",Screenshot:"Tangkapan Layar","Play Speed":"Kecepatan Putar","Aspect Ratio":"Rasio Aspek",Default:"Default",Normal:"Normal",Open:"Buka","Switch Video":"Ganti Video","Switch Subtitle":"Ganti Subtitle",Fullscreen:"Layar Penuh","Exit Fullscreen":"Keluar dari Layar Penuh","Web Fullscreen":"Layar Penuh Web","Exit Web Fullscreen":"Keluar dari Layar Penuh Web","Mini Player":"Pemutar Mini","PIP Mode":"Mode PIP","Exit PIP Mode":"Keluar dari Mode PIP","PIP Not Supported":"PIP Tidak Didukung","Fullscreen Not Supported":"Layar Penuh Tidak Didukung","Subtitle Offset":"Pergeseran Subtitle","Last Seen":"Terakhir Dilihat","Jump Play":"Lompat Putar",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay Tidak Tersedia"};return a("artplayer-i18n-id",e),e}));
|
||||
@@ -1,4 +1,10 @@
|
||||
const e = {
|
||||
function t(e, a) {
|
||||
if (typeof window < "u") {
|
||||
const i = window;
|
||||
i[e] = a;
|
||||
}
|
||||
}
|
||||
const n = {
|
||||
"Video Info": "Informasi Video",
|
||||
Close: "Tutup",
|
||||
"Video Load Failed": "Gagal Memuat Video",
|
||||
@@ -36,7 +42,7 @@ const e = {
|
||||
AirPlay: "AirPlay",
|
||||
"AirPlay Not Available": "AirPlay Tidak Tersedia"
|
||||
};
|
||||
typeof window < "u" && (window["artplayer-i18n-id"] = e);
|
||||
t("artplayer-i18n-id", n);
|
||||
export {
|
||||
e as default
|
||||
n as default
|
||||
};
|
||||
@@ -1 +1 @@
|
||||
(function(e,i){typeof exports=="object"&&typeof module<"u"?module.exports=i():typeof define=="function"&&define.amd?define(i):(e=typeof globalThis<"u"?globalThis:e||self,e.artplayerI18nPl=i())})(this,(function(){"use strict";const e={"Video Info":"Informacje o wideo",Close:"Zamknij","Video Load Failed":"Błąd ładowania wideo",Volume:"Głośność",Play:"Odtwórz",Pause:"Wstrzymaj",Rate:"Oceń",Mute:"Wycisz","Video Flip":"Rotacja wideo",Horizontal:"Pozioma",Vertical:"Pionowa",Reconnect:"Połącz ponownie","Show Setting":"Pokaż ustawienia","Hide Setting":"Ukryj ustawienia",Screenshot:"Zrzut ekranu","Play Speed":"Prędkość odtwarzania","Aspect Ratio":"Współczynnik proporcji",Default:"Domyślny",Normal:"Normalny",Open:"Otwórz","Switch Video":"Przełącz wideo","Switch Subtitle":"Przełącz napisy",Fullscreen:"Pełny ekran","Exit Fullscreen":"Zamknij pełny ekran","Web Fullscreen":"Tryb pełnej strony","Exit Web Fullscreen":"Zamknij tryb pełnej strony","Mini Player":"Miniodtwarzacz","PIP Mode":"Tryb PiP","Exit PIP Mode":"Zamknij tryb PiP","PIP Not Supported":"Tryb PiP nieobsługiwany","Fullscreen Not Supported":"Pełny ekran nieobsługiwany","Subtitle Offset":"Przesunięcie napisów","Last Seen":"Ostatnio widziany","Jump Play":"Skocz do gry",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay nie jest dostępny"};return typeof window<"u"&&(window["artplayer-i18n-pl"]=e),e}));
|
||||
(function(i,e){typeof exports=="object"&&typeof module<"u"?module.exports=e():typeof define=="function"&&define.amd?define(e):(i=typeof globalThis<"u"?globalThis:i||self,i.artplayerI18nPl=e())})(this,(function(){"use strict";function i(n,o){if(typeof window<"u"){const t=window;t[n]=o}}const e={"Video Info":"Informacje o wideo",Close:"Zamknij","Video Load Failed":"Błąd ładowania wideo",Volume:"Głośność",Play:"Odtwórz",Pause:"Wstrzymaj",Rate:"Oceń",Mute:"Wycisz","Video Flip":"Rotacja wideo",Horizontal:"Pozioma",Vertical:"Pionowa",Reconnect:"Połącz ponownie","Show Setting":"Pokaż ustawienia","Hide Setting":"Ukryj ustawienia",Screenshot:"Zrzut ekranu","Play Speed":"Prędkość odtwarzania","Aspect Ratio":"Współczynnik proporcji",Default:"Domyślny",Normal:"Normalny",Open:"Otwórz","Switch Video":"Przełącz wideo","Switch Subtitle":"Przełącz napisy",Fullscreen:"Pełny ekran","Exit Fullscreen":"Zamknij pełny ekran","Web Fullscreen":"Tryb pełnej strony","Exit Web Fullscreen":"Zamknij tryb pełnej strony","Mini Player":"Miniodtwarzacz","PIP Mode":"Tryb PiP","Exit PIP Mode":"Zamknij tryb PiP","PIP Not Supported":"Tryb PiP nieobsługiwany","Fullscreen Not Supported":"Pełny ekran nieobsługiwany","Subtitle Offset":"Przesunięcie napisów","Last Seen":"Ostatnio widziany","Jump Play":"Skocz do gry",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay nie jest dostępny"};return i("artplayer-i18n-pl",e),e}));
|
||||
@@ -1,4 +1,10 @@
|
||||
const e = {
|
||||
function o(e, i) {
|
||||
if (typeof window < "u") {
|
||||
const n = window;
|
||||
n[e] = i;
|
||||
}
|
||||
}
|
||||
const a = {
|
||||
"Video Info": "Informacje o wideo",
|
||||
Close: "Zamknij",
|
||||
"Video Load Failed": "Błąd ładowania wideo",
|
||||
@@ -36,7 +42,7 @@ const e = {
|
||||
AirPlay: "AirPlay",
|
||||
"AirPlay Not Available": "AirPlay nie jest dostępny"
|
||||
};
|
||||
typeof window < "u" && (window["artplayer-i18n-pl"] = e);
|
||||
o("artplayer-i18n-pl", a);
|
||||
export {
|
||||
e as default
|
||||
a as default
|
||||
};
|
||||
@@ -1 +1 @@
|
||||
(function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.artplayerI18nRu=t())})(this,(function(){"use strict";const e={"Video Info":"Информация",Close:"Закрыть","Video Load Failed":"Ошибка загрузки видео",Volume:"Громкость",Play:"Играть",Pause:"Пауза",Rate:"Скорость",Mute:"Заглушить","Video Flip":"Развернуть видео",Horizontal:"Горизонтально",Vertical:"Вертикально",Reconnect:"Переподключенине","Show Setting":"Показать настройки","Hide Setting":"Скрыть настройки",Screenshot:"Скриншот","Play Speed":"Скорость воспроизведения","Aspect Ratio":"Соотношение сторон",Default:"По-умолчанию",Normal:"Нормальный",Open:"Открыть","Switch Video":"Переключить видео","Switch Subtitle":"Переключить субтитры",Fullscreen:"Полноэкранный режим","Exit Fullscreen":"Выход из полноэкранного режима","Web Fullscreen":"На все окно браузера","Exit Web Fullscreen":"Выход из режима полного окна","Mini Player":"Мини проигрыватель","PIP Mode":"Картинка в картинке","Exit PIP Mode":"Закрыть картинку в картинке","PIP Not Supported":"Картинка в картинке не поддерживается","Fullscreen Not Supported":"Полноэкранный режим не поддерживается","Subtitle Offset":"Настройка субтитров","Last Seen":"Последнее просмотренное","Jump Play":"Перейти",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay недоступен"};return typeof window<"u"&&(window["artplayer-i18n-ru"]=e),e}));
|
||||
(function(t,e){typeof exports=="object"&&typeof module<"u"?module.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.artplayerI18nRu=e())})(this,(function(){"use strict";function t(i,n){if(typeof window<"u"){const o=window;o[i]=n}}const e={"Video Info":"Информация",Close:"Закрыть","Video Load Failed":"Ошибка загрузки видео",Volume:"Громкость",Play:"Играть",Pause:"Пауза",Rate:"Скорость",Mute:"Заглушить","Video Flip":"Развернуть видео",Horizontal:"Горизонтально",Vertical:"Вертикально",Reconnect:"Переподключенине","Show Setting":"Показать настройки","Hide Setting":"Скрыть настройки",Screenshot:"Скриншот","Play Speed":"Скорость воспроизведения","Aspect Ratio":"Соотношение сторон",Default:"По-умолчанию",Normal:"Нормальный",Open:"Открыть","Switch Video":"Переключить видео","Switch Subtitle":"Переключить субтитры",Fullscreen:"Полноэкранный режим","Exit Fullscreen":"Выход из полноэкранного режима","Web Fullscreen":"На все окно браузера","Exit Web Fullscreen":"Выход из режима полного окна","Mini Player":"Мини проигрыватель","PIP Mode":"Картинка в картинке","Exit PIP Mode":"Закрыть картинку в картинке","PIP Not Supported":"Картинка в картинке не поддерживается","Fullscreen Not Supported":"Полноэкранный режим не поддерживается","Subtitle Offset":"Настройка субтитров","Last Seen":"Последнее просмотренное","Jump Play":"Перейти",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay недоступен"};return t("artplayer-i18n-ru",e),e}));
|
||||
@@ -1,4 +1,10 @@
|
||||
const e = {
|
||||
function i(e, t) {
|
||||
if (typeof window < "u") {
|
||||
const l = window;
|
||||
l[e] = t;
|
||||
}
|
||||
}
|
||||
const o = {
|
||||
"Video Info": "Информация",
|
||||
Close: "Закрыть",
|
||||
"Video Load Failed": "Ошибка загрузки видео",
|
||||
@@ -36,7 +42,7 @@ const e = {
|
||||
AirPlay: "AirPlay",
|
||||
"AirPlay Not Available": "AirPlay недоступен"
|
||||
};
|
||||
typeof window < "u" && (window["artplayer-i18n-ru"] = e);
|
||||
i("artplayer-i18n-ru", o);
|
||||
export {
|
||||
e as default
|
||||
o as default
|
||||
};
|
||||
@@ -1 +1 @@
|
||||
(function(e,a){typeof exports=="object"&&typeof module<"u"?module.exports=a():typeof define=="function"&&define.amd?define(a):(e=typeof globalThis<"u"?globalThis:e||self,e.artplayerI18nTr=a())})(this,(function(){"use strict";const e={"Video Info":"Video Bilgisi",Close:"Kapat","Video Load Failed":"Video Yüklenemedi",Volume:"Ses Seviyesi",Play:"Oynat",Pause:"Duraklat",Rate:"Hız",Mute:"Sessize Al","Video Flip":"Videoyu Çevir",Horizontal:"Yatay",Vertical:"Dikey",Reconnect:"Yeniden Bağlan","Show Setting":"Ayarları Göster","Hide Setting":"Ayarları Gizle",Screenshot:"Ekran Görüntüsü","Play Speed":"Oynatma Hızı","Aspect Ratio":"En Boy Oranı",Default:"Varsayılan",Normal:"Normal",Open:"Aç","Switch Video":"Video Değiştir","Switch Subtitle":"Altyazı Değiştir",Fullscreen:"Tam Ekran","Exit Fullscreen":"Tam Ekrandan Çık","Web Fullscreen":"Web Tam Ekran","Exit Web Fullscreen":"Web Tam Ekranından Çık","Mini Player":"Küçük Oynatıcı","PIP Mode":"PIP Modu","Exit PIP Mode":"PIP Modundan Çık","PIP Not Supported":"PIP Desteklenmiyor","Fullscreen Not Supported":"Tam Ekran Desteklenmiyor","Subtitle Offset":"Altyazı Kaydırma","Last Seen":"Son İzlenen","Jump Play":"Atla ve Oynat",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay Kullanılamıyor"};return typeof window<"u"&&(window["artplayer-i18n-tr"]=e),e}));
|
||||
(function(a,e){typeof exports=="object"&&typeof module<"u"?module.exports=e():typeof define=="function"&&define.amd?define(e):(a=typeof globalThis<"u"?globalThis:a||self,a.artplayerI18nTr=e())})(this,(function(){"use strict";function a(n,i){if(typeof window<"u"){const t=window;t[n]=i}}const e={"Video Info":"Video Bilgisi",Close:"Kapat","Video Load Failed":"Video Yüklenemedi",Volume:"Ses Seviyesi",Play:"Oynat",Pause:"Duraklat",Rate:"Hız",Mute:"Sessize Al","Video Flip":"Videoyu Çevir",Horizontal:"Yatay",Vertical:"Dikey",Reconnect:"Yeniden Bağlan","Show Setting":"Ayarları Göster","Hide Setting":"Ayarları Gizle",Screenshot:"Ekran Görüntüsü","Play Speed":"Oynatma Hızı","Aspect Ratio":"En Boy Oranı",Default:"Varsayılan",Normal:"Normal",Open:"Aç","Switch Video":"Video Değiştir","Switch Subtitle":"Altyazı Değiştir",Fullscreen:"Tam Ekran","Exit Fullscreen":"Tam Ekrandan Çık","Web Fullscreen":"Web Tam Ekran","Exit Web Fullscreen":"Web Tam Ekranından Çık","Mini Player":"Küçük Oynatıcı","PIP Mode":"PIP Modu","Exit PIP Mode":"PIP Modundan Çık","PIP Not Supported":"PIP Desteklenmiyor","Fullscreen Not Supported":"Tam Ekran Desteklenmiyor","Subtitle Offset":"Altyazı Kaydırma","Last Seen":"Son İzlenen","Jump Play":"Atla ve Oynat",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay Kullanılamıyor"};return a("artplayer-i18n-tr",e),e}));
|
||||
@@ -1,4 +1,10 @@
|
||||
const e = {
|
||||
function l(e, a) {
|
||||
if (typeof window < "u") {
|
||||
const i = window;
|
||||
i[e] = a;
|
||||
}
|
||||
}
|
||||
const n = {
|
||||
"Video Info": "Video Bilgisi",
|
||||
Close: "Kapat",
|
||||
"Video Load Failed": "Video Yüklenemedi",
|
||||
@@ -36,7 +42,7 @@ const e = {
|
||||
AirPlay: "AirPlay",
|
||||
"AirPlay Not Available": "AirPlay Kullanılamıyor"
|
||||
};
|
||||
typeof window < "u" && (window["artplayer-i18n-tr"] = e);
|
||||
l("artplayer-i18n-tr", n);
|
||||
export {
|
||||
e as default
|
||||
n as default
|
||||
};
|
||||
@@ -1 +1 @@
|
||||
(function(n,e){typeof exports=="object"&&typeof module<"u"?module.exports=e():typeof define=="function"&&define.amd?define(e):(n=typeof globalThis<"u"?globalThis:n||self,n.artplayerI18nVi=e())})(this,(function(){"use strict";const n={"Video Info":"Thông tin video",Close:"Đóng","Video Load Failed":"Tải video thất bại",Volume:"Âm lượng",Play:"Phát",Pause:"Tạm dừng",Rate:"Tốc độ",Mute:"Tắt tiếng","Video Flip":"Lật video",Horizontal:"Ngang",Vertical:"Dọc",Reconnect:"Kết nối lại","Show Setting":"Cài đặt","Hide Setting":"Ẩn cài đặt",Screenshot:"Chụp màn hình","Play Speed":"Tốc độ phát","Aspect Ratio":"Tỷ lệ khung hình",Default:"Mặc định",Normal:"Bình thường",Open:"Mở","Switch Video":"Chuyển video","Switch Subtitle":"Chuyển phụ đề",Fullscreen:"Toàn màn hình","Exit Fullscreen":"Thoát toàn màn hình","Web Fullscreen":"Toàn màn hình trình duyệt","Exit Web Fullscreen":"Thoát toàn màn hình trình duyệt","Mini Player":"Trình phát mini","PIP Mode":"Phát trong hình","Exit PIP Mode":"Thoát phát trong hình","PIP Not Supported":"Không hỗ trợ phát trong hình","Fullscreen Not Supported":"Không hỗ trợ toàn màn hình","Subtitle Offset":"Độ trễ phụ đề","Last Seen":"Lần xem cuối","Jump Play":"Nhảy đến đoạn phát",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay không khả dụng"};return typeof window<"u"&&(window["artplayer-i18n-vi"]=n),n}));
|
||||
(function(t,n){typeof exports=="object"&&typeof module<"u"?module.exports=n():typeof define=="function"&&define.amd?define(n):(t=typeof globalThis<"u"?globalThis:t||self,t.artplayerI18nVi=n())})(this,(function(){"use strict";function t(e,i){if(typeof window<"u"){const h=window;h[e]=i}}const n={"Video Info":"Thông tin video",Close:"Đóng","Video Load Failed":"Tải video thất bại",Volume:"Âm lượng",Play:"Phát",Pause:"Tạm dừng",Rate:"Tốc độ",Mute:"Tắt tiếng","Video Flip":"Lật video",Horizontal:"Ngang",Vertical:"Dọc",Reconnect:"Kết nối lại","Show Setting":"Cài đặt","Hide Setting":"Ẩn cài đặt",Screenshot:"Chụp màn hình","Play Speed":"Tốc độ phát","Aspect Ratio":"Tỷ lệ khung hình",Default:"Mặc định",Normal:"Bình thường",Open:"Mở","Switch Video":"Chuyển video","Switch Subtitle":"Chuyển phụ đề",Fullscreen:"Toàn màn hình","Exit Fullscreen":"Thoát toàn màn hình","Web Fullscreen":"Toàn màn hình trình duyệt","Exit Web Fullscreen":"Thoát toàn màn hình trình duyệt","Mini Player":"Trình phát mini","PIP Mode":"Phát trong hình","Exit PIP Mode":"Thoát phát trong hình","PIP Not Supported":"Không hỗ trợ phát trong hình","Fullscreen Not Supported":"Không hỗ trợ toàn màn hình","Subtitle Offset":"Độ trễ phụ đề","Last Seen":"Lần xem cuối","Jump Play":"Nhảy đến đoạn phát",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay không khả dụng"};return t("artplayer-i18n-vi",n),n}));
|
||||
@@ -1,4 +1,10 @@
|
||||
const n = {
|
||||
function h(n, t) {
|
||||
if (typeof window < "u") {
|
||||
const e = window;
|
||||
e[n] = t;
|
||||
}
|
||||
}
|
||||
const i = {
|
||||
"Video Info": "Thông tin video",
|
||||
Close: "Đóng",
|
||||
"Video Load Failed": "Tải video thất bại",
|
||||
@@ -36,7 +42,7 @@ const n = {
|
||||
AirPlay: "AirPlay",
|
||||
"AirPlay Not Available": "AirPlay không khả dụng"
|
||||
};
|
||||
typeof window < "u" && (window["artplayer-i18n-vi"] = n);
|
||||
h("artplayer-i18n-vi", i);
|
||||
export {
|
||||
n as default
|
||||
i as default
|
||||
};
|
||||
@@ -1 +1 @@
|
||||
(function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.artplayerI18nZhTw=t())})(this,(function(){"use strict";const e={"Video Info":"統計訊息",Close:"關閉","Video Load Failed":"載入失敗",Volume:"音量",Play:"播放",Pause:"暫停",Rate:"速度",Mute:"靜音","Video Flip":"畫面翻轉",Horizontal:"水平",Vertical:"垂直",Reconnect:"重新連接","Show Setting":"顯示设置","Hide Setting":"隱藏设置",Screenshot:"截圖","Play Speed":"播放速度","Aspect Ratio":"畫面比例",Default:"默認",Normal:"正常",Open:"打開","Switch Video":"切換","Switch Subtitle":"切換字幕",Fullscreen:"全屏","Exit Fullscreen":"退出全屏","Web Fullscreen":"網頁全屏","Exit Web Fullscreen":"退出網頁全屏","Mini Player":"迷你播放器","PIP Mode":"開啟畫中畫","Exit PIP Mode":"退出畫中畫","PIP Not Supported":"不支持畫中畫","Fullscreen Not Supported":"不支持全屏","Subtitle Offset":"字幕偏移","Last Seen":"上次看到","Jump Play":"跳轉播放",AirPlay:"隔空播放","AirPlay Not Available":"隔空播放不可用"};return typeof window<"u"&&(window["artplayer-i18n-zh-tw"]=e),e}));
|
||||
(function(t,e){typeof exports=="object"&&typeof module<"u"?module.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.artplayerI18nZhTw=e())})(this,(function(){"use strict";function t(i,n){if(typeof window<"u"){const o=window;o[i]=n}}const e={"Video Info":"統計訊息",Close:"關閉","Video Load Failed":"載入失敗",Volume:"音量",Play:"播放",Pause:"暫停",Rate:"速度",Mute:"靜音","Video Flip":"畫面翻轉",Horizontal:"水平",Vertical:"垂直",Reconnect:"重新連接","Show Setting":"顯示设置","Hide Setting":"隱藏设置",Screenshot:"截圖","Play Speed":"播放速度","Aspect Ratio":"畫面比例",Default:"默認",Normal:"正常",Open:"打開","Switch Video":"切換","Switch Subtitle":"切換字幕",Fullscreen:"全屏","Exit Fullscreen":"退出全屏","Web Fullscreen":"網頁全屏","Exit Web Fullscreen":"退出網頁全屏","Mini Player":"迷你播放器","PIP Mode":"開啟畫中畫","Exit PIP Mode":"退出畫中畫","PIP Not Supported":"不支持畫中畫","Fullscreen Not Supported":"不支持全屏","Subtitle Offset":"字幕偏移","Last Seen":"上次看到","Jump Play":"跳轉播放",AirPlay:"隔空播放","AirPlay Not Available":"隔空播放不可用"};return t("artplayer-i18n-zh-tw",e),e}));
|
||||
@@ -1,4 +1,10 @@
|
||||
const e = {
|
||||
function i(e, t) {
|
||||
if (typeof window < "u") {
|
||||
const l = window;
|
||||
l[e] = t;
|
||||
}
|
||||
}
|
||||
const o = {
|
||||
"Video Info": "統計訊息",
|
||||
Close: "關閉",
|
||||
"Video Load Failed": "載入失敗",
|
||||
@@ -36,7 +42,7 @@ const e = {
|
||||
AirPlay: "隔空播放",
|
||||
"AirPlay Not Available": "隔空播放不可用"
|
||||
};
|
||||
typeof window < "u" && (window["artplayer-i18n-zh-tw"] = e);
|
||||
i("artplayer-i18n-zh-tw", o);
|
||||
export {
|
||||
e as default
|
||||
o as default
|
||||
};
|
||||
+1
-1
@@ -49,7 +49,7 @@
|
||||
"ci:build": "yarn build all && yarn build:i18n && yarn build:ts && yarn build:docs && yarn test:imports",
|
||||
"test:imports": "node --test test/esm.test.js test/i18n.test.js test/ssr.test.js",
|
||||
"typecheck": "node scripts/typecheck.mjs",
|
||||
"test:unit": "node --test test/playback.test.js test/dash-control.test.js test/public-behavior.test.js test/helpers.test.js test/chapter.test.js test/utils.test.js test/resource-scope.test.js test/instance-lifecycle.test.js test/options.test.js test/media-hosts.test.js test/plugins.test.js test/source.test.js test/playback-properties.test.js test/media-events.test.js",
|
||||
"test:unit": "node --test test/playback.test.js test/dash-control.test.js test/public-behavior.test.js test/helpers.test.js test/chapter.test.js test/utils.test.js test/resource-scope.test.js test/instance-lifecycle.test.js test/options.test.js test/media-hosts.test.js test/plugins.test.js test/source.test.js test/playback-properties.test.js test/media-events.test.js test/template-resources.test.js test/core-vendor.test.js",
|
||||
"test": "yarn test:node && yarn test:baseline",
|
||||
"test:browser": "playwright test",
|
||||
"test:browser:install": "playwright install chromium firefox webkit",
|
||||
|
||||
@@ -4,6 +4,55 @@ ArtPlayer keeps its existing constructor, player mixins, plugins and DOM/CSS hoo
|
||||
The production entry is still `src/index.js`; this document marks actual migrated
|
||||
boundaries rather than describing the entire core as TypeScript.
|
||||
|
||||
## Template and public resources
|
||||
|
||||
`src/template.ts` owns container checks, reservation, proxy replacement and destruction.
|
||||
`template/html.ts` holds the exact versioned markup; `template/nodes.ts` binds selectors
|
||||
in historical assignment order. `template/types.ts` describes the minimal generic host
|
||||
and nullable SSR queries. Container casts are justified by the existing non-null/div
|
||||
checks before use; selector type parameters describe expected markup, not validation
|
||||
of arbitrary user HTML. A canvas proxy is a canvas, not an asserted native video.
|
||||
The generic proxy preserves the actual host as both callback this and its sole argument.
|
||||
|
||||
useSSR preserves existing node objects and listeners. Missing nodes are not synthesized.
|
||||
Proxy replacement retains the original track reference even when it becomes detached,
|
||||
overwrites the proxy className with art-video and keeps the returned object's identity.
|
||||
Rollback remains in lifecycle/template-rollback.ts; destroy(false) marks art-destroy,
|
||||
whereas destroy(true) clears the container. Server imports expose html and STYLE but
|
||||
construction still fails with the original browser-only error.
|
||||
|
||||
`icons/defaults.ts` owns SVG inputs; `icons/index.ts` creates the per-instance registry.
|
||||
Each read creates a fresh i.art-icon wrapper. Custom DOM nodes move into that wrapper;
|
||||
they are not cloned. Public declarations historically say HTMLDivElement, while source
|
||||
uses the actual HTMLElement shape. This mismatch remains tracked for CORE-21.
|
||||
|
||||
`i18n/index.ts` owns selected language, deep updates and key fallback. Standalone
|
||||
language modules keep default exports and artplayer-i18n-* aliases through publish.ts.
|
||||
Only own language/message keys participate in lookup; absent prototype names now return
|
||||
the requested string. Explicit custom constructor/toString/**proto** messages remain
|
||||
supported. Empty translations still fall back. build:i18n excludes built-in zh-cn and
|
||||
helper modules, retaining exactly eleven UMD/ESM pairs and their historical globals.
|
||||
|
||||
`style/index.ts` exports Less output without performing DOM work. The main facade
|
||||
keeps global assignment and injection timing; `style/inject.ts` implements the existing
|
||||
setStyleText helper re-exported from utils/dom.js. Existing IDs update in place; new
|
||||
styles defer attachment until DOMContentLoaded while loading. Shared core style survives
|
||||
instance destruction. This migration does not redesign repeated pre-DOMContentLoaded
|
||||
injection or validate untrusted SSR markup.
|
||||
|
||||
Vendored screenfull.js and hint.less remain separate from owned TS. Full notices ship
|
||||
in THIRD_PARTY_NOTICES and each core bundle header; provenance and exact adaptations are
|
||||
checked by refactor/scripts/core-vendor.mjs against pinned upstream text. Historical
|
||||
screenfull acquisition tag is not recoverable from the repository: v6.0.2 is the fixed
|
||||
comparison reference, not a claim that the local file is its unmodified release.
|
||||
|
||||
Run yarn test:unit, yarn typecheck and the installed-artifact browser suite when changing
|
||||
these boundaries. template-resources tests cover real SSR reuse, proxies, icon identity,
|
||||
language fallback, style ownership, fullscreen web and real native-fullscreen gestures
|
||||
when supported by the engine. Capability evidence identifies unsupported environments. core-vendor tests cover copied
|
||||
content and native/prefixed fullscreen adapters. Rebuild with yarn build artplayer and
|
||||
yarn build:i18n; yarn test:package:release validates every language entry and browser alias.
|
||||
|
||||
## Plugin registration and ownership
|
||||
|
||||
`src/plugins/index.ts` orchestrates registration; types.ts defines generic factories,
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
ArtPlayer bundled third-party notices
|
||||
|
||||
|
||||
screenfull - reference v6.0.2, locally adapted
|
||||
https://github.com/sindresorhus/screenfull
|
||||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Hint.css v2.7.0 - scoped and styled for ArtPlayer
|
||||
https://github.com/chinchang/hint.css
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Kushagra Gour
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
option-validator v2.0.6
|
||||
https://github.com/zhw2590582/option-validator
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 Harvey Zack
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
Vendored
+64
-1
@@ -3,5 +3,68 @@
|
||||
* Github: https://github.com/zhw2590582/ArtPlayer
|
||||
* (c) 2017-2026 Harvey Zhao
|
||||
* Released under the MIT License.
|
||||
*
|
||||
* ArtPlayer bundled third-party notices
|
||||
*
|
||||
*
|
||||
* screenfull - reference v6.0.2, locally adapted
|
||||
* https://github.com/sindresorhus/screenfull
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Hint.css v2.7.0 - scoped and styled for ArtPlayer
|
||||
* https://github.com/chinchang/hint.css
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) 2021 Kushagra Gour
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* option-validator v2.0.6
|
||||
* https://github.com/zhw2590582/option-validator
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) 2018 Harvey Zack
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
!function(t,e){"object"===typeof exports&&"undefined"!==typeof module?module.exports=e():"function"==typeof define&&define.amd?(t.Artplayer=e(),define(function(){return t.Artplayer})):(t="undefined"!==typeof globalThis?globalThis:t||self).Artplayer=e()}(this,function(){"use strict";function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var e,r={exports:{}};var o=(e||(e=1,r.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,r=function(r){if(void 0===r)return"undefined";if(null===r)return"null";var a=t(r);if("boolean"===a)return"boolean";if("string"===a)return"string";if("number"===a)return"number";if("symbol"===a)return"symbol";if("function"===a)return"GeneratorFunction"===o(r)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(r))return"array";if(function(t){return!(!t.constructor||"function"!=typeof t.constructor.isBuffer)&&t.constructor.isBuffer(t)}(r))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(r))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(r))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(r))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}(r))return"regexp";switch(o(r)){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}(r))return"generator";switch(a=e.call(r)){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 a.slice(8,-1).toLowerCase().replace(/\s/g,"")};function o(t){return t.constructor?t.constructor.name:null}function a(t,e){var o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:["option"];return n(t,e,o),i(t,e,o),function(t,e,o){var s=r(e),l=r(t);if("object"===s){if("object"!==l)throw new Error("[Type Error]: '".concat(o.join("."),"' require 'object' type, but got '").concat(l,"'"));Object.keys(e).forEach(function(r){var s=t[r],l=e[r],c=o.slice();c.push(r),n(s,l,c),i(s,l,c),a(s,l,c)})}if("array"===s){if("array"!==l)throw new Error("[Type Error]: '".concat(o.join("."),"' require 'array' type, but got '").concat(l,"'"));t.forEach(function(r,s){var l=t[s],c=e[s]||e[0],d=o.slice();d.push(s),n(l,c,d),i(l,c,d),a(l,c,d)})}}(t,e,o),t}function n(t,e,o){if("string"===r(e)){var a=r(t);if("?"===e[0]&&(e=e.slice(1)+"|undefined"),!(-1<e.indexOf("|")?e.split("|").map(function(t){return t.toLowerCase().trim()}).filter(Boolean).some(function(t){return a===t}):e.toLowerCase().trim()===a))throw new Error("[Type Error]: '".concat(o.join("."),"' require '").concat(e,"' type, but got '").concat(a,"'"))}}function i(t,e,o){if("function"===r(e)){var a=e(t,r(t),o);if(!0!==a){var n=r(a);throw"string"===n?new Error(a):"error"===n?a:new Error("[Validator Error]: The scheme for '".concat(o.join("."),"' validator require return true, but got '").concat(a,"'"))}}}return a.kindOf=r,a}()),r.exports);const a=t(o),n="5.4.1",i={properties:["audioTracks","autoplay","buffered","controller","controls","crossOrigin","currentSrc","currentTime","defaultMuted","defaultPlaybackRate","duration","ended","error","loop","mediaGroup","muted","networkState","paused","playbackRate","played","preload","readyState","seekable","seeking","src","startDate","textTracks","videoTracks","volume"],methods:["addTextTrack","canPlayType","load","play","pause"],events:["abort","canplay","canplaythrough","durationchange","emptied","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],prototypes:["width","height","videoWidth","videoHeight","poster","webkitDecodedFrameCount","webkitDroppedFrameCount","playsInline","webLine truncated
|
||||
!function(t,e){"object"===typeof exports&&"undefined"!==typeof module?module.exports=e():"function"==typeof define&&define.amd?(t.Artplayer=e(),define(function(){return t.Artplayer})):(t="undefined"!==typeof globalThis?globalThis:t||self).Artplayer=e()}(this,function(){"use strict";function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var e,r={exports:{}};var o=(e||(e=1,r.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,r=function(r){if(void 0===r)return"undefined";if(null===r)return"null";var a=t(r);if("boolean"===a)return"boolean";if("string"===a)return"string";if("number"===a)return"number";if("symbol"===a)return"symbol";if("function"===a)return"GeneratorFunction"===o(r)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(r))return"array";if(function(t){return!(!t.constructor||"function"!=typeof t.constructor.isBuffer)&&t.constructor.isBuffer(t)}(r))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(r))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(r))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(r))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}(r))return"regexp";switch(o(r)){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}(r))return"generator";switch(a=e.call(r)){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 a.slice(8,-1).toLowerCase().replace(/\s/g,"")};function o(t){return t.constructor?t.constructor.name:null}function a(t,e){var o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:["option"];return n(t,e,o),i(t,e,o),function(t,e,o){var s=r(e),l=r(t);if("object"===s){if("object"!==l)throw new Error("[Type Error]: '".concat(o.join("."),"' require 'object' type, but got '").concat(l,"'"));Object.keys(e).forEach(function(r){var s=t[r],l=e[r],c=o.slice();c.push(r),n(s,l,c),i(s,l,c),a(s,l,c)})}if("array"===s){if("array"!==l)throw new Error("[Type Error]: '".concat(o.join("."),"' require 'array' type, but got '").concat(l,"'"));t.forEach(function(r,s){var l=t[s],c=e[s]||e[0],d=o.slice();d.push(s),n(l,c,d),i(l,c,d),a(l,c,d)})}}(t,e,o),t}function n(t,e,o){if("string"===r(e)){var a=r(t);if("?"===e[0]&&(e=e.slice(1)+"|undefined"),!(-1<e.indexOf("|")?e.split("|").map(function(t){return t.toLowerCase().trim()}).filter(Boolean).some(function(t){return a===t}):e.toLowerCase().trim()===a))throw new Error("[Type Error]: '".concat(o.join("."),"' require '").concat(e,"' type, but got '").concat(a,"'"))}}function i(t,e,o){if("function"===r(e)){var a=e(t,r(t),o);if(!0!==a){var n=r(a);throw"string"===n?new Error(a):"error"===n?a:new Error("[Validator Error]: The scheme for '".concat(o.join("."),"' validator require return true, but got '").concat(a,"'"))}}}return a.kindOf=r,a}()),r.exports);const a=t(o),n="5.4.1",i={properties:["audioTracks","autoplay","buffered","controller","controls","crossOrigin","currentSrc","currentTime","defaultMuted","defaultPlaybackRate","duration","ended","error","loop","mediaGroup","muted","networkState","paused","playbackRate","played","preload","readyState","seekable","seeking","src","startDate","textTracks","videoTracks","volume"],methods:["addTextTrack","canPlayType","load","play","pause"],events:["abort","canplay","canplaythrough","durationchange","emptied","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],prototypes:["width","height","videoWidth","videoHeight","poster","webkitDecodedFrameCount","webkitDroppedFrameCount","playsInline","webLine truncated
|
||||
+64
-1
@@ -3,5 +3,68 @@
|
||||
* Github: https://github.com/zhw2590582/ArtPlayer
|
||||
* (c) 2017-2026 Harvey Zhao
|
||||
* Released under the MIT License.
|
||||
*
|
||||
* ArtPlayer bundled third-party notices
|
||||
*
|
||||
*
|
||||
* screenfull - reference v6.0.2, locally adapted
|
||||
* https://github.com/sindresorhus/screenfull
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Hint.css v2.7.0 - scoped and styled for ArtPlayer
|
||||
* https://github.com/chinchang/hint.css
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) 2021 Kushagra Gour
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* option-validator v2.0.6
|
||||
* https://github.com/zhw2590582/option-validator
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) 2018 Harvey Zack
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
!function(t,e){"object"===typeof exports&&"undefined"!==typeof module?module.exports=e():"function"==typeof define&&define.amd?(t.Artplayer=e(),define(function(){return t.Artplayer})):(t="undefined"!==typeof globalThis?globalThis:t||self).Artplayer=e()}(this,function(){"use strict";var t,e=Object.defineProperty,r=Object.defineProperties,o=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,s=(t,r,o)=>r in t?e(t,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[r]=o,l=(t,e)=>{for(var r in e||(e={}))a.call(e,r)&&s(t,r,e[r]);if(n)for(var r of n(e))i.call(e,r)&&s(t,r,e[r]);return t},c=(t,e)=>r(t,o(e)),d=(t,e,r)=>new Promise((o,n)=>{var a=t=>{try{s(r.next(t))}catch(e){n(e)}},i=t=>{try{s(r.throw(t))}catch(e){n(e)}},s=t=>t.done?o(t.value):Promise.resolve(t.value).then(a,i);s((r=r.apply(t,e)).next())});function p(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var h,u={exports:{}};var m=(h||(h=1,u.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,r=function(r){if(void 0===r)return"undefined";if(null===r)return"null";var n=t(r);if("boolean"===n)return"boolean";if("string"===n)return"string";if("number"===n)return"number";if("symbol"===n)return"symbol";if("function"===n)return"GeneratorFunction"===o(r)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(r))return"array";if(function(t){return!(!t.constructor||"function"!=typeof t.constructor.isBuffer)&&t.constructor.isBuffer(t)}(r))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(r))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(r))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(r))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}(r))return"regexp";switch(o(r)){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}(r))return"generator";switch(n=e.call(r)){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 n.slice(8,-1).toLowerCase().replace(/\s/g,"")};function o(t){return t.constructor?t.constructor.name:null}function n(t,e){var o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:["option"];return a(t,e,o),i(t,e,o),function(t,e,o){var s=r(e),l=r(t);if("object"===s){if("object"!==l)throw new Error("[Type Error]: '".concat(o.join("."),"' require 'object' type, but got '").concat(l,"'"));Object.keys(e).forEach(function(r){var s=t[r],l=e[r],c=o.slice();c.push(r),a(s,l,c),i(s,l,c),n(s,l,c)})}if("array"===s){if("array"!==l)throw new Error("[Type Error]: '".concat(o.join("."),"' require 'array' type, but got '").concat(l,"'"));t.forEach(function(r,s){var l=t[s],c=e[s]||e[0],d=o.slice();d.push(s),a(l,c,d),i(l,c,d),n(l,c,d)})}}(t,e,o),t}function a(t,e,o){if("string"===r(e)){var n=r(t);if("?"===e[0]&&(e=e.slice(1)+"|undefined"),!(-1<e.indexOf("|")?e.split("|").map(function(t){return t.toLowerCase().trim()}).filter(Boolean).some(function(t){return n===t}):e.toLowerCase().trim()===n))throw new Error("[Type Error]: '".concat(o.join("."),"' require '").concat(e,"' type, but got '").concat(n,"'"))}}function i(t,e,o){if("function"===r(e)){var n=e(t,r(t),o);if(!0!==n){var a=r(n);throw"string"===a?new Error(n):"error"===a?n:new Error("[Validator Error]: The scheme for '".concat(o.join("."),"' validator require return true, but got '").concat(n,"'"))}}}return n.kindOf=r,n}()),u.exports);const f=p(m),g="5.4.1",v={properties:["audioTracks","autoplay","buffered","controller","controls","crossOrigin","currentSrc","currentTime","defaultMuted","defaultPlaybackRate","duration","ended","error","loop","meLine truncated
|
||||
!function(t,e){"object"===typeof exports&&"undefined"!==typeof module?module.exports=e():"function"==typeof define&&define.amd?(t.Artplayer=e(),define(function(){return t.Artplayer})):(t="undefined"!==typeof globalThis?globalThis:t||self).Artplayer=e()}(this,function(){"use strict";var t,e=Object.defineProperty,r=Object.defineProperties,o=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,s=(t,r,o)=>r in t?e(t,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[r]=o,l=(t,e)=>{for(var r in e||(e={}))a.call(e,r)&&s(t,r,e[r]);if(n)for(var r of n(e))i.call(e,r)&&s(t,r,e[r]);return t},c=(t,e)=>r(t,o(e)),d=(t,e,r)=>new Promise((o,n)=>{var a=t=>{try{s(r.next(t))}catch(e){n(e)}},i=t=>{try{s(r.throw(t))}catch(e){n(e)}},s=t=>t.done?o(t.value):Promise.resolve(t.value).then(a,i);s((r=r.apply(t,e)).next())});function p(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var u,h={exports:{}};var f=(u||(u=1,h.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,r=function(r){if(void 0===r)return"undefined";if(null===r)return"null";var n=t(r);if("boolean"===n)return"boolean";if("string"===n)return"string";if("number"===n)return"number";if("symbol"===n)return"symbol";if("function"===n)return"GeneratorFunction"===o(r)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(r))return"array";if(function(t){return!(!t.constructor||"function"!=typeof t.constructor.isBuffer)&&t.constructor.isBuffer(t)}(r))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(r))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(r))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(r))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}(r))return"regexp";switch(o(r)){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}(r))return"generator";switch(n=e.call(r)){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 n.slice(8,-1).toLowerCase().replace(/\s/g,"")};function o(t){return t.constructor?t.constructor.name:null}function n(t,e){var o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:["option"];return a(t,e,o),i(t,e,o),function(t,e,o){var s=r(e),l=r(t);if("object"===s){if("object"!==l)throw new Error("[Type Error]: '".concat(o.join("."),"' require 'object' type, but got '").concat(l,"'"));Object.keys(e).forEach(function(r){var s=t[r],l=e[r],c=o.slice();c.push(r),a(s,l,c),i(s,l,c),n(s,l,c)})}if("array"===s){if("array"!==l)throw new Error("[Type Error]: '".concat(o.join("."),"' require 'array' type, but got '").concat(l,"'"));t.forEach(function(r,s){var l=t[s],c=e[s]||e[0],d=o.slice();d.push(s),a(l,c,d),i(l,c,d),n(l,c,d)})}}(t,e,o),t}function a(t,e,o){if("string"===r(e)){var n=r(t);if("?"===e[0]&&(e=e.slice(1)+"|undefined"),!(-1<e.indexOf("|")?e.split("|").map(function(t){return t.toLowerCase().trim()}).filter(Boolean).some(function(t){return n===t}):e.toLowerCase().trim()===n))throw new Error("[Type Error]: '".concat(o.join("."),"' require '").concat(e,"' type, but got '").concat(n,"'"))}}function i(t,e,o){if("function"===r(e)){var n=e(t,r(t),o);if(!0!==n){var a=r(n);throw"string"===a?new Error(n):"error"===a?n:new Error("[Validator Error]: The scheme for '".concat(o.join("."),"' validator require return true, but got '").concat(n,"'"))}}}return n.kindOf=r,n}()),h.exports);const m=p(f),g="5.4.1",v={properties:["audioTracks","autoplay","buffered","controller","controls","crossOrigin","currentSrc","currentTime","defaultMuted","defaultPlaybackRate","duration","ended","error","loop","meLine truncated
|
||||
+196
-124
@@ -3,6 +3,69 @@
|
||||
* Github: https://github.com/zhw2590582/ArtPlayer
|
||||
* (c) 2017-2026 Harvey Zhao
|
||||
* Released under the MIT License.
|
||||
*
|
||||
* ArtPlayer bundled third-party notices
|
||||
*
|
||||
*
|
||||
* screenfull - reference v6.0.2, locally adapted
|
||||
* https://github.com/sindresorhus/screenfull
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Hint.css v2.7.0 - scoped and styled for ArtPlayer
|
||||
* https://github.com/chinchang/hint.css
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) 2021 Kushagra Gour
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* option-validator v2.0.6
|
||||
* https://github.com/zhw2590582/option-validator
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) 2018 Harvey Zack
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
function getDefaultExportFromCjs(x) {
|
||||
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
||||
@@ -245,6 +308,21 @@ const isIOS = /iPad|iPhone|iPod/i.test(userAgent) && !window.MSStream;
|
||||
const isIOS13 = isIOS || userAgent.includes("Macintosh") && navigator.maxTouchPoints >= 1;
|
||||
const isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(userAgent) || isIOS13;
|
||||
const isBrowser = typeof window !== "undefined" && typeof document !== "undefined";
|
||||
function setStyleText(id2, style) {
|
||||
let $style = document.getElementById(id2);
|
||||
if (!$style) {
|
||||
$style = document.createElement("style");
|
||||
$style.id = id2;
|
||||
if (document.readyState === "loading") {
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
document.head.appendChild($style);
|
||||
});
|
||||
} else {
|
||||
(document.head || document.documentElement).appendChild($style);
|
||||
}
|
||||
}
|
||||
$style.textContent = style;
|
||||
}
|
||||
function query(selector, parent = document) {
|
||||
return parent.querySelector(selector);
|
||||
}
|
||||
@@ -317,28 +395,13 @@ function replaceElement(newChild, oldChild) {
|
||||
function createElement(tag) {
|
||||
return document.createElement(tag);
|
||||
}
|
||||
function getIcon(key = "", html = "") {
|
||||
function getIcon(key = "", html2 = "") {
|
||||
const icon = createElement("i");
|
||||
addClass(icon, "art-icon");
|
||||
addClass(icon, `art-icon-${key}`);
|
||||
append(icon, html);
|
||||
append(icon, html2);
|
||||
return icon;
|
||||
}
|
||||
function setStyleText(id2, style2) {
|
||||
let $style = document.getElementById(id2);
|
||||
if (!$style) {
|
||||
$style = document.createElement("style");
|
||||
$style.id = id2;
|
||||
if (document.readyState === "loading") {
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
document.head.appendChild($style);
|
||||
});
|
||||
} else {
|
||||
(document.head || document.documentElement).appendChild($style);
|
||||
}
|
||||
}
|
||||
$style.textContent = style2;
|
||||
}
|
||||
function supportsFlex() {
|
||||
const div = document.createElement("div");
|
||||
div.style.display = "flex";
|
||||
@@ -397,12 +460,12 @@ function getSafeAreaInsets() {
|
||||
const div = document.createElement("div");
|
||||
div.style.cssText = "position:fixed;top:env(safe-area-inset-top,0px);right:env(safe-area-inset-right,0px);bottom:env(safe-area-inset-bottom,0px);left:env(safe-area-inset-left,0px);pointer-events:none;visibility:hidden;";
|
||||
document.body.appendChild(div);
|
||||
const style2 = getComputedStyle(div);
|
||||
const style = getComputedStyle(div);
|
||||
const insets = {
|
||||
top: Number.parseFloat(style2.top) || 0,
|
||||
right: Number.parseFloat(style2.right) || 0,
|
||||
bottom: Number.parseFloat(style2.bottom) || 0,
|
||||
left: Number.parseFloat(style2.left) || 0
|
||||
top: Number.parseFloat(style.top) || 0,
|
||||
right: Number.parseFloat(style.right) || 0,
|
||||
bottom: Number.parseFloat(style.bottom) || 0,
|
||||
left: Number.parseFloat(style.left) || 0
|
||||
};
|
||||
div.remove();
|
||||
return insets;
|
||||
@@ -877,12 +940,12 @@ function aspectRatio$2(option) {
|
||||
i18n,
|
||||
constructor: { ASPECT_RATIO }
|
||||
} = art;
|
||||
const html = ASPECT_RATIO.map(
|
||||
const html2 = ASPECT_RATIO.map(
|
||||
(item) => `<span data-value="${item}">${item === "default" ? i18n.get("Default") : item}</span>`
|
||||
).join("");
|
||||
return {
|
||||
...option,
|
||||
html: `${i18n.get("Aspect Ratio")}: ${html}`,
|
||||
html: `${i18n.get("Aspect Ratio")}: ${html2}`,
|
||||
click: (contextmenu, event) => {
|
||||
const { value } = event.target.dataset;
|
||||
if (value) {
|
||||
@@ -920,10 +983,10 @@ function flip$2(option) {
|
||||
i18n,
|
||||
constructor: { FLIP }
|
||||
} = art;
|
||||
const html = FLIP.map((item) => `<span data-value="${item}">${i18n.get(capitalize(item))}</span>`).join("");
|
||||
const html2 = FLIP.map((item) => `<span data-value="${item}">${i18n.get(capitalize(item))}</span>`).join("");
|
||||
return {
|
||||
...option,
|
||||
html: `${i18n.get("Video Flip")}: ${html}`,
|
||||
html: `${i18n.get("Video Flip")}: ${html2}`,
|
||||
click: (contextmenu, event) => {
|
||||
const { value } = event.target.dataset;
|
||||
if (value) {
|
||||
@@ -962,12 +1025,12 @@ function playbackRate$2(option) {
|
||||
i18n,
|
||||
constructor: { PLAYBACK_RATE }
|
||||
} = art;
|
||||
const html = PLAYBACK_RATE.map(
|
||||
const html2 = PLAYBACK_RATE.map(
|
||||
(item) => `<span data-value="${item}">${item === 1 ? i18n.get("Normal") : item.toFixed(1)}</span>`
|
||||
).join("");
|
||||
return {
|
||||
...option,
|
||||
html: `${i18n.get("Play Speed")}: ${html}`,
|
||||
html: `${i18n.get("Play Speed")}: ${html2}`,
|
||||
click: (contextmenu, event) => {
|
||||
const { value } = event.target.dataset;
|
||||
if (value) {
|
||||
@@ -1476,8 +1539,8 @@ function progress(options) {
|
||||
for (let index = 0; index < option.highlight.length; index++) {
|
||||
const item = option.highlight[index];
|
||||
const left = clamp(item.time, 0, art.duration) / art.duration * 100;
|
||||
const html = `<span data-text="${item.text}" data-time="${item.time}" style="left: ${left}%"></span>`;
|
||||
append($highlight, html);
|
||||
const html2 = `<span data-text="${item.text}" data-time="${item.time}" style="left: ${left}%"></span>`;
|
||||
append($highlight, html2);
|
||||
}
|
||||
}
|
||||
function setBar(type, percentage, event) {
|
||||
@@ -2298,6 +2361,12 @@ class Hotkey {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
function publishLanguage(name, value) {
|
||||
if (typeof window !== "undefined") {
|
||||
const globals = window;
|
||||
globals[name] = value;
|
||||
}
|
||||
}
|
||||
const zhCn = {
|
||||
"Video Info": "统计信息",
|
||||
"Close": "关闭",
|
||||
@@ -2336,24 +2405,20 @@ const zhCn = {
|
||||
"AirPlay": "隔空播放",
|
||||
"AirPlay Not Available": "隔空播放不可用"
|
||||
};
|
||||
if (typeof window !== "undefined") {
|
||||
window["artplayer-i18n-zh-cn"] = zhCn;
|
||||
}
|
||||
publishLanguage("artplayer-i18n-zh-cn", zhCn);
|
||||
class I18n {
|
||||
constructor(art) {
|
||||
this.art = art;
|
||||
this.languages = {
|
||||
"zh-cn": zhCn
|
||||
};
|
||||
this.languages = { "zh-cn": zhCn };
|
||||
this.language = {};
|
||||
this.update(art.option.i18n);
|
||||
}
|
||||
init() {
|
||||
const lang = this.art.option.lang.toLowerCase();
|
||||
this.language = this.languages[lang] || {};
|
||||
this.language = has(this.languages, lang) && this.languages[lang] || {};
|
||||
}
|
||||
get(key) {
|
||||
return this.language[key] || key;
|
||||
return has(this.language, key) && this.language[key] || key;
|
||||
}
|
||||
update(value) {
|
||||
this.languages = mergeDeep(this.languages, value);
|
||||
@@ -2387,38 +2452,38 @@ const switchOn = '<?xml version="1.0" standalone="no"?>\r\n<!DOCTYPE svg PUBLIC
|
||||
const unlock = '<?xml version="1.0" standalone="no"?>\r\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\r\n<svg t="1650612464266" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="20"><path d="M666.752 194.517333L617.386667 268.629333A128 128 0 0 0 384 341.333333l0.042667 85.333334h384a85.333333 85.333333 0 0 1 85.333333 85.333333v256a85.333333 85.333333 0 0 1-85.333333 85.333333H256a85.333333 85.333333 0 0 1-85.333333-85.333333v-256a85.333333 85.333333 0 0 1 85.333333-85.333333h42.666667V341.333333a213.333333 213.333333 0 0 1 368.085333-146.816z"></path></svg>\r\n';
|
||||
const volumeClose = '<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewBox="0 0 22 22">\r\n <path d="M15 11a3.998 3.998 0 0 0-2-3.465v2.636l1.865 1.865A4.02 4.02 0 0 0 15 11z"></path>\r\n <path d="M13.583 5.583A5.998 5.998 0 0 1 17 11a6 6 0 0 1-.585 2.587l1.477 1.477a8.001 8.001 0 0 0-3.446-11.286 1 1 0 0 0-.863 1.805zM18.778 18.778l-2.121-2.121-1.414-1.414-1.415-1.415L13 13l-2-2-3.889-3.889-3.889-3.889a.999.999 0 1 0-1.414 1.414L5.172 8H5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h1l4.188 3.35a.5.5 0 0 0 .812-.39v-3.131l2.587 2.587-.01.005a1 1 0 0 0 .86 1.806c.215-.102.424-.214.627-.333l2.3 2.3a1.001 1.001 0 0 0 1.414-1.416zM11 5.04a.5.5 0 0 0-.813-.39L8.682 5.854 11 8.172V5.04z"></path>\r\n</svg>';
|
||||
const volume = '<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewBox="0 0 22 22">\r\n <path d="M10.188 4.65L6 8H5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h1l4.188 3.35a.5.5 0 0 0 .812-.39V5.04a.498.498 0 0 0-.812-.39zM14.446 3.778a1 1 0 0 0-.862 1.804 6.002 6.002 0 0 1-.007 10.838 1 1 0 0 0 .86 1.806A8.001 8.001 0 0 0 19 11a8.001 8.001 0 0 0-4.554-7.222z"></path>\r\n <path d="M15 11a3.998 3.998 0 0 0-2-3.465v6.93A3.998 3.998 0 0 0 15 11z"></path>\r\n</svg>';
|
||||
const defaults = {
|
||||
loading,
|
||||
state,
|
||||
play,
|
||||
pause,
|
||||
check,
|
||||
volume,
|
||||
volumeClose,
|
||||
screenshot,
|
||||
setting,
|
||||
pip,
|
||||
arrowLeft,
|
||||
arrowRight,
|
||||
playbackRate: playbackRate$1,
|
||||
aspectRatio: aspectRatio$1,
|
||||
config,
|
||||
lock: lock$1,
|
||||
flip: flip$1,
|
||||
unlock,
|
||||
fullscreenOff,
|
||||
fullscreenOn,
|
||||
fullscreenWebOff,
|
||||
fullscreenWebOn,
|
||||
switchOn,
|
||||
switchOff,
|
||||
error,
|
||||
close,
|
||||
airplay
|
||||
};
|
||||
class Icons {
|
||||
constructor(art) {
|
||||
const icons = {
|
||||
loading,
|
||||
state,
|
||||
play,
|
||||
pause,
|
||||
check,
|
||||
volume,
|
||||
volumeClose,
|
||||
screenshot,
|
||||
setting,
|
||||
pip,
|
||||
arrowLeft,
|
||||
arrowRight,
|
||||
playbackRate: playbackRate$1,
|
||||
aspectRatio: aspectRatio$1,
|
||||
config,
|
||||
lock: lock$1,
|
||||
flip: flip$1,
|
||||
unlock,
|
||||
fullscreenOff,
|
||||
fullscreenOn,
|
||||
fullscreenWebOff,
|
||||
fullscreenWebOn,
|
||||
switchOn,
|
||||
switchOff,
|
||||
error,
|
||||
close,
|
||||
airplay,
|
||||
...art.option.icons
|
||||
};
|
||||
const icons = { ...defaults, ...art.option.icons };
|
||||
for (const key in icons) {
|
||||
def(this, key, {
|
||||
get: () => getIcon(key, icons[key])
|
||||
@@ -2609,8 +2674,8 @@ function createDefaults() {
|
||||
lang: navigator?.language.toLowerCase()
|
||||
};
|
||||
}
|
||||
function resolveOption(input, defaults) {
|
||||
const merged = mergeDeep(defaults, input);
|
||||
function resolveOption(input, defaults2) {
|
||||
const merged = mergeDeep(defaults2, input);
|
||||
merged.container = input.container;
|
||||
return validator(merged, scheme);
|
||||
}
|
||||
@@ -5063,7 +5128,7 @@ class Storage {
|
||||
}
|
||||
}
|
||||
}
|
||||
const style = ".art-video-player {\n --art-theme: #f00;\n --art-font-color: #fff;\n --art-background-color: #000;\n --art-text-shadow-color: rgba(0, 0, 0, 0.5);\n --art-transition-duration: 0.2s;\n --art-padding: 10px;\n --art-border-radius: 3px;\n --art-progress-height: 6px;\n --art-progress-color: rgba(255, 255, 255, 0.25);\n --art-progress-top-gap: 10px;\n --art-hover-color: rgba(255, 255, 255, 0.25);\n --art-loaded-color: rgba(255, 255, 255, 0.25);\n --art-state-size: 80px;\n --art-state-opacity: 0.8;\n --art-bottom-height: 100px;\n --art-bottom-offset: 20px;\n --art-bottom-gap: 5px;\n --art-highlight-width: 8px;\n --art-highlight-color: rgba(255, 255, 255, 0.5);\n --art-control-height: 46px;\n --art-control-opacity: 0.75;\n --art-control-icon-size: 36px;\n --art-control-icon-scale: 1.1;\n --art-volume-height: 120px;\n --art-volume-handle-size: 14px;\n --art-lock-size: 36px;\n --art-indicator-scale: 0;\n --art-indicator-size: 16px;\n --art-fullscreen-web-index: 9999;\n --art-settings-icon-size: 24px;\n --art-settings-max-height: 300px;\n --art-selector-max-height: 300px;\n --art-contextmenus-min-width: 250px;\n --art-subtitle-font-size: 20px;\n --art-subtitle-gap: 5px;\n --art-subtitle-bottom: 15px;\n --art-subtitle-border: #000;\n --art-widget-background: rgba(0, 0, 0, 0.85);\n --art-tip-background: rgba(0, 0, 0, 0.7);\n --art-scrollbar-size: 4px;\n --art-scrollbar-background: rgba(255, 255, 255, 0.25);\n --art-scrollbar-background-hover: rgba(255, 255, 255, 0.5);\n --art-mini-progress-height: 2px;\n}\n.art-bg-cover {\n background-position: center center;\n background-repeat: no-repeat;\n background-size: cover;\n}\n.art-bottom-gradient {\n background-image: linear-gradient(to top, #000, rgba(0, 0, 0, 0.4), transparent);\n background-repeat: repeat-x;\n background-position: center bottom;\n}\n.art-backdrop-filter {\n -webkit-backdrop-filter: saturate(180%) blur(20px);\n backdrop-filter: saturate(180%) blur(20px);\n background-color: rgba(0, 0, 0, 0.75) !important;\n}\n.art-truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.art-video-player {\n position: relative;\n margin: 0 auto;\n width: 100%;\n height: 100%;\n outline: 0;\n zoom: 1;\n padding: 0;\n text-align: left;\n direction: ltr;\n font-size: 14px;\n line-height: 1.3;\n user-select: none;\n box-sizing: border-box;\n color: var(--art-font-color);\n background-color: var(--art-background-color);\n text-shadow: 0 0 2px var(--art-text-shadow-color);\n font-family: PingFang SC, Helvetica Neue, Microsoft YaHei, Roboto, Arial, sans-serif;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n -ms-touch-action: manipulation;\n touch-action: manipulation;\n -ms-high-contrast-adjust: none;\n}\n.art-video-player *,\n.art-video-player *::before,\n.art-video-player *::after {\n box-sizing: border-box;\n}\n.art-video-player ::-webkit-scrollbar {\n width: var(--art-scrollbar-size);\n height: var(--art-scrollbar-size);\n}\n.art-video-player ::-webkit-scrollbar-thumb {\n background-color: var(--art-scrollbar-background);\n}\n.art-video-player ::-webkit-scrollbar-thumb:hover {\n background-color: var(--art-scrollbar-background-hover);\n}\n.art-video-player img {\n max-width: 100%;\n vertical-align: top;\n}\n.art-video-player svg {\n fill: var(--art-font-color);\n}\n.art-video-player a {\n color: var(--art-font-color);\n text-decoration: none;\n}\n.art-icon {\n line-height: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.art-video-player.art-backdrop .art-contextmenus,\n.art-video-player.art-backdrop .art-info,\n.art-video-player.art-backdrop .art-settings,\n.art-video-player.art-backdrop .art-layer-auto-playback,\n.art-video-player.art-backdrop .art-selector-list,\n.art-video-player.art-backdrop .art-volume-inner {\n -webkit-backdrop-filter: saturate(180%) blur(20px);\n backdrop-filter: saturate(180%) blur(20px);\n background-color: rgba(0, 0, 0, 0.75) !important;\n}\n.art-video {\n position: absolute;\n inset: 0;\n z-index: 10;\n width: 100%;\n height: 100%;\n}\n.art-poster {\n position: absolute;\n inset: 0;\n z-index: 11;\n width: 100%;\n height: 100%;\n background-position: center center;\n background-repeat: no-repeat;\n background-size: cover;\n pointer-events: none;\n}\n.art-video-player .art-subtitle {\n display: none;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n position: absolute;\n z-index: 20;\n width: 100%;\n padding: 0 5%;\n text-align: center;\n pointer-events: none;\n gap: var(--art-subtitle-gap);\n bottom: var(--art-subtitle-bottom);\n font-size: var(--art-subtitle-font-size);\n transition: bottom var(--art-transition-duration) ease;\n text-shadow: var(--art-subtitle-border) 1px 0 1px, var(--art-subtitle-border) 0 1px 1px, var(--art-subtitle-border) -1px 0 1px, var(--art-subtitle-border) 0 -1px 1px, var(--art-subtitle-border) 1px 1px 1pLine truncated
|
||||
const css = ".art-video-player {\n --art-theme: #f00;\n --art-font-color: #fff;\n --art-background-color: #000;\n --art-text-shadow-color: rgba(0, 0, 0, 0.5);\n --art-transition-duration: 0.2s;\n --art-padding: 10px;\n --art-border-radius: 3px;\n --art-progress-height: 6px;\n --art-progress-color: rgba(255, 255, 255, 0.25);\n --art-progress-top-gap: 10px;\n --art-hover-color: rgba(255, 255, 255, 0.25);\n --art-loaded-color: rgba(255, 255, 255, 0.25);\n --art-state-size: 80px;\n --art-state-opacity: 0.8;\n --art-bottom-height: 100px;\n --art-bottom-offset: 20px;\n --art-bottom-gap: 5px;\n --art-highlight-width: 8px;\n --art-highlight-color: rgba(255, 255, 255, 0.5);\n --art-control-height: 46px;\n --art-control-opacity: 0.75;\n --art-control-icon-size: 36px;\n --art-control-icon-scale: 1.1;\n --art-volume-height: 120px;\n --art-volume-handle-size: 14px;\n --art-lock-size: 36px;\n --art-indicator-scale: 0;\n --art-indicator-size: 16px;\n --art-fullscreen-web-index: 9999;\n --art-settings-icon-size: 24px;\n --art-settings-max-height: 300px;\n --art-selector-max-height: 300px;\n --art-contextmenus-min-width: 250px;\n --art-subtitle-font-size: 20px;\n --art-subtitle-gap: 5px;\n --art-subtitle-bottom: 15px;\n --art-subtitle-border: #000;\n --art-widget-background: rgba(0, 0, 0, 0.85);\n --art-tip-background: rgba(0, 0, 0, 0.7);\n --art-scrollbar-size: 4px;\n --art-scrollbar-background: rgba(255, 255, 255, 0.25);\n --art-scrollbar-background-hover: rgba(255, 255, 255, 0.5);\n --art-mini-progress-height: 2px;\n}\n.art-bg-cover {\n background-position: center center;\n background-repeat: no-repeat;\n background-size: cover;\n}\n.art-bottom-gradient {\n background-image: linear-gradient(to top, #000, rgba(0, 0, 0, 0.4), transparent);\n background-repeat: repeat-x;\n background-position: center bottom;\n}\n.art-backdrop-filter {\n -webkit-backdrop-filter: saturate(180%) blur(20px);\n backdrop-filter: saturate(180%) blur(20px);\n background-color: rgba(0, 0, 0, 0.75) !important;\n}\n.art-truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.art-video-player {\n position: relative;\n margin: 0 auto;\n width: 100%;\n height: 100%;\n outline: 0;\n zoom: 1;\n padding: 0;\n text-align: left;\n direction: ltr;\n font-size: 14px;\n line-height: 1.3;\n user-select: none;\n box-sizing: border-box;\n color: var(--art-font-color);\n background-color: var(--art-background-color);\n text-shadow: 0 0 2px var(--art-text-shadow-color);\n font-family: PingFang SC, Helvetica Neue, Microsoft YaHei, Roboto, Arial, sans-serif;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n -ms-touch-action: manipulation;\n touch-action: manipulation;\n -ms-high-contrast-adjust: none;\n}\n.art-video-player *,\n.art-video-player *::before,\n.art-video-player *::after {\n box-sizing: border-box;\n}\n.art-video-player ::-webkit-scrollbar {\n width: var(--art-scrollbar-size);\n height: var(--art-scrollbar-size);\n}\n.art-video-player ::-webkit-scrollbar-thumb {\n background-color: var(--art-scrollbar-background);\n}\n.art-video-player ::-webkit-scrollbar-thumb:hover {\n background-color: var(--art-scrollbar-background-hover);\n}\n.art-video-player img {\n max-width: 100%;\n vertical-align: top;\n}\n.art-video-player svg {\n fill: var(--art-font-color);\n}\n.art-video-player a {\n color: var(--art-font-color);\n text-decoration: none;\n}\n.art-icon {\n line-height: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.art-video-player.art-backdrop .art-contextmenus,\n.art-video-player.art-backdrop .art-info,\n.art-video-player.art-backdrop .art-settings,\n.art-video-player.art-backdrop .art-layer-auto-playback,\n.art-video-player.art-backdrop .art-selector-list,\n.art-video-player.art-backdrop .art-volume-inner {\n -webkit-backdrop-filter: saturate(180%) blur(20px);\n backdrop-filter: saturate(180%) blur(20px);\n background-color: rgba(0, 0, 0, 0.75) !important;\n}\n.art-video {\n position: absolute;\n inset: 0;\n z-index: 10;\n width: 100%;\n height: 100%;\n}\n.art-poster {\n position: absolute;\n inset: 0;\n z-index: 11;\n width: 100%;\n height: 100%;\n background-position: center center;\n background-repeat: no-repeat;\n background-size: cover;\n pointer-events: none;\n}\n.art-video-player .art-subtitle {\n display: none;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n position: absolute;\n z-index: 20;\n width: 100%;\n padding: 0 5%;\n text-align: center;\n pointer-events: none;\n gap: var(--art-subtitle-gap);\n bottom: var(--art-subtitle-bottom);\n font-size: var(--art-subtitle-font-size);\n transition: bottom var(--art-transition-duration) ease;\n text-shadow: var(--art-subtitle-border) 1px 0 1px, var(--art-subtitle-border) 0 1px 1px, var(--art-subtitle-border) -1px 0 1px, var(--art-subtitle-border) 0 -1px 1px, var(--art-subtitle-border) 1px 1px 1px,Line truncated
|
||||
class Subtitle extends Component {
|
||||
constructor(art) {
|
||||
super(art);
|
||||
@@ -5234,30 +5299,7 @@ function captureTemplate(container) {
|
||||
}
|
||||
};
|
||||
}
|
||||
class Template {
|
||||
constructor(art) {
|
||||
this.art = art;
|
||||
const { option, constructor } = art;
|
||||
if (option.container instanceof Element) {
|
||||
this.$container = option.container;
|
||||
} else {
|
||||
this.$container = query(option.container);
|
||||
errorHandle(this.$container, `No container element found by ${option.container}`);
|
||||
}
|
||||
errorHandle(supportsFlex(), "The current browser does not support flex layout");
|
||||
const type = this.$container.tagName.toLowerCase();
|
||||
errorHandle(type === "div", `Unsupported container element type, only support 'div' but got '${type}'`);
|
||||
errorHandle(
|
||||
constructor.instances.every((ins) => ins.template.$container !== this.$container),
|
||||
"Cannot mount multiple instances on the same dom element"
|
||||
);
|
||||
this.query = this.query.bind(this);
|
||||
ownContainer(art, this.$container, captureTemplate(this.$container));
|
||||
this.$container.dataset.artId = art.id;
|
||||
this.init();
|
||||
}
|
||||
static get html() {
|
||||
return `
|
||||
const html = `
|
||||
<div class="art-video-player art-subtitle-show art-layer-show art-control-show art-mask-show">
|
||||
<video class="art-video">
|
||||
<track default kind="metadata" src=""></track>
|
||||
@@ -5316,6 +5358,55 @@ class Template {
|
||||
<div class="art-contextmenus"></div>
|
||||
</div>
|
||||
`;
|
||||
function bindNodes(target) {
|
||||
target.$player = target.query(".art-video-player");
|
||||
target.$video = target.query(".art-video");
|
||||
target.$track = target.query("track");
|
||||
target.$poster = target.query(".art-poster");
|
||||
target.$subtitle = target.query(".art-subtitle");
|
||||
target.$danmuku = target.query(".art-danmuku");
|
||||
target.$bottom = target.query(".art-bottom");
|
||||
target.$progress = target.query(".art-progress");
|
||||
target.$controls = target.query(".art-controls");
|
||||
target.$controlsLeft = target.query(".art-controls-left");
|
||||
target.$controlsCenter = target.query(".art-controls-center");
|
||||
target.$controlsRight = target.query(".art-controls-right");
|
||||
target.$layer = target.query(".art-layers");
|
||||
target.$loading = target.query(".art-loading");
|
||||
target.$notice = target.query(".art-notice");
|
||||
target.$noticeInner = target.query(".art-notice-inner");
|
||||
target.$mask = target.query(".art-mask");
|
||||
target.$state = target.query(".art-state");
|
||||
target.$setting = target.query(".art-settings");
|
||||
target.$info = target.query(".art-info");
|
||||
target.$infoPanel = target.query(".art-info-panel");
|
||||
target.$infoClose = target.query(".art-info-close");
|
||||
target.$contextmenu = target.query(".art-contextmenus");
|
||||
}
|
||||
class Template {
|
||||
constructor(art) {
|
||||
this.art = art;
|
||||
const { option, constructor } = art;
|
||||
if (option.container instanceof Element) {
|
||||
this.$container = option.container;
|
||||
} else {
|
||||
this.$container = query(option.container);
|
||||
errorHandle(this.$container, `No container element found by ${option.container}`);
|
||||
}
|
||||
errorHandle(supportsFlex(), "The current browser does not support flex layout");
|
||||
const type = this.$container.tagName.toLowerCase();
|
||||
errorHandle(type === "div", `Unsupported container element type, only support 'div' but got '${type}'`);
|
||||
errorHandle(
|
||||
constructor.instances.every((ins) => ins.template.$container !== this.$container),
|
||||
"Cannot mount multiple instances on the same dom element"
|
||||
);
|
||||
this.query = this.query.bind(this);
|
||||
ownContainer(art, this.$container, captureTemplate(this.$container));
|
||||
this.$container.dataset.artId = String(art.id);
|
||||
this.init();
|
||||
}
|
||||
static get html() {
|
||||
return html;
|
||||
}
|
||||
query(className) {
|
||||
return query(className, this.$container);
|
||||
@@ -5325,35 +5416,10 @@ class Template {
|
||||
if (!option.useSSR) {
|
||||
this.$container.innerHTML = Template.html;
|
||||
}
|
||||
this.$player = this.query(".art-video-player");
|
||||
this.$video = this.query(".art-video");
|
||||
this.$track = this.query("track");
|
||||
this.$poster = this.query(".art-poster");
|
||||
this.$subtitle = this.query(".art-subtitle");
|
||||
this.$danmuku = this.query(".art-danmuku");
|
||||
this.$bottom = this.query(".art-bottom");
|
||||
this.$progress = this.query(".art-progress");
|
||||
this.$controls = this.query(".art-controls");
|
||||
this.$controlsLeft = this.query(".art-controls-left");
|
||||
this.$controlsCenter = this.query(".art-controls-center");
|
||||
this.$controlsRight = this.query(".art-controls-right");
|
||||
this.$layer = this.query(".art-layers");
|
||||
this.$loading = this.query(".art-loading");
|
||||
this.$notice = this.query(".art-notice");
|
||||
this.$noticeInner = this.query(".art-notice-inner");
|
||||
this.$mask = this.query(".art-mask");
|
||||
this.$state = this.query(".art-state");
|
||||
this.$setting = this.query(".art-settings");
|
||||
this.$info = this.query(".art-info");
|
||||
this.$infoPanel = this.query(".art-info-panel");
|
||||
this.$infoClose = this.query(".art-info-close");
|
||||
this.$contextmenu = this.query(".art-contextmenus");
|
||||
bindNodes(this);
|
||||
if (option.proxy) {
|
||||
const video = option.proxy.call(this.art, this.art);
|
||||
errorHandle(
|
||||
video instanceof HTMLVideoElement || video instanceof HTMLCanvasElement,
|
||||
`Function 'option.proxy' needs to return 'HTMLVideoElement' or 'HTMLCanvasElement'`
|
||||
);
|
||||
assertProxy(video);
|
||||
replaceElement(video, this.$video);
|
||||
video.className = "art-video";
|
||||
this.$video = video;
|
||||
@@ -5373,6 +5439,12 @@ class Template {
|
||||
}
|
||||
}
|
||||
}
|
||||
function assertProxy(video) {
|
||||
errorHandle(
|
||||
video instanceof HTMLVideoElement || video instanceof HTMLCanvasElement,
|
||||
"Function 'option.proxy' needs to return 'HTMLVideoElement' or 'HTMLCanvasElement'"
|
||||
);
|
||||
}
|
||||
const owns = (object, key) => Object.prototype.hasOwnProperty.call(object, key);
|
||||
class Emitter {
|
||||
on(name, fn, ctx) {
|
||||
@@ -5531,7 +5603,7 @@ class Artplayer extends Emitter {
|
||||
destroyInstance(this, instances, removeHtml, Artplayer.REMOVE_SRC_WHEN_DESTROY);
|
||||
}
|
||||
}
|
||||
Artplayer.STYLE = style;
|
||||
Artplayer.STYLE = css;
|
||||
Artplayer.DEBUG = false;
|
||||
Artplayer.CONTEXTMENU = true;
|
||||
Artplayer.NOTICE_TIME = 2e3;
|
||||
@@ -5567,7 +5639,7 @@ Artplayer.USE_RAF = false;
|
||||
Artplayer.REMOVE_SRC_WHEN_DESTROY = true;
|
||||
if (isBrowser) {
|
||||
window.Artplayer = Artplayer;
|
||||
setStyleText("artplayer-style", style);
|
||||
setStyleText("artplayer-style", css);
|
||||
setTimeout(() => {
|
||||
if (Artplayer.LOG_VERSION) {
|
||||
console.log(
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
(function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.artplayerI18nAr=t())})(this,(function(){"use strict";const e={"Video Info":"معلومات الفيديو",Close:"إغلاق","Video Load Failed":"فشل تحميل الفيديو",Volume:"الصوت",Play:"تشغيل",Pause:"إيقاف مؤقت",Rate:"السرعة",Mute:"كتم الصوت","Video Flip":"تدوير الفيديو",Horizontal:"أفقي",Vertical:"عمودي",Reconnect:"إعادة الاتصال","Show Setting":"إظهار الإعدادات","Hide Setting":"إخفاء الإعدادات",Screenshot:"لقطة شاشة","Play Speed":"سرعة التشغيل","Aspect Ratio":"نسبة العرض إلى الارتفاع",Default:"افتراضي",Normal:"عادي",Open:"فتح","Switch Video":"تبديل الفيديو","Switch Subtitle":"تبديل الترجمة",Fullscreen:"وضع ملء الشاشة","Exit Fullscreen":"الخروج من وضع ملء الشاشة","Web Fullscreen":"وضع ملء الشاشة في المتصفح","Exit Web Fullscreen":"الخروج من وضع ملء الشاشة في المتصفح","Mini Player":"مشغل صغير","PIP Mode":"الوضع العائم","Exit PIP Mode":"الخروج من الوضع العائم","PIP Not Supported":"الوضع العائم غير مدعوم","Fullscreen Not Supported":"وضع ملء الشاشة غير مدعوم","Subtitle Offset":"إزاحة الترجمة","Last Seen":"آخر مشاهدة","Jump Play":"التشغيل القافز",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay غير متاح"};return typeof window<"u"&&(window["artplayer-i18n-ar"]=e),e}));
|
||||
(function(t,e){typeof exports=="object"&&typeof module<"u"?module.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.artplayerI18nAr=e())})(this,(function(){"use strict";function t(i,n){if(typeof window<"u"){const o=window;o[i]=n}}const e={"Video Info":"معلومات الفيديو",Close:"إغلاق","Video Load Failed":"فشل تحميل الفيديو",Volume:"الصوت",Play:"تشغيل",Pause:"إيقاف مؤقت",Rate:"السرعة",Mute:"كتم الصوت","Video Flip":"تدوير الفيديو",Horizontal:"أفقي",Vertical:"عمودي",Reconnect:"إعادة الاتصال","Show Setting":"إظهار الإعدادات","Hide Setting":"إخفاء الإعدادات",Screenshot:"لقطة شاشة","Play Speed":"سرعة التشغيل","Aspect Ratio":"نسبة العرض إلى الارتفاع",Default:"افتراضي",Normal:"عادي",Open:"فتح","Switch Video":"تبديل الفيديو","Switch Subtitle":"تبديل الترجمة",Fullscreen:"وضع ملء الشاشة","Exit Fullscreen":"الخروج من وضع ملء الشاشة","Web Fullscreen":"وضع ملء الشاشة في المتصفح","Exit Web Fullscreen":"الخروج من وضع ملء الشاشة في المتصفح","Mini Player":"مشغل صغير","PIP Mode":"الوضع العائم","Exit PIP Mode":"الخروج من الوضع العائم","PIP Not Supported":"الوضع العائم غير مدعوم","Fullscreen Not Supported":"وضع ملء الشاشة غير مدعوم","Subtitle Offset":"إزاحة الترجمة","Last Seen":"آخر مشاهدة","Jump Play":"التشغيل القافز",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay غير متاح"};return t("artplayer-i18n-ar",e),e}));
|
||||
Vendored
+9
-3
@@ -1,4 +1,10 @@
|
||||
const e = {
|
||||
function i(e, t) {
|
||||
if (typeof window < "u") {
|
||||
const l = window;
|
||||
l[e] = t;
|
||||
}
|
||||
}
|
||||
const o = {
|
||||
"Video Info": "معلومات الفيديو",
|
||||
Close: "إغلاق",
|
||||
"Video Load Failed": "فشل تحميل الفيديو",
|
||||
@@ -36,7 +42,7 @@ const e = {
|
||||
AirPlay: "AirPlay",
|
||||
"AirPlay Not Available": "AirPlay غير متاح"
|
||||
};
|
||||
typeof window < "u" && (window["artplayer-i18n-ar"] = e);
|
||||
i("artplayer-i18n-ar", o);
|
||||
export {
|
||||
e as default
|
||||
o as default
|
||||
};
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
(function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.artplayerI18nCs=t())})(this,(function(){"use strict";const e={"Video Info":"Info o videu",Close:"Zavřít","Video Load Failed":"Nahrání videa selhalo",Volume:"Hlasitost",Play:"Přehrát",Pause:"Pozastavit",Rate:"Hodnocení",Mute:"Ztlumit","Video Flip":"Otočit video",Horizontal:"Horizontálně",Vertical:"Vertikálně",Reconnect:"Opětovné připojení","Show Setting":"Zobrazit nastavení","Hide Setting":"Skrýt nastavení",Screenshot:"Snímek obrazovky","Play Speed":"Rychlost přehrávání","Aspect Ratio":"Poměr stran",Default:"Výchozí",Normal:"Normální",Open:"Otevřít","Switch Video":"Přepnout video","Switch Subtitle":"Přepnout titulky",Fullscreen:"Celá obrazovka","Exit Fullscreen":"Opustit režim celé obrazovky","Web Fullscreen":"Celá stránka","Exit Web Fullscreen":"Zavřít režim celé stránky","Mini Player":"Mini přehrávač","PIP Mode":"Režim PIP","Exit PIP Mode":"Opustit režim PIP","PIP Not Supported":"Režim PIP není podporován","Fullscreen Not Supported":"Režim celé obrazovky není podporován","Subtitle Offset":"Posun titulků","Last Seen":"Naposledy viděn","Jump Play":"Hra na skok",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay není k dispozici"};return typeof window<"u"&&(window["artplayer-i18n-cs"]=e),e}));
|
||||
(function(t,e){typeof exports=="object"&&typeof module<"u"?module.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.artplayerI18nCs=e())})(this,(function(){"use strict";function t(o,i){if(typeof window<"u"){const n=window;n[o]=i}}const e={"Video Info":"Info o videu",Close:"Zavřít","Video Load Failed":"Nahrání videa selhalo",Volume:"Hlasitost",Play:"Přehrát",Pause:"Pozastavit",Rate:"Hodnocení",Mute:"Ztlumit","Video Flip":"Otočit video",Horizontal:"Horizontálně",Vertical:"Vertikálně",Reconnect:"Opětovné připojení","Show Setting":"Zobrazit nastavení","Hide Setting":"Skrýt nastavení",Screenshot:"Snímek obrazovky","Play Speed":"Rychlost přehrávání","Aspect Ratio":"Poměr stran",Default:"Výchozí",Normal:"Normální",Open:"Otevřít","Switch Video":"Přepnout video","Switch Subtitle":"Přepnout titulky",Fullscreen:"Celá obrazovka","Exit Fullscreen":"Opustit režim celé obrazovky","Web Fullscreen":"Celá stránka","Exit Web Fullscreen":"Zavřít režim celé stránky","Mini Player":"Mini přehrávač","PIP Mode":"Režim PIP","Exit PIP Mode":"Opustit režim PIP","PIP Not Supported":"Režim PIP není podporován","Fullscreen Not Supported":"Režim celé obrazovky není podporován","Subtitle Offset":"Posun titulků","Last Seen":"Naposledy viděn","Jump Play":"Hra na skok",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay není k dispozici"};return t("artplayer-i18n-cs",e),e}));
|
||||
Vendored
+9
-3
@@ -1,4 +1,10 @@
|
||||
const e = {
|
||||
function i(e, t) {
|
||||
if (typeof window < "u") {
|
||||
const o = window;
|
||||
o[e] = t;
|
||||
}
|
||||
}
|
||||
const n = {
|
||||
"Video Info": "Info o videu",
|
||||
Close: "Zavřít",
|
||||
"Video Load Failed": "Nahrání videa selhalo",
|
||||
@@ -36,7 +42,7 @@ const e = {
|
||||
AirPlay: "AirPlay",
|
||||
"AirPlay Not Available": "AirPlay není k dispozici"
|
||||
};
|
||||
typeof window < "u" && (window["artplayer-i18n-cs"] = e);
|
||||
i("artplayer-i18n-cs", n);
|
||||
export {
|
||||
e as default
|
||||
n as default
|
||||
};
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
(function(e,a){typeof exports=="object"&&typeof module<"u"?module.exports=a():typeof define=="function"&&define.amd?define(a):(e=typeof globalThis<"u"?globalThis:e||self,e.artplayerI18nEs=a())})(this,(function(){"use strict";const e={"Video Info":"Información del video",Close:"Cerrar","Video Load Failed":"Falló carga de video",Volume:"Volumen",Play:"Reproduciendo",Pause:"Pausa",Rate:"Velocidad",Mute:"Silencio","Video Flip":"Rotar video",Horizontal:"Horizontal",Vertical:"Vertical",Reconnect:"Reconectando","Show Setting":"Mostrar ajustes","Hide Setting":"Ocultar ajustes",Screenshot:"Captura de Pantalla","Play Speed":"Velocidad de reproducción","Aspect Ratio":"Relación de aspecto",Default:"Por defecto",Normal:"Normal",Open:"Abrir","Switch Video":"Cambiar video","Switch Subtitle":"Cambiar subtítulo",Fullscreen:"Pantalla completa","Exit Fullscreen":"Salir de Pantalla completa","Web Fullscreen":"Pantalla completa Web","Exit Web Fullscreen":"Salir de Pantalla completa","Mini Player":"Mini reproductor","PIP Mode":"Modo PiP","Exit PIP Mode":"Cerrar modo PiP","PIP Not Supported":"Modo PiP no compatible","Fullscreen Not Supported":"Pantalla completa no soportada","Subtitle Offset":"Ajuste subtítulo","Last Seen":"Visto última vez","Jump Play":"Saltar",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay no disponible"};return typeof window<"u"&&(window["artplayer-i18n-es"]=e),e}));
|
||||
(function(a,e){typeof exports=="object"&&typeof module<"u"?module.exports=e():typeof define=="function"&&define.amd?define(e):(a=typeof globalThis<"u"?globalThis:a||self,a.artplayerI18nEs=e())})(this,(function(){"use strict";function a(o,t){if(typeof window<"u"){const l=window;l[o]=t}}const e={"Video Info":"Información del video",Close:"Cerrar","Video Load Failed":"Falló carga de video",Volume:"Volumen",Play:"Reproduciendo",Pause:"Pausa",Rate:"Velocidad",Mute:"Silencio","Video Flip":"Rotar video",Horizontal:"Horizontal",Vertical:"Vertical",Reconnect:"Reconectando","Show Setting":"Mostrar ajustes","Hide Setting":"Ocultar ajustes",Screenshot:"Captura de Pantalla","Play Speed":"Velocidad de reproducción","Aspect Ratio":"Relación de aspecto",Default:"Por defecto",Normal:"Normal",Open:"Abrir","Switch Video":"Cambiar video","Switch Subtitle":"Cambiar subtítulo",Fullscreen:"Pantalla completa","Exit Fullscreen":"Salir de Pantalla completa","Web Fullscreen":"Pantalla completa Web","Exit Web Fullscreen":"Salir de Pantalla completa","Mini Player":"Mini reproductor","PIP Mode":"Modo PiP","Exit PIP Mode":"Cerrar modo PiP","PIP Not Supported":"Modo PiP no compatible","Fullscreen Not Supported":"Pantalla completa no soportada","Subtitle Offset":"Ajuste subtítulo","Last Seen":"Visto última vez","Jump Play":"Saltar",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay no disponible"};return a("artplayer-i18n-es",e),e}));
|
||||
Vendored
+9
-3
@@ -1,4 +1,10 @@
|
||||
const e = {
|
||||
function l(e, a) {
|
||||
if (typeof window < "u") {
|
||||
const o = window;
|
||||
o[e] = a;
|
||||
}
|
||||
}
|
||||
const t = {
|
||||
"Video Info": "Información del video",
|
||||
Close: "Cerrar",
|
||||
"Video Load Failed": "Falló carga de video",
|
||||
@@ -36,7 +42,7 @@ const e = {
|
||||
AirPlay: "AirPlay",
|
||||
"AirPlay Not Available": "AirPlay no disponible"
|
||||
};
|
||||
typeof window < "u" && (window["artplayer-i18n-es"] = e);
|
||||
l("artplayer-i18n-es", t);
|
||||
export {
|
||||
e as default
|
||||
t as default
|
||||
};
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
(function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.artplayerI18nFa=t())})(this,(function(){"use strict";const e={"Video Info":"اطلاعات ویدیو",Close:"بستن","Video Load Failed":"بارگذاری ناموفق",Play:"پخش",Volume:"میزان صدا",Pause:"توقف",Rate:"نرخ",Mute:"سکوت","Video Flip":"چرخش تصویر",Horizontal:"افقی",Vertical:"عمودی",Reconnect:"اتصال مجدد","Show Setting":"تنظیمات","Hide Setting":"بستن تنظیمات",Screenshot:"عکس از صفحه","Play Speed":"سرعت پخش","Aspect Ratio":"نسبت تصویر",Default:"حالت پیشفرض",Normal:" حالت عادی",Open:"بازکردن","Switch Video":"تغییر ویدیو","Switch Subtitle":"نغییر زیرنویس",Fullscreen:"تمام صفحه","Exit Fullscreen":"کوچک کردن","Web Fullscreen":"حالت تئاتر","Exit Web Fullscreen":"خروج از حالت تئاتر","Mini Player":"حالت پخش کوچک","PIP Mode":" مینی پلیر","Exit PIP Mode":"خروج از مینی پلیر","PIP Not Supported":"عدم پشتیبانی از مینی پلیر","Fullscreen Not Supported":"عدم پشتیبانی از حالت تمام صفحه","Subtitle Offset":"افست زیرنویس","Last Seen":"آخرین بازدید","Jump Play":"جامپ پلی",AirPlay:"ایر پلی","AirPlay Not Available":"عدم پشتیبانی از ایرپلی"};return typeof window<"u"&&(window["artplayer-i18n-fa"]=e),e}));
|
||||
(function(t,e){typeof exports=="object"&&typeof module<"u"?module.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.artplayerI18nFa=e())})(this,(function(){"use strict";function t(i,n){if(typeof window<"u"){const o=window;o[i]=n}}const e={"Video Info":"اطلاعات ویدیو",Close:"بستن","Video Load Failed":"بارگذاری ناموفق",Play:"پخش",Volume:"میزان صدا",Pause:"توقف",Rate:"نرخ",Mute:"سکوت","Video Flip":"چرخش تصویر",Horizontal:"افقی",Vertical:"عمودی",Reconnect:"اتصال مجدد","Show Setting":"تنظیمات","Hide Setting":"بستن تنظیمات",Screenshot:"عکس از صفحه","Play Speed":"سرعت پخش","Aspect Ratio":"نسبت تصویر",Default:"حالت پیشفرض",Normal:" حالت عادی",Open:"بازکردن","Switch Video":"تغییر ویدیو","Switch Subtitle":"نغییر زیرنویس",Fullscreen:"تمام صفحه","Exit Fullscreen":"کوچک کردن","Web Fullscreen":"حالت تئاتر","Exit Web Fullscreen":"خروج از حالت تئاتر","Mini Player":"حالت پخش کوچک","PIP Mode":" مینی پلیر","Exit PIP Mode":"خروج از مینی پلیر","PIP Not Supported":"عدم پشتیبانی از مینی پلیر","Fullscreen Not Supported":"عدم پشتیبانی از حالت تمام صفحه","Subtitle Offset":"افست زیرنویس","Last Seen":"آخرین بازدید","Jump Play":"جامپ پلی",AirPlay:"ایر پلی","AirPlay Not Available":"عدم پشتیبانی از ایرپلی"};return t("artplayer-i18n-fa",e),e}));
|
||||
Vendored
+9
-3
@@ -1,4 +1,10 @@
|
||||
const e = {
|
||||
function i(e, t) {
|
||||
if (typeof window < "u") {
|
||||
const l = window;
|
||||
l[e] = t;
|
||||
}
|
||||
}
|
||||
const o = {
|
||||
"Video Info": "اطلاعات ویدیو",
|
||||
Close: "بستن",
|
||||
"Video Load Failed": "بارگذاری ناموفق",
|
||||
@@ -36,7 +42,7 @@ const e = {
|
||||
AirPlay: "ایر پلی",
|
||||
"AirPlay Not Available": "عدم پشتیبانی از ایرپلی"
|
||||
};
|
||||
typeof window < "u" && (window["artplayer-i18n-fa"] = e);
|
||||
i("artplayer-i18n-fa", o);
|
||||
export {
|
||||
e as default
|
||||
o as default
|
||||
};
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
(function(e,i){typeof exports=="object"&&typeof module<"u"?module.exports=i():typeof define=="function"&&define.amd?define(i):(e=typeof globalThis<"u"?globalThis:e||self,e.artplayerI18nFr=i())})(this,(function(){"use strict";const e={"Video Info":"Informations de la vidéo",Close:"Fermer","Video Load Failed":"Téléchargement de la vidéo échoué",Volume:"Volume",Play:"Lire",Pause:"Pause",Rate:"Vitesse",Mute:"Muet","Video Flip":"Rotation de la vidéo",Horizontal:"Horizontal",Vertical:"Vertical",Reconnect:"Reconnexion","Show Setting":"Afficher les paramètres","Hide Setting":"Cacher les paramètres",Screenshot:"Capture d'écran","Play Speed":"Vitesse de lecture","Aspect Ratio":"Rapport d'aspect",Default:"Défaut",Normal:"Normal",Open:"Ouvrir","Switch Video":"Basculer la vidéo","Switch Subtitle":"Basculer le sous-titre",Fullscreen:"Plein écran","Exit Fullscreen":"Quitter le plein écran","Web Fullscreen":"Plein écran Web","Exit Web Fullscreen":"Quitter le plein écran Web","Mini Player":"Mini lecteur","PIP Mode":"Mode PiP","Exit PIP Mode":"Fermer le mode PiP","PIP Not Supported":"Mode PiP non supporté","Fullscreen Not Supported":"Plein écran non supporté","Subtitle Offset":"Réglage des sous-titres","Last Seen":"Dernière position","Jump Play":"Continuer",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay non disponible"};return typeof window<"u"&&(window["artplayer-i18n-fr"]=e),e}));
|
||||
(function(i,e){typeof exports=="object"&&typeof module<"u"?module.exports=e():typeof define=="function"&&define.amd?define(e):(i=typeof globalThis<"u"?globalThis:i||self,i.artplayerI18nFr=e())})(this,(function(){"use strict";function i(t,n){if(typeof window<"u"){const o=window;o[t]=n}}const e={"Video Info":"Informations de la vidéo",Close:"Fermer","Video Load Failed":"Téléchargement de la vidéo échoué",Volume:"Volume",Play:"Lire",Pause:"Pause",Rate:"Vitesse",Mute:"Muet","Video Flip":"Rotation de la vidéo",Horizontal:"Horizontal",Vertical:"Vertical",Reconnect:"Reconnexion","Show Setting":"Afficher les paramètres","Hide Setting":"Cacher les paramètres",Screenshot:"Capture d'écran","Play Speed":"Vitesse de lecture","Aspect Ratio":"Rapport d'aspect",Default:"Défaut",Normal:"Normal",Open:"Ouvrir","Switch Video":"Basculer la vidéo","Switch Subtitle":"Basculer le sous-titre",Fullscreen:"Plein écran","Exit Fullscreen":"Quitter le plein écran","Web Fullscreen":"Plein écran Web","Exit Web Fullscreen":"Quitter le plein écran Web","Mini Player":"Mini lecteur","PIP Mode":"Mode PiP","Exit PIP Mode":"Fermer le mode PiP","PIP Not Supported":"Mode PiP non supporté","Fullscreen Not Supported":"Plein écran non supporté","Subtitle Offset":"Réglage des sous-titres","Last Seen":"Dernière position","Jump Play":"Continuer",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay non disponible"};return i("artplayer-i18n-fr",e),e}));
|
||||
Vendored
+9
-3
@@ -1,4 +1,10 @@
|
||||
const e = {
|
||||
function l(e, i) {
|
||||
if (typeof window < "u") {
|
||||
const t = window;
|
||||
t[e] = i;
|
||||
}
|
||||
}
|
||||
const o = {
|
||||
"Video Info": "Informations de la vidéo",
|
||||
Close: "Fermer",
|
||||
"Video Load Failed": "Téléchargement de la vidéo échoué",
|
||||
@@ -36,7 +42,7 @@ const e = {
|
||||
AirPlay: "AirPlay",
|
||||
"AirPlay Not Available": "AirPlay non disponible"
|
||||
};
|
||||
typeof window < "u" && (window["artplayer-i18n-fr"] = e);
|
||||
l("artplayer-i18n-fr", o);
|
||||
export {
|
||||
e as default
|
||||
o as default
|
||||
};
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
(function(e,a){typeof exports=="object"&&typeof module<"u"?module.exports=a():typeof define=="function"&&define.amd?define(a):(e=typeof globalThis<"u"?globalThis:e||self,e.artplayerI18nId=a())})(this,(function(){"use strict";const e={"Video Info":"Informasi Video",Close:"Tutup","Video Load Failed":"Gagal Memuat Video",Volume:"Volume",Play:"Putar",Pause:"Jeda",Rate:"Kecepatan",Mute:"Senyap","Video Flip":"Memutar Video",Horizontal:"Horizontal",Vertical:"Vertikal",Reconnect:"Menyambung Kembali","Show Setting":"Tampilkan Pengaturan","Hide Setting":"Sembunyikan Pengaturan",Screenshot:"Tangkapan Layar","Play Speed":"Kecepatan Putar","Aspect Ratio":"Rasio Aspek",Default:"Default",Normal:"Normal",Open:"Buka","Switch Video":"Ganti Video","Switch Subtitle":"Ganti Subtitle",Fullscreen:"Layar Penuh","Exit Fullscreen":"Keluar dari Layar Penuh","Web Fullscreen":"Layar Penuh Web","Exit Web Fullscreen":"Keluar dari Layar Penuh Web","Mini Player":"Pemutar Mini","PIP Mode":"Mode PIP","Exit PIP Mode":"Keluar dari Mode PIP","PIP Not Supported":"PIP Tidak Didukung","Fullscreen Not Supported":"Layar Penuh Tidak Didukung","Subtitle Offset":"Pergeseran Subtitle","Last Seen":"Terakhir Dilihat","Jump Play":"Lompat Putar",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay Tidak Tersedia"};return typeof window<"u"&&(window["artplayer-i18n-id"]=e),e}));
|
||||
(function(a,e){typeof exports=="object"&&typeof module<"u"?module.exports=e():typeof define=="function"&&define.amd?define(e):(a=typeof globalThis<"u"?globalThis:a||self,a.artplayerI18nId=e())})(this,(function(){"use strict";function a(i,t){if(typeof window<"u"){const n=window;n[i]=t}}const e={"Video Info":"Informasi Video",Close:"Tutup","Video Load Failed":"Gagal Memuat Video",Volume:"Volume",Play:"Putar",Pause:"Jeda",Rate:"Kecepatan",Mute:"Senyap","Video Flip":"Memutar Video",Horizontal:"Horizontal",Vertical:"Vertikal",Reconnect:"Menyambung Kembali","Show Setting":"Tampilkan Pengaturan","Hide Setting":"Sembunyikan Pengaturan",Screenshot:"Tangkapan Layar","Play Speed":"Kecepatan Putar","Aspect Ratio":"Rasio Aspek",Default:"Default",Normal:"Normal",Open:"Buka","Switch Video":"Ganti Video","Switch Subtitle":"Ganti Subtitle",Fullscreen:"Layar Penuh","Exit Fullscreen":"Keluar dari Layar Penuh","Web Fullscreen":"Layar Penuh Web","Exit Web Fullscreen":"Keluar dari Layar Penuh Web","Mini Player":"Pemutar Mini","PIP Mode":"Mode PIP","Exit PIP Mode":"Keluar dari Mode PIP","PIP Not Supported":"PIP Tidak Didukung","Fullscreen Not Supported":"Layar Penuh Tidak Didukung","Subtitle Offset":"Pergeseran Subtitle","Last Seen":"Terakhir Dilihat","Jump Play":"Lompat Putar",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay Tidak Tersedia"};return a("artplayer-i18n-id",e),e}));
|
||||
Vendored
+9
-3
@@ -1,4 +1,10 @@
|
||||
const e = {
|
||||
function t(e, a) {
|
||||
if (typeof window < "u") {
|
||||
const i = window;
|
||||
i[e] = a;
|
||||
}
|
||||
}
|
||||
const n = {
|
||||
"Video Info": "Informasi Video",
|
||||
Close: "Tutup",
|
||||
"Video Load Failed": "Gagal Memuat Video",
|
||||
@@ -36,7 +42,7 @@ const e = {
|
||||
AirPlay: "AirPlay",
|
||||
"AirPlay Not Available": "AirPlay Tidak Tersedia"
|
||||
};
|
||||
typeof window < "u" && (window["artplayer-i18n-id"] = e);
|
||||
t("artplayer-i18n-id", n);
|
||||
export {
|
||||
e as default
|
||||
n as default
|
||||
};
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
(function(e,i){typeof exports=="object"&&typeof module<"u"?module.exports=i():typeof define=="function"&&define.amd?define(i):(e=typeof globalThis<"u"?globalThis:e||self,e.artplayerI18nPl=i())})(this,(function(){"use strict";const e={"Video Info":"Informacje o wideo",Close:"Zamknij","Video Load Failed":"Błąd ładowania wideo",Volume:"Głośność",Play:"Odtwórz",Pause:"Wstrzymaj",Rate:"Oceń",Mute:"Wycisz","Video Flip":"Rotacja wideo",Horizontal:"Pozioma",Vertical:"Pionowa",Reconnect:"Połącz ponownie","Show Setting":"Pokaż ustawienia","Hide Setting":"Ukryj ustawienia",Screenshot:"Zrzut ekranu","Play Speed":"Prędkość odtwarzania","Aspect Ratio":"Współczynnik proporcji",Default:"Domyślny",Normal:"Normalny",Open:"Otwórz","Switch Video":"Przełącz wideo","Switch Subtitle":"Przełącz napisy",Fullscreen:"Pełny ekran","Exit Fullscreen":"Zamknij pełny ekran","Web Fullscreen":"Tryb pełnej strony","Exit Web Fullscreen":"Zamknij tryb pełnej strony","Mini Player":"Miniodtwarzacz","PIP Mode":"Tryb PiP","Exit PIP Mode":"Zamknij tryb PiP","PIP Not Supported":"Tryb PiP nieobsługiwany","Fullscreen Not Supported":"Pełny ekran nieobsługiwany","Subtitle Offset":"Przesunięcie napisów","Last Seen":"Ostatnio widziany","Jump Play":"Skocz do gry",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay nie jest dostępny"};return typeof window<"u"&&(window["artplayer-i18n-pl"]=e),e}));
|
||||
(function(i,e){typeof exports=="object"&&typeof module<"u"?module.exports=e():typeof define=="function"&&define.amd?define(e):(i=typeof globalThis<"u"?globalThis:i||self,i.artplayerI18nPl=e())})(this,(function(){"use strict";function i(n,o){if(typeof window<"u"){const t=window;t[n]=o}}const e={"Video Info":"Informacje o wideo",Close:"Zamknij","Video Load Failed":"Błąd ładowania wideo",Volume:"Głośność",Play:"Odtwórz",Pause:"Wstrzymaj",Rate:"Oceń",Mute:"Wycisz","Video Flip":"Rotacja wideo",Horizontal:"Pozioma",Vertical:"Pionowa",Reconnect:"Połącz ponownie","Show Setting":"Pokaż ustawienia","Hide Setting":"Ukryj ustawienia",Screenshot:"Zrzut ekranu","Play Speed":"Prędkość odtwarzania","Aspect Ratio":"Współczynnik proporcji",Default:"Domyślny",Normal:"Normalny",Open:"Otwórz","Switch Video":"Przełącz wideo","Switch Subtitle":"Przełącz napisy",Fullscreen:"Pełny ekran","Exit Fullscreen":"Zamknij pełny ekran","Web Fullscreen":"Tryb pełnej strony","Exit Web Fullscreen":"Zamknij tryb pełnej strony","Mini Player":"Miniodtwarzacz","PIP Mode":"Tryb PiP","Exit PIP Mode":"Zamknij tryb PiP","PIP Not Supported":"Tryb PiP nieobsługiwany","Fullscreen Not Supported":"Pełny ekran nieobsługiwany","Subtitle Offset":"Przesunięcie napisów","Last Seen":"Ostatnio widziany","Jump Play":"Skocz do gry",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay nie jest dostępny"};return i("artplayer-i18n-pl",e),e}));
|
||||
Vendored
+9
-3
@@ -1,4 +1,10 @@
|
||||
const e = {
|
||||
function o(e, i) {
|
||||
if (typeof window < "u") {
|
||||
const n = window;
|
||||
n[e] = i;
|
||||
}
|
||||
}
|
||||
const a = {
|
||||
"Video Info": "Informacje o wideo",
|
||||
Close: "Zamknij",
|
||||
"Video Load Failed": "Błąd ładowania wideo",
|
||||
@@ -36,7 +42,7 @@ const e = {
|
||||
AirPlay: "AirPlay",
|
||||
"AirPlay Not Available": "AirPlay nie jest dostępny"
|
||||
};
|
||||
typeof window < "u" && (window["artplayer-i18n-pl"] = e);
|
||||
o("artplayer-i18n-pl", a);
|
||||
export {
|
||||
e as default
|
||||
a as default
|
||||
};
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
(function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.artplayerI18nRu=t())})(this,(function(){"use strict";const e={"Video Info":"Информация",Close:"Закрыть","Video Load Failed":"Ошибка загрузки видео",Volume:"Громкость",Play:"Играть",Pause:"Пауза",Rate:"Скорость",Mute:"Заглушить","Video Flip":"Развернуть видео",Horizontal:"Горизонтально",Vertical:"Вертикально",Reconnect:"Переподключенине","Show Setting":"Показать настройки","Hide Setting":"Скрыть настройки",Screenshot:"Скриншот","Play Speed":"Скорость воспроизведения","Aspect Ratio":"Соотношение сторон",Default:"По-умолчанию",Normal:"Нормальный",Open:"Открыть","Switch Video":"Переключить видео","Switch Subtitle":"Переключить субтитры",Fullscreen:"Полноэкранный режим","Exit Fullscreen":"Выход из полноэкранного режима","Web Fullscreen":"На все окно браузера","Exit Web Fullscreen":"Выход из режима полного окна","Mini Player":"Мини проигрыватель","PIP Mode":"Картинка в картинке","Exit PIP Mode":"Закрыть картинку в картинке","PIP Not Supported":"Картинка в картинке не поддерживается","Fullscreen Not Supported":"Полноэкранный режим не поддерживается","Subtitle Offset":"Настройка субтитров","Last Seen":"Последнее просмотренное","Jump Play":"Перейти",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay недоступен"};return typeof window<"u"&&(window["artplayer-i18n-ru"]=e),e}));
|
||||
(function(t,e){typeof exports=="object"&&typeof module<"u"?module.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.artplayerI18nRu=e())})(this,(function(){"use strict";function t(i,n){if(typeof window<"u"){const o=window;o[i]=n}}const e={"Video Info":"Информация",Close:"Закрыть","Video Load Failed":"Ошибка загрузки видео",Volume:"Громкость",Play:"Играть",Pause:"Пауза",Rate:"Скорость",Mute:"Заглушить","Video Flip":"Развернуть видео",Horizontal:"Горизонтально",Vertical:"Вертикально",Reconnect:"Переподключенине","Show Setting":"Показать настройки","Hide Setting":"Скрыть настройки",Screenshot:"Скриншот","Play Speed":"Скорость воспроизведения","Aspect Ratio":"Соотношение сторон",Default:"По-умолчанию",Normal:"Нормальный",Open:"Открыть","Switch Video":"Переключить видео","Switch Subtitle":"Переключить субтитры",Fullscreen:"Полноэкранный режим","Exit Fullscreen":"Выход из полноэкранного режима","Web Fullscreen":"На все окно браузера","Exit Web Fullscreen":"Выход из режима полного окна","Mini Player":"Мини проигрыватель","PIP Mode":"Картинка в картинке","Exit PIP Mode":"Закрыть картинку в картинке","PIP Not Supported":"Картинка в картинке не поддерживается","Fullscreen Not Supported":"Полноэкранный режим не поддерживается","Subtitle Offset":"Настройка субтитров","Last Seen":"Последнее просмотренное","Jump Play":"Перейти",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay недоступен"};return t("artplayer-i18n-ru",e),e}));
|
||||
Vendored
+9
-3
@@ -1,4 +1,10 @@
|
||||
const e = {
|
||||
function i(e, t) {
|
||||
if (typeof window < "u") {
|
||||
const l = window;
|
||||
l[e] = t;
|
||||
}
|
||||
}
|
||||
const o = {
|
||||
"Video Info": "Информация",
|
||||
Close: "Закрыть",
|
||||
"Video Load Failed": "Ошибка загрузки видео",
|
||||
@@ -36,7 +42,7 @@ const e = {
|
||||
AirPlay: "AirPlay",
|
||||
"AirPlay Not Available": "AirPlay недоступен"
|
||||
};
|
||||
typeof window < "u" && (window["artplayer-i18n-ru"] = e);
|
||||
i("artplayer-i18n-ru", o);
|
||||
export {
|
||||
e as default
|
||||
o as default
|
||||
};
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
(function(e,a){typeof exports=="object"&&typeof module<"u"?module.exports=a():typeof define=="function"&&define.amd?define(a):(e=typeof globalThis<"u"?globalThis:e||self,e.artplayerI18nTr=a())})(this,(function(){"use strict";const e={"Video Info":"Video Bilgisi",Close:"Kapat","Video Load Failed":"Video Yüklenemedi",Volume:"Ses Seviyesi",Play:"Oynat",Pause:"Duraklat",Rate:"Hız",Mute:"Sessize Al","Video Flip":"Videoyu Çevir",Horizontal:"Yatay",Vertical:"Dikey",Reconnect:"Yeniden Bağlan","Show Setting":"Ayarları Göster","Hide Setting":"Ayarları Gizle",Screenshot:"Ekran Görüntüsü","Play Speed":"Oynatma Hızı","Aspect Ratio":"En Boy Oranı",Default:"Varsayılan",Normal:"Normal",Open:"Aç","Switch Video":"Video Değiştir","Switch Subtitle":"Altyazı Değiştir",Fullscreen:"Tam Ekran","Exit Fullscreen":"Tam Ekrandan Çık","Web Fullscreen":"Web Tam Ekran","Exit Web Fullscreen":"Web Tam Ekranından Çık","Mini Player":"Küçük Oynatıcı","PIP Mode":"PIP Modu","Exit PIP Mode":"PIP Modundan Çık","PIP Not Supported":"PIP Desteklenmiyor","Fullscreen Not Supported":"Tam Ekran Desteklenmiyor","Subtitle Offset":"Altyazı Kaydırma","Last Seen":"Son İzlenen","Jump Play":"Atla ve Oynat",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay Kullanılamıyor"};return typeof window<"u"&&(window["artplayer-i18n-tr"]=e),e}));
|
||||
(function(a,e){typeof exports=="object"&&typeof module<"u"?module.exports=e():typeof define=="function"&&define.amd?define(e):(a=typeof globalThis<"u"?globalThis:a||self,a.artplayerI18nTr=e())})(this,(function(){"use strict";function a(n,i){if(typeof window<"u"){const t=window;t[n]=i}}const e={"Video Info":"Video Bilgisi",Close:"Kapat","Video Load Failed":"Video Yüklenemedi",Volume:"Ses Seviyesi",Play:"Oynat",Pause:"Duraklat",Rate:"Hız",Mute:"Sessize Al","Video Flip":"Videoyu Çevir",Horizontal:"Yatay",Vertical:"Dikey",Reconnect:"Yeniden Bağlan","Show Setting":"Ayarları Göster","Hide Setting":"Ayarları Gizle",Screenshot:"Ekran Görüntüsü","Play Speed":"Oynatma Hızı","Aspect Ratio":"En Boy Oranı",Default:"Varsayılan",Normal:"Normal",Open:"Aç","Switch Video":"Video Değiştir","Switch Subtitle":"Altyazı Değiştir",Fullscreen:"Tam Ekran","Exit Fullscreen":"Tam Ekrandan Çık","Web Fullscreen":"Web Tam Ekran","Exit Web Fullscreen":"Web Tam Ekranından Çık","Mini Player":"Küçük Oynatıcı","PIP Mode":"PIP Modu","Exit PIP Mode":"PIP Modundan Çık","PIP Not Supported":"PIP Desteklenmiyor","Fullscreen Not Supported":"Tam Ekran Desteklenmiyor","Subtitle Offset":"Altyazı Kaydırma","Last Seen":"Son İzlenen","Jump Play":"Atla ve Oynat",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay Kullanılamıyor"};return a("artplayer-i18n-tr",e),e}));
|
||||
Vendored
+9
-3
@@ -1,4 +1,10 @@
|
||||
const e = {
|
||||
function l(e, a) {
|
||||
if (typeof window < "u") {
|
||||
const i = window;
|
||||
i[e] = a;
|
||||
}
|
||||
}
|
||||
const n = {
|
||||
"Video Info": "Video Bilgisi",
|
||||
Close: "Kapat",
|
||||
"Video Load Failed": "Video Yüklenemedi",
|
||||
@@ -36,7 +42,7 @@ const e = {
|
||||
AirPlay: "AirPlay",
|
||||
"AirPlay Not Available": "AirPlay Kullanılamıyor"
|
||||
};
|
||||
typeof window < "u" && (window["artplayer-i18n-tr"] = e);
|
||||
l("artplayer-i18n-tr", n);
|
||||
export {
|
||||
e as default
|
||||
n as default
|
||||
};
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
(function(n,e){typeof exports=="object"&&typeof module<"u"?module.exports=e():typeof define=="function"&&define.amd?define(e):(n=typeof globalThis<"u"?globalThis:n||self,n.artplayerI18nVi=e())})(this,(function(){"use strict";const n={"Video Info":"Thông tin video",Close:"Đóng","Video Load Failed":"Tải video thất bại",Volume:"Âm lượng",Play:"Phát",Pause:"Tạm dừng",Rate:"Tốc độ",Mute:"Tắt tiếng","Video Flip":"Lật video",Horizontal:"Ngang",Vertical:"Dọc",Reconnect:"Kết nối lại","Show Setting":"Cài đặt","Hide Setting":"Ẩn cài đặt",Screenshot:"Chụp màn hình","Play Speed":"Tốc độ phát","Aspect Ratio":"Tỷ lệ khung hình",Default:"Mặc định",Normal:"Bình thường",Open:"Mở","Switch Video":"Chuyển video","Switch Subtitle":"Chuyển phụ đề",Fullscreen:"Toàn màn hình","Exit Fullscreen":"Thoát toàn màn hình","Web Fullscreen":"Toàn màn hình trình duyệt","Exit Web Fullscreen":"Thoát toàn màn hình trình duyệt","Mini Player":"Trình phát mini","PIP Mode":"Phát trong hình","Exit PIP Mode":"Thoát phát trong hình","PIP Not Supported":"Không hỗ trợ phát trong hình","Fullscreen Not Supported":"Không hỗ trợ toàn màn hình","Subtitle Offset":"Độ trễ phụ đề","Last Seen":"Lần xem cuối","Jump Play":"Nhảy đến đoạn phát",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay không khả dụng"};return typeof window<"u"&&(window["artplayer-i18n-vi"]=n),n}));
|
||||
(function(t,n){typeof exports=="object"&&typeof module<"u"?module.exports=n():typeof define=="function"&&define.amd?define(n):(t=typeof globalThis<"u"?globalThis:t||self,t.artplayerI18nVi=n())})(this,(function(){"use strict";function t(e,i){if(typeof window<"u"){const h=window;h[e]=i}}const n={"Video Info":"Thông tin video",Close:"Đóng","Video Load Failed":"Tải video thất bại",Volume:"Âm lượng",Play:"Phát",Pause:"Tạm dừng",Rate:"Tốc độ",Mute:"Tắt tiếng","Video Flip":"Lật video",Horizontal:"Ngang",Vertical:"Dọc",Reconnect:"Kết nối lại","Show Setting":"Cài đặt","Hide Setting":"Ẩn cài đặt",Screenshot:"Chụp màn hình","Play Speed":"Tốc độ phát","Aspect Ratio":"Tỷ lệ khung hình",Default:"Mặc định",Normal:"Bình thường",Open:"Mở","Switch Video":"Chuyển video","Switch Subtitle":"Chuyển phụ đề",Fullscreen:"Toàn màn hình","Exit Fullscreen":"Thoát toàn màn hình","Web Fullscreen":"Toàn màn hình trình duyệt","Exit Web Fullscreen":"Thoát toàn màn hình trình duyệt","Mini Player":"Trình phát mini","PIP Mode":"Phát trong hình","Exit PIP Mode":"Thoát phát trong hình","PIP Not Supported":"Không hỗ trợ phát trong hình","Fullscreen Not Supported":"Không hỗ trợ toàn màn hình","Subtitle Offset":"Độ trễ phụ đề","Last Seen":"Lần xem cuối","Jump Play":"Nhảy đến đoạn phát",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay không khả dụng"};return t("artplayer-i18n-vi",n),n}));
|
||||
Vendored
+9
-3
@@ -1,4 +1,10 @@
|
||||
const n = {
|
||||
function h(n, t) {
|
||||
if (typeof window < "u") {
|
||||
const e = window;
|
||||
e[n] = t;
|
||||
}
|
||||
}
|
||||
const i = {
|
||||
"Video Info": "Thông tin video",
|
||||
Close: "Đóng",
|
||||
"Video Load Failed": "Tải video thất bại",
|
||||
@@ -36,7 +42,7 @@ const n = {
|
||||
AirPlay: "AirPlay",
|
||||
"AirPlay Not Available": "AirPlay không khả dụng"
|
||||
};
|
||||
typeof window < "u" && (window["artplayer-i18n-vi"] = n);
|
||||
h("artplayer-i18n-vi", i);
|
||||
export {
|
||||
n as default
|
||||
i as default
|
||||
};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
(function(e,t){typeof exports=="object"&&typeof module<"u"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.artplayerI18nZhTw=t())})(this,(function(){"use strict";const e={"Video Info":"統計訊息",Close:"關閉","Video Load Failed":"載入失敗",Volume:"音量",Play:"播放",Pause:"暫停",Rate:"速度",Mute:"靜音","Video Flip":"畫面翻轉",Horizontal:"水平",Vertical:"垂直",Reconnect:"重新連接","Show Setting":"顯示设置","Hide Setting":"隱藏设置",Screenshot:"截圖","Play Speed":"播放速度","Aspect Ratio":"畫面比例",Default:"默認",Normal:"正常",Open:"打開","Switch Video":"切換","Switch Subtitle":"切換字幕",Fullscreen:"全屏","Exit Fullscreen":"退出全屏","Web Fullscreen":"網頁全屏","Exit Web Fullscreen":"退出網頁全屏","Mini Player":"迷你播放器","PIP Mode":"開啟畫中畫","Exit PIP Mode":"退出畫中畫","PIP Not Supported":"不支持畫中畫","Fullscreen Not Supported":"不支持全屏","Subtitle Offset":"字幕偏移","Last Seen":"上次看到","Jump Play":"跳轉播放",AirPlay:"隔空播放","AirPlay Not Available":"隔空播放不可用"};return typeof window<"u"&&(window["artplayer-i18n-zh-tw"]=e),e}));
|
||||
(function(t,e){typeof exports=="object"&&typeof module<"u"?module.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self,t.artplayerI18nZhTw=e())})(this,(function(){"use strict";function t(i,n){if(typeof window<"u"){const o=window;o[i]=n}}const e={"Video Info":"統計訊息",Close:"關閉","Video Load Failed":"載入失敗",Volume:"音量",Play:"播放",Pause:"暫停",Rate:"速度",Mute:"靜音","Video Flip":"畫面翻轉",Horizontal:"水平",Vertical:"垂直",Reconnect:"重新連接","Show Setting":"顯示设置","Hide Setting":"隱藏设置",Screenshot:"截圖","Play Speed":"播放速度","Aspect Ratio":"畫面比例",Default:"默認",Normal:"正常",Open:"打開","Switch Video":"切換","Switch Subtitle":"切換字幕",Fullscreen:"全屏","Exit Fullscreen":"退出全屏","Web Fullscreen":"網頁全屏","Exit Web Fullscreen":"退出網頁全屏","Mini Player":"迷你播放器","PIP Mode":"開啟畫中畫","Exit PIP Mode":"退出畫中畫","PIP Not Supported":"不支持畫中畫","Fullscreen Not Supported":"不支持全屏","Subtitle Offset":"字幕偏移","Last Seen":"上次看到","Jump Play":"跳轉播放",AirPlay:"隔空播放","AirPlay Not Available":"隔空播放不可用"};return t("artplayer-i18n-zh-tw",e),e}));
|
||||
+9
-3
@@ -1,4 +1,10 @@
|
||||
const e = {
|
||||
function i(e, t) {
|
||||
if (typeof window < "u") {
|
||||
const l = window;
|
||||
l[e] = t;
|
||||
}
|
||||
}
|
||||
const o = {
|
||||
"Video Info": "統計訊息",
|
||||
Close: "關閉",
|
||||
"Video Load Failed": "載入失敗",
|
||||
@@ -36,7 +42,7 @@ const e = {
|
||||
AirPlay: "隔空播放",
|
||||
"AirPlay Not Available": "隔空播放不可用"
|
||||
};
|
||||
typeof window < "u" && (window["artplayer-i18n-zh-tw"] = e);
|
||||
i("artplayer-i18n-zh-tw", o);
|
||||
export {
|
||||
e as default
|
||||
o as default
|
||||
};
|
||||
@@ -1,3 +1,6 @@
|
||||
import type { Dictionary } from './publish'
|
||||
import { publishLanguage } from './publish'
|
||||
|
||||
const ar = {
|
||||
'Video Info': 'معلومات الفيديو',
|
||||
'Close': 'إغلاق',
|
||||
@@ -35,10 +38,8 @@ const ar = {
|
||||
'Jump Play': 'التشغيل القافز',
|
||||
'AirPlay': 'AirPlay',
|
||||
'AirPlay Not Available': 'AirPlay غير متاح',
|
||||
}
|
||||
} satisfies Dictionary
|
||||
|
||||
export default ar
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
window['artplayer-i18n-ar'] = ar
|
||||
}
|
||||
publishLanguage('artplayer-i18n-ar', ar)
|
||||
@@ -1,3 +1,6 @@
|
||||
import type { Dictionary } from './publish'
|
||||
import { publishLanguage } from './publish'
|
||||
|
||||
const cs = {
|
||||
'Video Info': 'Info o videu',
|
||||
'Close': 'Zavřít',
|
||||
@@ -35,10 +38,8 @@ const cs = {
|
||||
'Jump Play': 'Hra na skok',
|
||||
'AirPlay': 'AirPlay',
|
||||
'AirPlay Not Available': 'AirPlay není k dispozici',
|
||||
}
|
||||
} satisfies Dictionary
|
||||
|
||||
export default cs
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
window['artplayer-i18n-cs'] = cs
|
||||
}
|
||||
publishLanguage('artplayer-i18n-cs', cs)
|
||||
@@ -1,3 +1,6 @@
|
||||
import type { Dictionary } from './publish'
|
||||
import { publishLanguage } from './publish'
|
||||
|
||||
const es = {
|
||||
'Video Info': 'Información del video',
|
||||
'Close': 'Cerrar',
|
||||
@@ -35,10 +38,8 @@ const es = {
|
||||
'Jump Play': 'Saltar',
|
||||
'AirPlay': 'AirPlay',
|
||||
'AirPlay Not Available': 'AirPlay no disponible',
|
||||
}
|
||||
} satisfies Dictionary
|
||||
|
||||
export default es
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
window['artplayer-i18n-es'] = es
|
||||
}
|
||||
publishLanguage('artplayer-i18n-es', es)
|
||||
@@ -1,3 +1,6 @@
|
||||
import type { Dictionary } from './publish'
|
||||
import { publishLanguage } from './publish'
|
||||
|
||||
const fa = {
|
||||
'Video Info': 'اطلاعات ویدیو',
|
||||
'Close': 'بستن',
|
||||
@@ -35,10 +38,8 @@ const fa = {
|
||||
'Jump Play': 'جامپ پلی',
|
||||
'AirPlay': 'ایر پلی',
|
||||
'AirPlay Not Available': 'عدم پشتیبانی از ایرپلی',
|
||||
}
|
||||
} satisfies Dictionary
|
||||
|
||||
export default fa
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
window['artplayer-i18n-fa'] = fa
|
||||
}
|
||||
publishLanguage('artplayer-i18n-fa', fa)
|
||||
@@ -1,3 +1,6 @@
|
||||
import type { Dictionary } from './publish'
|
||||
import { publishLanguage } from './publish'
|
||||
|
||||
const fr = {
|
||||
'Video Info': 'Informations de la vidéo',
|
||||
'Close': 'Fermer',
|
||||
@@ -35,10 +38,8 @@ const fr = {
|
||||
'Jump Play': 'Continuer',
|
||||
'AirPlay': 'AirPlay',
|
||||
'AirPlay Not Available': 'AirPlay non disponible',
|
||||
}
|
||||
} satisfies Dictionary
|
||||
|
||||
export default fr
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
window['artplayer-i18n-fr'] = fr
|
||||
}
|
||||
publishLanguage('artplayer-i18n-fr', fr)
|
||||
@@ -1,3 +1,6 @@
|
||||
import type { Dictionary } from './publish'
|
||||
import { publishLanguage } from './publish'
|
||||
|
||||
const id = {
|
||||
'Video Info': 'Informasi Video',
|
||||
'Close': 'Tutup',
|
||||
@@ -35,10 +38,8 @@ const id = {
|
||||
'Jump Play': 'Lompat Putar',
|
||||
'AirPlay': 'AirPlay',
|
||||
'AirPlay Not Available': 'AirPlay Tidak Tersedia',
|
||||
}
|
||||
} satisfies Dictionary
|
||||
|
||||
export default id
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
window['artplayer-i18n-id'] = id
|
||||
}
|
||||
publishLanguage('artplayer-i18n-id', id)
|
||||
@@ -1,30 +0,0 @@
|
||||
import { mergeDeep } from '../utils'
|
||||
import zhCn from './zh-cn'
|
||||
|
||||
export default class I18n {
|
||||
constructor(art) {
|
||||
this.art = art
|
||||
|
||||
this.languages = {
|
||||
'zh-cn': zhCn,
|
||||
}
|
||||
|
||||
this.language = {}
|
||||
|
||||
this.update(art.option.i18n)
|
||||
}
|
||||
|
||||
init() {
|
||||
const lang = this.art.option.lang.toLowerCase()
|
||||
this.language = this.languages[lang] || {}
|
||||
}
|
||||
|
||||
get(key) {
|
||||
return this.language[key] || key
|
||||
}
|
||||
|
||||
update(value) {
|
||||
this.languages = mergeDeep(this.languages, value)
|
||||
this.init()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import type { Dictionary, Languages } from './publish'
|
||||
import { has, mergeDeep } from '../utils/property'
|
||||
import zhCn from './zh-cn'
|
||||
|
||||
export interface I18nHost {
|
||||
option: { lang: string, i18n: Languages }
|
||||
}
|
||||
|
||||
export default class I18n {
|
||||
declare art: I18nHost
|
||||
declare languages: Languages
|
||||
declare language: Dictionary
|
||||
|
||||
constructor(art: I18nHost) {
|
||||
this.art = art
|
||||
this.languages = { 'zh-cn': zhCn }
|
||||
this.language = {}
|
||||
this.update(art.option.i18n)
|
||||
}
|
||||
|
||||
init(): void {
|
||||
const lang = this.art.option.lang.toLowerCase()
|
||||
this.language = (has(this.languages, lang) && this.languages[lang]) || {}
|
||||
}
|
||||
|
||||
get(key: string): string {
|
||||
return (has(this.language, key) && this.language[key]) || key
|
||||
}
|
||||
|
||||
update(value: Languages): void {
|
||||
this.languages = mergeDeep(this.languages, value)
|
||||
this.init()
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,6 @@
|
||||
import type { Dictionary } from './publish'
|
||||
import { publishLanguage } from './publish'
|
||||
|
||||
const pl = {
|
||||
'Video Info': 'Informacje o wideo',
|
||||
'Close': 'Zamknij',
|
||||
@@ -35,10 +38,8 @@ const pl = {
|
||||
'Jump Play': 'Skocz do gry',
|
||||
'AirPlay': 'AirPlay',
|
||||
'AirPlay Not Available': 'AirPlay nie jest dostępny',
|
||||
}
|
||||
} satisfies Dictionary
|
||||
|
||||
export default pl
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
window['artplayer-i18n-pl'] = pl
|
||||
}
|
||||
publishLanguage('artplayer-i18n-pl', pl)
|
||||
@@ -0,0 +1,12 @@
|
||||
export type Dictionary = Record<string, string | undefined>
|
||||
export type Languages = Record<string, Dictionary | undefined>
|
||||
|
||||
type LanguageGlobal = 'artplayer-i18n-ar' | 'artplayer-i18n-cs' | 'artplayer-i18n-es' | 'artplayer-i18n-fa' | 'artplayer-i18n-fr' | 'artplayer-i18n-id' | 'artplayer-i18n-pl' | 'artplayer-i18n-ru' | 'artplayer-i18n-tr' | 'artplayer-i18n-vi' | 'artplayer-i18n-zh-cn' | 'artplayer-i18n-zh-tw'
|
||||
|
||||
// Each standalone language keeps its historical browser alias, including ESM.
|
||||
export function publishLanguage(name: LanguageGlobal, value: Dictionary): void {
|
||||
if (typeof window !== 'undefined') {
|
||||
const globals = window as Window & Partial<Record<LanguageGlobal, Dictionary>>
|
||||
globals[name] = value
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,6 @@
|
||||
import type { Dictionary } from './publish'
|
||||
import { publishLanguage } from './publish'
|
||||
|
||||
const ru = {
|
||||
'Video Info': 'Информация',
|
||||
'Close': 'Закрыть',
|
||||
@@ -35,10 +38,8 @@ const ru = {
|
||||
'Jump Play': 'Перейти',
|
||||
'AirPlay': 'AirPlay',
|
||||
'AirPlay Not Available': 'AirPlay недоступен',
|
||||
}
|
||||
} satisfies Dictionary
|
||||
|
||||
export default ru
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
window['artplayer-i18n-ru'] = ru
|
||||
}
|
||||
publishLanguage('artplayer-i18n-ru', ru)
|
||||
@@ -1,3 +1,6 @@
|
||||
import type { Dictionary } from './publish'
|
||||
import { publishLanguage } from './publish'
|
||||
|
||||
const tr = {
|
||||
'Video Info': 'Video Bilgisi',
|
||||
'Close': 'Kapat',
|
||||
@@ -35,10 +38,8 @@ const tr = {
|
||||
'Jump Play': 'Atla ve Oynat',
|
||||
'AirPlay': 'AirPlay',
|
||||
'AirPlay Not Available': 'AirPlay Kullanılamıyor',
|
||||
}
|
||||
} satisfies Dictionary
|
||||
|
||||
export default tr
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
window['artplayer-i18n-tr'] = tr
|
||||
}
|
||||
publishLanguage('artplayer-i18n-tr', tr)
|
||||
@@ -1,3 +1,6 @@
|
||||
import type { Dictionary } from './publish'
|
||||
import { publishLanguage } from './publish'
|
||||
|
||||
const vi = {
|
||||
'Video Info': 'Thông tin video',
|
||||
'Close': 'Đóng',
|
||||
@@ -35,10 +38,8 @@ const vi = {
|
||||
'Jump Play': 'Nhảy đến đoạn phát',
|
||||
'AirPlay': 'AirPlay',
|
||||
'AirPlay Not Available': 'AirPlay không khả dụng',
|
||||
}
|
||||
} satisfies Dictionary
|
||||
|
||||
export default vi
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
window['artplayer-i18n-vi'] = vi
|
||||
}
|
||||
publishLanguage('artplayer-i18n-vi', vi)
|
||||
@@ -1,3 +1,6 @@
|
||||
import type { Dictionary } from './publish'
|
||||
import { publishLanguage } from './publish'
|
||||
|
||||
const zhCn = {
|
||||
'Video Info': '统计信息',
|
||||
'Close': '关闭',
|
||||
@@ -35,10 +38,8 @@ const zhCn = {
|
||||
'Jump Play': '跳转播放',
|
||||
'AirPlay': '隔空播放',
|
||||
'AirPlay Not Available': '隔空播放不可用',
|
||||
}
|
||||
} satisfies Dictionary
|
||||
|
||||
export default zhCn
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
window['artplayer-i18n-zh-cn'] = zhCn
|
||||
}
|
||||
publishLanguage('artplayer-i18n-zh-cn', zhCn)
|
||||
@@ -1,3 +1,6 @@
|
||||
import type { Dictionary } from './publish'
|
||||
import { publishLanguage } from './publish'
|
||||
|
||||
const zhTw = {
|
||||
'Video Info': '統計訊息',
|
||||
'Close': '關閉',
|
||||
@@ -35,10 +38,8 @@ const zhTw = {
|
||||
'Jump Play': '跳轉播放',
|
||||
'AirPlay': '隔空播放',
|
||||
'AirPlay Not Available': '隔空播放不可用',
|
||||
}
|
||||
} satisfies Dictionary
|
||||
|
||||
export default zhTw
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
window['artplayer-i18n-zh-tw'] = zhTw
|
||||
}
|
||||
publishLanguage('artplayer-i18n-zh-tw', zhTw)
|
||||
@@ -1,4 +1,3 @@
|
||||
import { def, getIcon } from '../utils'
|
||||
import airplay from './airplay.svg?raw'
|
||||
import arrowLeft from './arrow-left.svg?raw'
|
||||
import arrowRight from './arrow-right.svg?raw'
|
||||
@@ -27,43 +26,32 @@ import unlock from './unlock.svg?raw'
|
||||
import volumeClose from './volume-close.svg?raw'
|
||||
import volume from './volume.svg?raw'
|
||||
|
||||
export default class Icons {
|
||||
constructor(art) {
|
||||
const icons = {
|
||||
loading,
|
||||
state,
|
||||
play,
|
||||
pause,
|
||||
check,
|
||||
volume,
|
||||
volumeClose,
|
||||
screenshot,
|
||||
setting,
|
||||
pip,
|
||||
arrowLeft,
|
||||
arrowRight,
|
||||
playbackRate,
|
||||
aspectRatio,
|
||||
config,
|
||||
lock,
|
||||
flip,
|
||||
unlock,
|
||||
fullscreenOff,
|
||||
fullscreenOn,
|
||||
fullscreenWebOff,
|
||||
fullscreenWebOn,
|
||||
switchOn,
|
||||
switchOff,
|
||||
error,
|
||||
close,
|
||||
airplay,
|
||||
...art.option.icons,
|
||||
}
|
||||
|
||||
for (const key in icons) {
|
||||
def(this, key, {
|
||||
get: () => getIcon(key, icons[key]),
|
||||
})
|
||||
}
|
||||
}
|
||||
export default {
|
||||
loading,
|
||||
state,
|
||||
play,
|
||||
pause,
|
||||
check,
|
||||
volume,
|
||||
volumeClose,
|
||||
screenshot,
|
||||
setting,
|
||||
pip,
|
||||
arrowLeft,
|
||||
arrowRight,
|
||||
playbackRate,
|
||||
aspectRatio,
|
||||
config,
|
||||
lock,
|
||||
flip,
|
||||
unlock,
|
||||
fullscreenOff,
|
||||
fullscreenOn,
|
||||
fullscreenWebOff,
|
||||
fullscreenWebOn,
|
||||
switchOn,
|
||||
switchOff,
|
||||
error,
|
||||
close,
|
||||
airplay,
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import { def, getIcon } from '../utils'
|
||||
import defaults from './defaults'
|
||||
|
||||
export default class Icons {
|
||||
readonly [key: string]: HTMLElement
|
||||
|
||||
constructor(art: { option: { icons: Record<string, string | HTMLElement> } }) {
|
||||
const icons: Record<string, string | HTMLElement | undefined> = { ...defaults, ...art.option.icons }
|
||||
for (const key in icons) {
|
||||
def(this, key, {
|
||||
get: (): HTMLElement => getIcon(key, icons[key]),
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@ import Plugins from './plugins'
|
||||
import scheme from './scheme'
|
||||
import Setting from './setting'
|
||||
import Storage from './storage'
|
||||
import style from './style/index.less?inline'
|
||||
import style from './style'
|
||||
import Subtitle from './subtitle'
|
||||
import Template from './template'
|
||||
import * as utils from './utils'
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
import css from './index.less?inline'
|
||||
|
||||
export default css
|
||||
@@ -0,0 +1,16 @@
|
||||
export function setStyleText(id: string, style: string): void {
|
||||
let $style = document.getElementById(id)
|
||||
if (!$style) {
|
||||
$style = document.createElement('style')
|
||||
$style.id = id
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
document.head.appendChild($style!)
|
||||
})
|
||||
}
|
||||
else {
|
||||
(document.head || document.documentElement).appendChild($style)
|
||||
}
|
||||
}
|
||||
$style.textContent = style
|
||||
}
|
||||
@@ -1,160 +0,0 @@
|
||||
import { version } from '../package.json'
|
||||
import { ownContainer } from './lifecycle/instance'
|
||||
import captureTemplate from './lifecycle/template-rollback'
|
||||
import { addClass, errorHandle, isMobile, query, replaceElement, supportsFlex } from './utils'
|
||||
|
||||
export default class Template {
|
||||
constructor(art) {
|
||||
this.art = art
|
||||
const { option, constructor } = art
|
||||
|
||||
if (option.container instanceof Element) {
|
||||
this.$container = option.container
|
||||
}
|
||||
else {
|
||||
this.$container = query(option.container)
|
||||
errorHandle(this.$container, `No container element found by ${option.container}`)
|
||||
}
|
||||
|
||||
errorHandle(supportsFlex(), 'The current browser does not support flex layout')
|
||||
|
||||
const type = this.$container.tagName.toLowerCase()
|
||||
errorHandle(type === 'div', `Unsupported container element type, only support 'div' but got '${type}'`)
|
||||
|
||||
errorHandle(
|
||||
constructor.instances.every(ins => ins.template.$container !== this.$container),
|
||||
'Cannot mount multiple instances on the same dom element',
|
||||
)
|
||||
|
||||
this.query = this.query.bind(this)
|
||||
ownContainer(art, this.$container, captureTemplate(this.$container))
|
||||
this.$container.dataset.artId = art.id
|
||||
this.init()
|
||||
}
|
||||
|
||||
static get html() {
|
||||
return `
|
||||
<div class="art-video-player art-subtitle-show art-layer-show art-control-show art-mask-show">
|
||||
<video class="art-video">
|
||||
<track default kind="metadata" src=""></track>
|
||||
</video>
|
||||
<div class="art-poster"></div>
|
||||
<div class="art-subtitle"></div>
|
||||
<div class="art-danmuku"></div>
|
||||
<div class="art-layers"></div>
|
||||
<div class="art-mask">
|
||||
<div class="art-state"></div>
|
||||
</div>
|
||||
<div class="art-bottom">
|
||||
<div class="art-progress"></div>
|
||||
<div class="art-controls">
|
||||
<div class="art-controls-left"></div>
|
||||
<div class="art-controls-center"></div>
|
||||
<div class="art-controls-right"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="art-loading"></div>
|
||||
<div class="art-notice">
|
||||
<div class="art-notice-inner"></div>
|
||||
</div>
|
||||
<div class="art-settings"></div>
|
||||
<div class="art-info">
|
||||
<div class="art-info-panel">
|
||||
<div class="art-info-item">
|
||||
<div class="art-info-title">Player version:</div>
|
||||
<div class="art-info-content">${version}</div>
|
||||
</div>
|
||||
<div class="art-info-item">
|
||||
<div class="art-info-title">Video url:</div>
|
||||
<div class="art-info-content" data-video="currentSrc"></div>
|
||||
</div>
|
||||
<div class="art-info-item">
|
||||
<div class="art-info-title">Video volume:</div>
|
||||
<div class="art-info-content" data-video="volume"></div>
|
||||
</div>
|
||||
<div class="art-info-item">
|
||||
<div class="art-info-title">Video time:</div>
|
||||
<div class="art-info-content" data-video="currentTime"></div>
|
||||
</div>
|
||||
<div class="art-info-item">
|
||||
<div class="art-info-title">Video duration:</div>
|
||||
<div class="art-info-content" data-video="duration"></div>
|
||||
</div>
|
||||
<div class="art-info-item">
|
||||
<div class="art-info-title">Video resolution:</div>
|
||||
<div class="art-info-content">
|
||||
<span data-video="videoWidth"></span> x <span data-video="videoHeight"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="art-info-close">[x]</div>
|
||||
</div>
|
||||
<div class="art-contextmenus"></div>
|
||||
</div>
|
||||
`
|
||||
}
|
||||
|
||||
query(className) {
|
||||
return query(className, this.$container)
|
||||
}
|
||||
|
||||
init() {
|
||||
const { option } = this.art
|
||||
|
||||
if (!option.useSSR) {
|
||||
this.$container.innerHTML = Template.html
|
||||
}
|
||||
|
||||
this.$player = this.query('.art-video-player')
|
||||
this.$video = this.query('.art-video')
|
||||
this.$track = this.query('track')
|
||||
this.$poster = this.query('.art-poster')
|
||||
this.$subtitle = this.query('.art-subtitle')
|
||||
this.$danmuku = this.query('.art-danmuku')
|
||||
this.$bottom = this.query('.art-bottom')
|
||||
this.$progress = this.query('.art-progress')
|
||||
this.$controls = this.query('.art-controls')
|
||||
this.$controlsLeft = this.query('.art-controls-left')
|
||||
this.$controlsCenter = this.query('.art-controls-center')
|
||||
this.$controlsRight = this.query('.art-controls-right')
|
||||
this.$layer = this.query('.art-layers')
|
||||
this.$loading = this.query('.art-loading')
|
||||
this.$notice = this.query('.art-notice')
|
||||
this.$noticeInner = this.query('.art-notice-inner')
|
||||
this.$mask = this.query('.art-mask')
|
||||
this.$state = this.query('.art-state')
|
||||
this.$setting = this.query('.art-settings')
|
||||
this.$info = this.query('.art-info')
|
||||
this.$infoPanel = this.query('.art-info-panel')
|
||||
this.$infoClose = this.query('.art-info-close')
|
||||
this.$contextmenu = this.query('.art-contextmenus')
|
||||
|
||||
if (option.proxy) {
|
||||
const video = option.proxy.call(this.art, this.art)
|
||||
errorHandle(
|
||||
video instanceof HTMLVideoElement || video instanceof HTMLCanvasElement,
|
||||
`Function 'option.proxy' needs to return 'HTMLVideoElement' or 'HTMLCanvasElement'`,
|
||||
)
|
||||
replaceElement(video, this.$video)
|
||||
video.className = 'art-video'
|
||||
this.$video = video
|
||||
}
|
||||
|
||||
if (option.backdrop) {
|
||||
addClass(this.$player, 'art-backdrop')
|
||||
}
|
||||
|
||||
if (isMobile) {
|
||||
addClass(this.$player, 'art-mobile')
|
||||
}
|
||||
}
|
||||
|
||||
destroy(removeHtml) {
|
||||
if (removeHtml) {
|
||||
this.$container.innerHTML = ''
|
||||
}
|
||||
else {
|
||||
addClass(this.$player, 'art-destroy')
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
import type { TemplateHost, TemplateNodes } from './template/types'
|
||||
import { ownContainer } from './lifecycle/instance'
|
||||
import captureTemplate from './lifecycle/template-rollback'
|
||||
import html from './template/html'
|
||||
import bindNodes from './template/nodes'
|
||||
import { addClass, errorHandle, isMobile, query, replaceElement, supportsFlex } from './utils'
|
||||
|
||||
export default class Template<Host extends TemplateHost<Host>> implements TemplateNodes {
|
||||
declare art: Host
|
||||
declare $container: HTMLDivElement
|
||||
declare $player: HTMLDivElement | null
|
||||
declare $video: HTMLVideoElement | HTMLCanvasElement | null
|
||||
declare $track: HTMLTrackElement | null
|
||||
declare $poster: HTMLDivElement | null
|
||||
declare $subtitle: HTMLDivElement | null
|
||||
declare $danmuku: HTMLDivElement | null
|
||||
declare $bottom: HTMLDivElement | null
|
||||
declare $progress: HTMLDivElement | null
|
||||
declare $controls: HTMLDivElement | null
|
||||
declare $controlsLeft: HTMLDivElement | null
|
||||
declare $controlsCenter: HTMLDivElement | null
|
||||
declare $controlsRight: HTMLDivElement | null
|
||||
declare $layer: HTMLDivElement | null
|
||||
declare $loading: HTMLDivElement | null
|
||||
declare $notice: HTMLDivElement | null
|
||||
declare $noticeInner: HTMLDivElement | null
|
||||
declare $mask: HTMLDivElement | null
|
||||
declare $state: HTMLDivElement | null
|
||||
declare $setting: HTMLDivElement | null
|
||||
declare $info: HTMLDivElement | null
|
||||
declare $infoPanel: HTMLDivElement | null
|
||||
declare $infoClose: HTMLDivElement | null
|
||||
declare $contextmenu: HTMLDivElement | null
|
||||
|
||||
constructor(art: Host) {
|
||||
this.art = art
|
||||
const { option, constructor } = art
|
||||
|
||||
if (option.container instanceof Element) {
|
||||
this.$container = option.container as HTMLDivElement
|
||||
}
|
||||
else {
|
||||
this.$container = query(option.container) as HTMLDivElement
|
||||
errorHandle(this.$container, `No container element found by ${option.container}`)
|
||||
}
|
||||
|
||||
errorHandle(supportsFlex(), 'The current browser does not support flex layout')
|
||||
|
||||
const type = this.$container.tagName.toLowerCase()
|
||||
errorHandle(type === 'div', `Unsupported container element type, only support 'div' but got '${type}'`)
|
||||
|
||||
errorHandle(
|
||||
constructor.instances.every(ins => ins.template.$container !== this.$container),
|
||||
'Cannot mount multiple instances on the same dom element',
|
||||
)
|
||||
|
||||
this.query = this.query.bind(this)
|
||||
ownContainer(art, this.$container, captureTemplate(this.$container))
|
||||
this.$container.dataset.artId = String(art.id)
|
||||
this.init()
|
||||
}
|
||||
|
||||
static get html(): string {
|
||||
return html
|
||||
}
|
||||
|
||||
query<T extends Element = Element>(className: string): T | null {
|
||||
return query(className, this.$container) as T | null
|
||||
}
|
||||
|
||||
init(): void {
|
||||
const { option } = this.art
|
||||
|
||||
if (!option.useSSR) {
|
||||
this.$container.innerHTML = Template.html
|
||||
}
|
||||
|
||||
bindNodes(this)
|
||||
|
||||
if (option.proxy) {
|
||||
const video = option.proxy.call(this.art, this.art)
|
||||
assertProxy(video)
|
||||
replaceElement(video, this.$video)
|
||||
video.className = 'art-video'
|
||||
this.$video = video
|
||||
}
|
||||
|
||||
if (option.backdrop) {
|
||||
addClass(this.$player, 'art-backdrop')
|
||||
}
|
||||
|
||||
if (isMobile) {
|
||||
addClass(this.$player, 'art-mobile')
|
||||
}
|
||||
}
|
||||
|
||||
destroy(removeHtml: boolean): void {
|
||||
if (removeHtml) {
|
||||
this.$container.innerHTML = ''
|
||||
}
|
||||
else {
|
||||
addClass(this.$player, 'art-destroy')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function assertProxy(video: unknown): asserts video is HTMLVideoElement | HTMLCanvasElement {
|
||||
errorHandle(
|
||||
video instanceof HTMLVideoElement || video instanceof HTMLCanvasElement,
|
||||
'Function \'option.proxy\' needs to return \'HTMLVideoElement\' or \'HTMLCanvasElement\'',
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
import { version } from '../../package.json'
|
||||
|
||||
export default `
|
||||
<div class="art-video-player art-subtitle-show art-layer-show art-control-show art-mask-show">
|
||||
<video class="art-video">
|
||||
<track default kind="metadata" src=""></track>
|
||||
</video>
|
||||
<div class="art-poster"></div>
|
||||
<div class="art-subtitle"></div>
|
||||
<div class="art-danmuku"></div>
|
||||
<div class="art-layers"></div>
|
||||
<div class="art-mask">
|
||||
<div class="art-state"></div>
|
||||
</div>
|
||||
<div class="art-bottom">
|
||||
<div class="art-progress"></div>
|
||||
<div class="art-controls">
|
||||
<div class="art-controls-left"></div>
|
||||
<div class="art-controls-center"></div>
|
||||
<div class="art-controls-right"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="art-loading"></div>
|
||||
<div class="art-notice">
|
||||
<div class="art-notice-inner"></div>
|
||||
</div>
|
||||
<div class="art-settings"></div>
|
||||
<div class="art-info">
|
||||
<div class="art-info-panel">
|
||||
<div class="art-info-item">
|
||||
<div class="art-info-title">Player version:</div>
|
||||
<div class="art-info-content">${version}</div>
|
||||
</div>
|
||||
<div class="art-info-item">
|
||||
<div class="art-info-title">Video url:</div>
|
||||
<div class="art-info-content" data-video="currentSrc"></div>
|
||||
</div>
|
||||
<div class="art-info-item">
|
||||
<div class="art-info-title">Video volume:</div>
|
||||
<div class="art-info-content" data-video="volume"></div>
|
||||
</div>
|
||||
<div class="art-info-item">
|
||||
<div class="art-info-title">Video time:</div>
|
||||
<div class="art-info-content" data-video="currentTime"></div>
|
||||
</div>
|
||||
<div class="art-info-item">
|
||||
<div class="art-info-title">Video duration:</div>
|
||||
<div class="art-info-content" data-video="duration"></div>
|
||||
</div>
|
||||
<div class="art-info-item">
|
||||
<div class="art-info-title">Video resolution:</div>
|
||||
<div class="art-info-content">
|
||||
<span data-video="videoWidth"></span> x <span data-video="videoHeight"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="art-info-close">[x]</div>
|
||||
</div>
|
||||
<div class="art-contextmenus"></div>
|
||||
</div>
|
||||
`
|
||||
@@ -0,0 +1,27 @@
|
||||
import type { TemplateNodes } from './types'
|
||||
|
||||
export default function bindNodes(target: TemplateNodes & { query: <T extends Element = Element>(selector: string) => T | null }): void {
|
||||
target.$player = target.query<HTMLDivElement>('.art-video-player')
|
||||
target.$video = target.query<HTMLVideoElement>('.art-video')
|
||||
target.$track = target.query<HTMLTrackElement>('track')
|
||||
target.$poster = target.query<HTMLDivElement>('.art-poster')
|
||||
target.$subtitle = target.query<HTMLDivElement>('.art-subtitle')
|
||||
target.$danmuku = target.query<HTMLDivElement>('.art-danmuku')
|
||||
target.$bottom = target.query<HTMLDivElement>('.art-bottom')
|
||||
target.$progress = target.query<HTMLDivElement>('.art-progress')
|
||||
target.$controls = target.query<HTMLDivElement>('.art-controls')
|
||||
target.$controlsLeft = target.query<HTMLDivElement>('.art-controls-left')
|
||||
target.$controlsCenter = target.query<HTMLDivElement>('.art-controls-center')
|
||||
target.$controlsRight = target.query<HTMLDivElement>('.art-controls-right')
|
||||
target.$layer = target.query<HTMLDivElement>('.art-layers')
|
||||
target.$loading = target.query<HTMLDivElement>('.art-loading')
|
||||
target.$notice = target.query<HTMLDivElement>('.art-notice')
|
||||
target.$noticeInner = target.query<HTMLDivElement>('.art-notice-inner')
|
||||
target.$mask = target.query<HTMLDivElement>('.art-mask')
|
||||
target.$state = target.query<HTMLDivElement>('.art-state')
|
||||
target.$setting = target.query<HTMLDivElement>('.art-settings')
|
||||
target.$info = target.query<HTMLDivElement>('.art-info')
|
||||
target.$infoPanel = target.query<HTMLDivElement>('.art-info-panel')
|
||||
target.$infoClose = target.query<HTMLDivElement>('.art-info-close')
|
||||
target.$contextmenu = target.query<HTMLDivElement>('.art-contextmenus')
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
export interface TemplateHost<Host> {
|
||||
id: number
|
||||
option: {
|
||||
container: string | HTMLElement
|
||||
useSSR: boolean
|
||||
proxy?: (this: Host, art: Host) => unknown
|
||||
backdrop: boolean
|
||||
}
|
||||
constructor: { instances: readonly { template: { $container: Element } }[] }
|
||||
}
|
||||
|
||||
// Missing SSR nodes remain nullable; mounting does not synthesize replacements.
|
||||
export interface TemplateNodes {
|
||||
$player: HTMLDivElement | null
|
||||
$video: HTMLVideoElement | HTMLCanvasElement | null
|
||||
$track: HTMLTrackElement | null
|
||||
$poster: HTMLDivElement | null
|
||||
$subtitle: HTMLDivElement | null
|
||||
$danmuku: HTMLDivElement | null
|
||||
$bottom: HTMLDivElement | null
|
||||
$progress: HTMLDivElement | null
|
||||
$controls: HTMLDivElement | null
|
||||
$controlsLeft: HTMLDivElement | null
|
||||
$controlsCenter: HTMLDivElement | null
|
||||
$controlsRight: HTMLDivElement | null
|
||||
$layer: HTMLDivElement | null
|
||||
$loading: HTMLDivElement | null
|
||||
$notice: HTMLDivElement | null
|
||||
$noticeInner: HTMLDivElement | null
|
||||
$mask: HTMLDivElement | null
|
||||
$state: HTMLDivElement | null
|
||||
$setting: HTMLDivElement | null
|
||||
$info: HTMLDivElement | null
|
||||
$infoPanel: HTMLDivElement | null
|
||||
$infoClose: HTMLDivElement | null
|
||||
$contextmenu: HTMLDivElement | null
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
import { isMobile } from './compatibility'
|
||||
|
||||
export { setStyleText } from '../style/inject'
|
||||
|
||||
/** @param {string} selector @param {ParentNode} parent */
|
||||
export function query(selector, parent = document) {
|
||||
return parent.querySelector(selector)
|
||||
}
|
||||
@@ -90,6 +93,7 @@ export function createElement(tag) {
|
||||
return document.createElement(tag)
|
||||
}
|
||||
|
||||
/** @param {string} key @param {string | HTMLElement} html */
|
||||
export function getIcon(key = '', html = '') {
|
||||
const icon = createElement('i')
|
||||
addClass(icon, 'art-icon')
|
||||
@@ -98,23 +102,6 @@ export function getIcon(key = '', html = '') {
|
||||
return icon
|
||||
}
|
||||
|
||||
export function setStyleText(id, style) {
|
||||
let $style = document.getElementById(id)
|
||||
if (!$style) {
|
||||
$style = document.createElement('style')
|
||||
$style.id = id
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
document.head.appendChild($style)
|
||||
})
|
||||
}
|
||||
else {
|
||||
(document.head || document.documentElement).appendChild($style)
|
||||
}
|
||||
}
|
||||
$style.textContent = style
|
||||
}
|
||||
|
||||
export function supportsFlex() {
|
||||
const div = document.createElement('div')
|
||||
div.style.display = 'flex'
|
||||
|
||||
@@ -0,0 +1,655 @@
|
||||
/*! Hint.css - v2.7.0 - 2021-10-01
|
||||
* https://kushagra.dev/lab/hint/
|
||||
* Copyright (c) 2021 Kushagra Gour */
|
||||
|
||||
/*-------------------------------------*\
|
||||
HINT.css - A CSS tooltip library
|
||||
\*-------------------------------------*/
|
||||
/**
|
||||
* HINT.css is a tooltip library made in pure CSS.
|
||||
*
|
||||
* Source: https://github.com/chinchang/hint.css
|
||||
* Demo: http://kushagragour.in/lab/hint/
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* source: hint-core.scss
|
||||
*
|
||||
* Defines the basic styling for the tooltip.
|
||||
* Each tooltip is made of 2 parts:
|
||||
* 1) body (:after)
|
||||
* 2) arrow (:before)
|
||||
*
|
||||
* Classes added:
|
||||
* 1) hint
|
||||
*/
|
||||
[class*="hint--"] {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
/**
|
||||
* tooltip arrow
|
||||
*/
|
||||
/**
|
||||
* tooltip body
|
||||
*/ }
|
||||
[class*="hint--"]:before, [class*="hint--"]:after {
|
||||
position: absolute;
|
||||
-webkit-transform: translate3d(0, 0, 0);
|
||||
-moz-transform: translate3d(0, 0, 0);
|
||||
transform: translate3d(0, 0, 0);
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
z-index: 1000000;
|
||||
pointer-events: none;
|
||||
-webkit-transition: 0.3s ease;
|
||||
-moz-transition: 0.3s ease;
|
||||
transition: 0.3s ease;
|
||||
-webkit-transition-delay: 0ms;
|
||||
-moz-transition-delay: 0ms;
|
||||
transition-delay: 0ms; }
|
||||
[class*="hint--"]:hover:before, [class*="hint--"]:hover:after {
|
||||
visibility: visible;
|
||||
opacity: 1; }
|
||||
[class*="hint--"]:hover:before, [class*="hint--"]:hover:after {
|
||||
-webkit-transition-delay: 100ms;
|
||||
-moz-transition-delay: 100ms;
|
||||
transition-delay: 100ms; }
|
||||
[class*="hint--"]:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
background: transparent;
|
||||
border: 6px solid transparent;
|
||||
z-index: 1000001; }
|
||||
[class*="hint--"]:after {
|
||||
background: #383838;
|
||||
color: white;
|
||||
padding: 8px 10px;
|
||||
font-size: 12px;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
line-height: 12px;
|
||||
white-space: nowrap; }
|
||||
[class*="hint--"][aria-label]:after {
|
||||
content: attr(aria-label); }
|
||||
[class*="hint--"][data-hint]:after {
|
||||
content: attr(data-hint); }
|
||||
|
||||
[aria-label='']:before, [aria-label='']:after,
|
||||
[data-hint='']:before,
|
||||
[data-hint='']:after {
|
||||
display: none !important; }
|
||||
|
||||
/**
|
||||
* source: hint-position.scss
|
||||
*
|
||||
* Defines the positoning logic for the tooltips.
|
||||
*
|
||||
* Classes added:
|
||||
* 1) hint--top
|
||||
* 2) hint--bottom
|
||||
* 3) hint--left
|
||||
* 4) hint--right
|
||||
*/
|
||||
/**
|
||||
* set default color for tooltip arrows
|
||||
*/
|
||||
.hint--top-left:before {
|
||||
border-top-color: #383838; }
|
||||
|
||||
.hint--top-right:before {
|
||||
border-top-color: #383838; }
|
||||
|
||||
.hint--top:before {
|
||||
border-top-color: #383838; }
|
||||
|
||||
.hint--bottom-left:before {
|
||||
border-bottom-color: #383838; }
|
||||
|
||||
.hint--bottom-right:before {
|
||||
border-bottom-color: #383838; }
|
||||
|
||||
.hint--bottom:before {
|
||||
border-bottom-color: #383838; }
|
||||
|
||||
.hint--left:before {
|
||||
border-left-color: #383838; }
|
||||
|
||||
.hint--right:before {
|
||||
border-right-color: #383838; }
|
||||
|
||||
/**
|
||||
* top tooltip
|
||||
*/
|
||||
.hint--top:before {
|
||||
margin-bottom: -11px; }
|
||||
|
||||
.hint--top:before, .hint--top:after {
|
||||
bottom: 100%;
|
||||
left: 50%; }
|
||||
|
||||
.hint--top:before {
|
||||
left: calc(50% - 6px); }
|
||||
|
||||
.hint--top:after {
|
||||
-webkit-transform: translateX(-50%);
|
||||
-moz-transform: translateX(-50%);
|
||||
transform: translateX(-50%); }
|
||||
|
||||
.hint--top:hover:before {
|
||||
-webkit-transform: translateY(-8px);
|
||||
-moz-transform: translateY(-8px);
|
||||
transform: translateY(-8px); }
|
||||
|
||||
.hint--top:hover:after {
|
||||
-webkit-transform: translateX(-50%) translateY(-8px);
|
||||
-moz-transform: translateX(-50%) translateY(-8px);
|
||||
transform: translateX(-50%) translateY(-8px); }
|
||||
|
||||
/**
|
||||
* bottom tooltip
|
||||
*/
|
||||
.hint--bottom:before {
|
||||
margin-top: -11px; }
|
||||
|
||||
.hint--bottom:before, .hint--bottom:after {
|
||||
top: 100%;
|
||||
left: 50%; }
|
||||
|
||||
.hint--bottom:before {
|
||||
left: calc(50% - 6px); }
|
||||
|
||||
.hint--bottom:after {
|
||||
-webkit-transform: translateX(-50%);
|
||||
-moz-transform: translateX(-50%);
|
||||
transform: translateX(-50%); }
|
||||
|
||||
.hint--bottom:hover:before {
|
||||
-webkit-transform: translateY(8px);
|
||||
-moz-transform: translateY(8px);
|
||||
transform: translateY(8px); }
|
||||
|
||||
.hint--bottom:hover:after {
|
||||
-webkit-transform: translateX(-50%) translateY(8px);
|
||||
-moz-transform: translateX(-50%) translateY(8px);
|
||||
transform: translateX(-50%) translateY(8px); }
|
||||
|
||||
/**
|
||||
* right tooltip
|
||||
*/
|
||||
.hint--right:before {
|
||||
margin-left: -11px;
|
||||
margin-bottom: -6px; }
|
||||
|
||||
.hint--right:after {
|
||||
margin-bottom: -14px; }
|
||||
|
||||
.hint--right:before, .hint--right:after {
|
||||
left: 100%;
|
||||
bottom: 50%; }
|
||||
|
||||
.hint--right:hover:before {
|
||||
-webkit-transform: translateX(8px);
|
||||
-moz-transform: translateX(8px);
|
||||
transform: translateX(8px); }
|
||||
|
||||
.hint--right:hover:after {
|
||||
-webkit-transform: translateX(8px);
|
||||
-moz-transform: translateX(8px);
|
||||
transform: translateX(8px); }
|
||||
|
||||
/**
|
||||
* left tooltip
|
||||
*/
|
||||
.hint--left:before {
|
||||
margin-right: -11px;
|
||||
margin-bottom: -6px; }
|
||||
|
||||
.hint--left:after {
|
||||
margin-bottom: -14px; }
|
||||
|
||||
.hint--left:before, .hint--left:after {
|
||||
right: 100%;
|
||||
bottom: 50%; }
|
||||
|
||||
.hint--left:hover:before {
|
||||
-webkit-transform: translateX(-8px);
|
||||
-moz-transform: translateX(-8px);
|
||||
transform: translateX(-8px); }
|
||||
|
||||
.hint--left:hover:after {
|
||||
-webkit-transform: translateX(-8px);
|
||||
-moz-transform: translateX(-8px);
|
||||
transform: translateX(-8px); }
|
||||
|
||||
/**
|
||||
* top-left tooltip
|
||||
*/
|
||||
.hint--top-left:before {
|
||||
margin-bottom: -11px; }
|
||||
|
||||
.hint--top-left:before, .hint--top-left:after {
|
||||
bottom: 100%;
|
||||
left: 50%; }
|
||||
|
||||
.hint--top-left:before {
|
||||
left: calc(50% - 6px); }
|
||||
|
||||
.hint--top-left:after {
|
||||
-webkit-transform: translateX(-100%);
|
||||
-moz-transform: translateX(-100%);
|
||||
transform: translateX(-100%); }
|
||||
|
||||
.hint--top-left:after {
|
||||
margin-left: 12px; }
|
||||
|
||||
.hint--top-left:hover:before {
|
||||
-webkit-transform: translateY(-8px);
|
||||
-moz-transform: translateY(-8px);
|
||||
transform: translateY(-8px); }
|
||||
|
||||
.hint--top-left:hover:after {
|
||||
-webkit-transform: translateX(-100%) translateY(-8px);
|
||||
-moz-transform: translateX(-100%) translateY(-8px);
|
||||
transform: translateX(-100%) translateY(-8px); }
|
||||
|
||||
/**
|
||||
* top-right tooltip
|
||||
*/
|
||||
.hint--top-right:before {
|
||||
margin-bottom: -11px; }
|
||||
|
||||
.hint--top-right:before, .hint--top-right:after {
|
||||
bottom: 100%;
|
||||
left: 50%; }
|
||||
|
||||
.hint--top-right:before {
|
||||
left: calc(50% - 6px); }
|
||||
|
||||
.hint--top-right:after {
|
||||
-webkit-transform: translateX(0);
|
||||
-moz-transform: translateX(0);
|
||||
transform: translateX(0); }
|
||||
|
||||
.hint--top-right:after {
|
||||
margin-left: -12px; }
|
||||
|
||||
.hint--top-right:hover:before {
|
||||
-webkit-transform: translateY(-8px);
|
||||
-moz-transform: translateY(-8px);
|
||||
transform: translateY(-8px); }
|
||||
|
||||
.hint--top-right:hover:after {
|
||||
-webkit-transform: translateY(-8px);
|
||||
-moz-transform: translateY(-8px);
|
||||
transform: translateY(-8px); }
|
||||
|
||||
/**
|
||||
* bottom-left tooltip
|
||||
*/
|
||||
.hint--bottom-left:before {
|
||||
margin-top: -11px; }
|
||||
|
||||
.hint--bottom-left:before, .hint--bottom-left:after {
|
||||
top: 100%;
|
||||
left: 50%; }
|
||||
|
||||
.hint--bottom-left:before {
|
||||
left: calc(50% - 6px); }
|
||||
|
||||
.hint--bottom-left:after {
|
||||
-webkit-transform: translateX(-100%);
|
||||
-moz-transform: translateX(-100%);
|
||||
transform: translateX(-100%); }
|
||||
|
||||
.hint--bottom-left:after {
|
||||
margin-left: 12px; }
|
||||
|
||||
.hint--bottom-left:hover:before {
|
||||
-webkit-transform: translateY(8px);
|
||||
-moz-transform: translateY(8px);
|
||||
transform: translateY(8px); }
|
||||
|
||||
.hint--bottom-left:hover:after {
|
||||
-webkit-transform: translateX(-100%) translateY(8px);
|
||||
-moz-transform: translateX(-100%) translateY(8px);
|
||||
transform: translateX(-100%) translateY(8px); }
|
||||
|
||||
/**
|
||||
* bottom-right tooltip
|
||||
*/
|
||||
.hint--bottom-right:before {
|
||||
margin-top: -11px; }
|
||||
|
||||
.hint--bottom-right:before, .hint--bottom-right:after {
|
||||
top: 100%;
|
||||
left: 50%; }
|
||||
|
||||
.hint--bottom-right:before {
|
||||
left: calc(50% - 6px); }
|
||||
|
||||
.hint--bottom-right:after {
|
||||
-webkit-transform: translateX(0);
|
||||
-moz-transform: translateX(0);
|
||||
transform: translateX(0); }
|
||||
|
||||
.hint--bottom-right:after {
|
||||
margin-left: -12px; }
|
||||
|
||||
.hint--bottom-right:hover:before {
|
||||
-webkit-transform: translateY(8px);
|
||||
-moz-transform: translateY(8px);
|
||||
transform: translateY(8px); }
|
||||
|
||||
.hint--bottom-right:hover:after {
|
||||
-webkit-transform: translateY(8px);
|
||||
-moz-transform: translateY(8px);
|
||||
transform: translateY(8px); }
|
||||
|
||||
/**
|
||||
* source: hint-sizes.scss
|
||||
*
|
||||
* Defines width restricted tooltips that can span
|
||||
* across multiple lines.
|
||||
*
|
||||
* Classes added:
|
||||
* 1) hint--small
|
||||
* 2) hint--medium
|
||||
* 3) hint--large
|
||||
*
|
||||
*/
|
||||
.hint--small:after,
|
||||
.hint--medium:after,
|
||||
.hint--large:after {
|
||||
white-space: normal;
|
||||
line-height: 1.4em;
|
||||
word-wrap: break-word; }
|
||||
|
||||
.hint--small:after {
|
||||
width: 80px; }
|
||||
|
||||
.hint--medium:after {
|
||||
width: 150px; }
|
||||
|
||||
.hint--large:after {
|
||||
width: 300px; }
|
||||
|
||||
/**
|
||||
* source: hint-theme.scss
|
||||
*
|
||||
* Defines basic theme for tooltips.
|
||||
*
|
||||
*/
|
||||
[class*="hint--"] {
|
||||
/**
|
||||
* tooltip body
|
||||
*/ }
|
||||
[class*="hint--"]:after {
|
||||
text-shadow: 0 -1px 0px black;
|
||||
box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.3); }
|
||||
|
||||
/**
|
||||
* source: hint-color-types.scss
|
||||
*
|
||||
* Contains tooltips of various types based on color differences.
|
||||
*
|
||||
* Classes added:
|
||||
* 1) hint--error
|
||||
* 2) hint--warning
|
||||
* 3) hint--info
|
||||
* 4) hint--success
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* Error
|
||||
*/
|
||||
.hint--error:after {
|
||||
background-color: #b34e4d;
|
||||
text-shadow: 0 -1px 0px #592726; }
|
||||
|
||||
.hint--error.hint--top-left:before {
|
||||
border-top-color: #b34e4d; }
|
||||
|
||||
.hint--error.hint--top-right:before {
|
||||
border-top-color: #b34e4d; }
|
||||
|
||||
.hint--error.hint--top:before {
|
||||
border-top-color: #b34e4d; }
|
||||
|
||||
.hint--error.hint--bottom-left:before {
|
||||
border-bottom-color: #b34e4d; }
|
||||
|
||||
.hint--error.hint--bottom-right:before {
|
||||
border-bottom-color: #b34e4d; }
|
||||
|
||||
.hint--error.hint--bottom:before {
|
||||
border-bottom-color: #b34e4d; }
|
||||
|
||||
.hint--error.hint--left:before {
|
||||
border-left-color: #b34e4d; }
|
||||
|
||||
.hint--error.hint--right:before {
|
||||
border-right-color: #b34e4d; }
|
||||
|
||||
/**
|
||||
* Warning
|
||||
*/
|
||||
.hint--warning:after {
|
||||
background-color: #c09854;
|
||||
text-shadow: 0 -1px 0px #6c5328; }
|
||||
|
||||
.hint--warning.hint--top-left:before {
|
||||
border-top-color: #c09854; }
|
||||
|
||||
.hint--warning.hint--top-right:before {
|
||||
border-top-color: #c09854; }
|
||||
|
||||
.hint--warning.hint--top:before {
|
||||
border-top-color: #c09854; }
|
||||
|
||||
.hint--warning.hint--bottom-left:before {
|
||||
border-bottom-color: #c09854; }
|
||||
|
||||
.hint--warning.hint--bottom-right:before {
|
||||
border-bottom-color: #c09854; }
|
||||
|
||||
.hint--warning.hint--bottom:before {
|
||||
border-bottom-color: #c09854; }
|
||||
|
||||
.hint--warning.hint--left:before {
|
||||
border-left-color: #c09854; }
|
||||
|
||||
.hint--warning.hint--right:before {
|
||||
border-right-color: #c09854; }
|
||||
|
||||
/**
|
||||
* Info
|
||||
*/
|
||||
.hint--info:after {
|
||||
background-color: #3986ac;
|
||||
text-shadow: 0 -1px 0px #1a3c4d; }
|
||||
|
||||
.hint--info.hint--top-left:before {
|
||||
border-top-color: #3986ac; }
|
||||
|
||||
.hint--info.hint--top-right:before {
|
||||
border-top-color: #3986ac; }
|
||||
|
||||
.hint--info.hint--top:before {
|
||||
border-top-color: #3986ac; }
|
||||
|
||||
.hint--info.hint--bottom-left:before {
|
||||
border-bottom-color: #3986ac; }
|
||||
|
||||
.hint--info.hint--bottom-right:before {
|
||||
border-bottom-color: #3986ac; }
|
||||
|
||||
.hint--info.hint--bottom:before {
|
||||
border-bottom-color: #3986ac; }
|
||||
|
||||
.hint--info.hint--left:before {
|
||||
border-left-color: #3986ac; }
|
||||
|
||||
.hint--info.hint--right:before {
|
||||
border-right-color: #3986ac; }
|
||||
|
||||
/**
|
||||
* Success
|
||||
*/
|
||||
.hint--success:after {
|
||||
background-color: #458746;
|
||||
text-shadow: 0 -1px 0px #1a321a; }
|
||||
|
||||
.hint--success.hint--top-left:before {
|
||||
border-top-color: #458746; }
|
||||
|
||||
.hint--success.hint--top-right:before {
|
||||
border-top-color: #458746; }
|
||||
|
||||
.hint--success.hint--top:before {
|
||||
border-top-color: #458746; }
|
||||
|
||||
.hint--success.hint--bottom-left:before {
|
||||
border-bottom-color: #458746; }
|
||||
|
||||
.hint--success.hint--bottom-right:before {
|
||||
border-bottom-color: #458746; }
|
||||
|
||||
.hint--success.hint--bottom:before {
|
||||
border-bottom-color: #458746; }
|
||||
|
||||
.hint--success.hint--left:before {
|
||||
border-left-color: #458746; }
|
||||
|
||||
.hint--success.hint--right:before {
|
||||
border-right-color: #458746; }
|
||||
|
||||
/**
|
||||
* source: hint-always.scss
|
||||
*
|
||||
* Defines a persisted tooltip which shows always.
|
||||
*
|
||||
* Classes added:
|
||||
* 1) hint--always
|
||||
*
|
||||
*/
|
||||
.hint--always:after, .hint--always:before {
|
||||
opacity: 1;
|
||||
visibility: visible; }
|
||||
|
||||
.hint--always.hint--top:before {
|
||||
-webkit-transform: translateY(-8px);
|
||||
-moz-transform: translateY(-8px);
|
||||
transform: translateY(-8px); }
|
||||
|
||||
.hint--always.hint--top:after {
|
||||
-webkit-transform: translateX(-50%) translateY(-8px);
|
||||
-moz-transform: translateX(-50%) translateY(-8px);
|
||||
transform: translateX(-50%) translateY(-8px); }
|
||||
|
||||
.hint--always.hint--top-left:before {
|
||||
-webkit-transform: translateY(-8px);
|
||||
-moz-transform: translateY(-8px);
|
||||
transform: translateY(-8px); }
|
||||
|
||||
.hint--always.hint--top-left:after {
|
||||
-webkit-transform: translateX(-100%) translateY(-8px);
|
||||
-moz-transform: translateX(-100%) translateY(-8px);
|
||||
transform: translateX(-100%) translateY(-8px); }
|
||||
|
||||
.hint--always.hint--top-right:before {
|
||||
-webkit-transform: translateY(-8px);
|
||||
-moz-transform: translateY(-8px);
|
||||
transform: translateY(-8px); }
|
||||
|
||||
.hint--always.hint--top-right:after {
|
||||
-webkit-transform: translateY(-8px);
|
||||
-moz-transform: translateY(-8px);
|
||||
transform: translateY(-8px); }
|
||||
|
||||
.hint--always.hint--bottom:before {
|
||||
-webkit-transform: translateY(8px);
|
||||
-moz-transform: translateY(8px);
|
||||
transform: translateY(8px); }
|
||||
|
||||
.hint--always.hint--bottom:after {
|
||||
-webkit-transform: translateX(-50%) translateY(8px);
|
||||
-moz-transform: translateX(-50%) translateY(8px);
|
||||
transform: translateX(-50%) translateY(8px); }
|
||||
|
||||
.hint--always.hint--bottom-left:before {
|
||||
-webkit-transform: translateY(8px);
|
||||
-moz-transform: translateY(8px);
|
||||
transform: translateY(8px); }
|
||||
|
||||
.hint--always.hint--bottom-left:after {
|
||||
-webkit-transform: translateX(-100%) translateY(8px);
|
||||
-moz-transform: translateX(-100%) translateY(8px);
|
||||
transform: translateX(-100%) translateY(8px); }
|
||||
|
||||
.hint--always.hint--bottom-right:before {
|
||||
-webkit-transform: translateY(8px);
|
||||
-moz-transform: translateY(8px);
|
||||
transform: translateY(8px); }
|
||||
|
||||
.hint--always.hint--bottom-right:after {
|
||||
-webkit-transform: translateY(8px);
|
||||
-moz-transform: translateY(8px);
|
||||
transform: translateY(8px); }
|
||||
|
||||
.hint--always.hint--left:before {
|
||||
-webkit-transform: translateX(-8px);
|
||||
-moz-transform: translateX(-8px);
|
||||
transform: translateX(-8px); }
|
||||
|
||||
.hint--always.hint--left:after {
|
||||
-webkit-transform: translateX(-8px);
|
||||
-moz-transform: translateX(-8px);
|
||||
transform: translateX(-8px); }
|
||||
|
||||
.hint--always.hint--right:before {
|
||||
-webkit-transform: translateX(8px);
|
||||
-moz-transform: translateX(8px);
|
||||
transform: translateX(8px); }
|
||||
|
||||
.hint--always.hint--right:after {
|
||||
-webkit-transform: translateX(8px);
|
||||
-moz-transform: translateX(8px);
|
||||
transform: translateX(8px); }
|
||||
|
||||
/**
|
||||
* source: hint-rounded.scss
|
||||
*
|
||||
* Defines rounded corner tooltips.
|
||||
*
|
||||
* Classes added:
|
||||
* 1) hint--rounded
|
||||
*
|
||||
*/
|
||||
.hint--rounded:after {
|
||||
border-radius: 4px; }
|
||||
|
||||
/**
|
||||
* source: hint-effects.scss
|
||||
*
|
||||
* Defines various transition effects for the tooltips.
|
||||
*
|
||||
* Classes added:
|
||||
* 1) hint--no-animate
|
||||
* 2) hint--bounce
|
||||
*
|
||||
*/
|
||||
.hint--no-animate:before, .hint--no-animate:after {
|
||||
-webkit-transition-duration: 0ms;
|
||||
-moz-transition-duration: 0ms;
|
||||
transition-duration: 0ms; }
|
||||
|
||||
.hint--bounce:before, .hint--bounce:after {
|
||||
-webkit-transition: opacity 0.3s ease, visibility 0.3s ease, -webkit-transform 0.3s cubic-bezier(0.71, 1.7, 0.77, 1.24);
|
||||
-moz-transition: opacity 0.3s ease, visibility 0.3s ease, -moz-transform 0.3s cubic-bezier(0.71, 1.7, 0.77, 1.24);
|
||||
transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s cubic-bezier(0.71, 1.7, 0.77, 1.24); }
|
||||
|
||||
.hint--no-shadow:before, .hint--no-shadow:after {
|
||||
text-shadow: initial;
|
||||
box-shadow: initial; }
|
||||
|
||||
.hint--no-arrow:before {
|
||||
display: none; }
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Kushagra Gour
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,160 @@
|
||||
/* eslint-disable promise/prefer-await-to-then */
|
||||
|
||||
const methodMap = [
|
||||
[
|
||||
'requestFullscreen',
|
||||
'exitFullscreen',
|
||||
'fullscreenElement',
|
||||
'fullscreenEnabled',
|
||||
'fullscreenchange',
|
||||
'fullscreenerror',
|
||||
],
|
||||
// New WebKit
|
||||
[
|
||||
'webkitRequestFullscreen',
|
||||
'webkitExitFullscreen',
|
||||
'webkitFullscreenElement',
|
||||
'webkitFullscreenEnabled',
|
||||
'webkitfullscreenchange',
|
||||
'webkitfullscreenerror',
|
||||
|
||||
],
|
||||
// Old WebKit
|
||||
[
|
||||
'webkitRequestFullScreen',
|
||||
'webkitCancelFullScreen',
|
||||
'webkitCurrentFullScreenElement',
|
||||
'webkitCancelFullScreen',
|
||||
'webkitfullscreenchange',
|
||||
'webkitfullscreenerror',
|
||||
|
||||
],
|
||||
[
|
||||
'mozRequestFullScreen',
|
||||
'mozCancelFullScreen',
|
||||
'mozFullScreenElement',
|
||||
'mozFullScreenEnabled',
|
||||
'mozfullscreenchange',
|
||||
'mozfullscreenerror',
|
||||
],
|
||||
[
|
||||
'msRequestFullscreen',
|
||||
'msExitFullscreen',
|
||||
'msFullscreenElement',
|
||||
'msFullscreenEnabled',
|
||||
'MSFullscreenChange',
|
||||
'MSFullscreenError',
|
||||
],
|
||||
];
|
||||
|
||||
const nativeAPI = (() => {
|
||||
if (typeof document === 'undefined') {
|
||||
return false;
|
||||
}
|
||||
|
||||
const unprefixedMethods = methodMap[0];
|
||||
const returnValue = {};
|
||||
|
||||
for (const methodList of methodMap) {
|
||||
const exitFullscreenMethod = methodList?.[1];
|
||||
if (exitFullscreenMethod in document) {
|
||||
for (const [index, method] of methodList.entries()) {
|
||||
returnValue[unprefixedMethods[index]] = method;
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
})();
|
||||
|
||||
const eventNameMap = {
|
||||
change: nativeAPI.fullscreenchange,
|
||||
error: nativeAPI.fullscreenerror,
|
||||
};
|
||||
|
||||
// eslint-disable-next-line import/no-mutable-exports
|
||||
let screenfull = {
|
||||
// eslint-disable-next-line default-param-last
|
||||
request(element = document.documentElement, options) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const onFullScreenEntered = () => {
|
||||
screenfull.off('change', onFullScreenEntered);
|
||||
resolve();
|
||||
};
|
||||
|
||||
screenfull.on('change', onFullScreenEntered);
|
||||
|
||||
const returnPromise = element[nativeAPI.requestFullscreen](options);
|
||||
|
||||
if (returnPromise instanceof Promise) {
|
||||
returnPromise.then(onFullScreenEntered).catch(reject);
|
||||
}
|
||||
});
|
||||
},
|
||||
exit() {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!screenfull.isFullscreen) {
|
||||
resolve();
|
||||
return;
|
||||
}
|
||||
|
||||
const onFullScreenExit = () => {
|
||||
screenfull.off('change', onFullScreenExit);
|
||||
resolve();
|
||||
};
|
||||
|
||||
screenfull.on('change', onFullScreenExit);
|
||||
|
||||
const returnPromise = document[nativeAPI.exitFullscreen]();
|
||||
|
||||
if (returnPromise instanceof Promise) {
|
||||
returnPromise.then(onFullScreenExit).catch(reject);
|
||||
}
|
||||
});
|
||||
},
|
||||
toggle(element, options) {
|
||||
return screenfull.isFullscreen ? screenfull.exit() : screenfull.request(element, options);
|
||||
},
|
||||
onchange(callback) {
|
||||
screenfull.on('change', callback);
|
||||
},
|
||||
onerror(callback) {
|
||||
screenfull.on('error', callback);
|
||||
},
|
||||
on(event, callback) {
|
||||
const eventName = eventNameMap[event];
|
||||
if (eventName) {
|
||||
document.addEventListener(eventName, callback, false);
|
||||
}
|
||||
},
|
||||
off(event, callback) {
|
||||
const eventName = eventNameMap[event];
|
||||
if (eventName) {
|
||||
document.removeEventListener(eventName, callback, false);
|
||||
}
|
||||
},
|
||||
raw: nativeAPI,
|
||||
};
|
||||
|
||||
Object.defineProperties(screenfull, {
|
||||
isFullscreen: {
|
||||
get: () => Boolean(document[nativeAPI.fullscreenElement]),
|
||||
},
|
||||
element: {
|
||||
enumerable: true,
|
||||
get: () => document[nativeAPI.fullscreenElement] ?? undefined,
|
||||
},
|
||||
isEnabled: {
|
||||
enumerable: true,
|
||||
// Coerce to boolean in case of old WebKit.
|
||||
get: () => Boolean(document[nativeAPI.fullscreenEnabled]),
|
||||
},
|
||||
});
|
||||
|
||||
if (!nativeAPI) {
|
||||
screenfull = {isEnabled: false};
|
||||
}
|
||||
|
||||
export default screenfull;
|
||||
@@ -0,0 +1,9 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -0,0 +1,22 @@
|
||||
[
|
||||
{
|
||||
"file": "refactor/baselines/core-vendor/screenfull-6.0.2.txt",
|
||||
"url": "https://raw.githubusercontent.com/sindresorhus/screenfull/v6.0.2/index.js",
|
||||
"sha256": "4246711b342018b0f257f8fa6047f240a21af6218c7e79cab5c662e810bb3e01"
|
||||
},
|
||||
{
|
||||
"file": "refactor/baselines/core-vendor/screenfull-license.txt",
|
||||
"url": "https://raw.githubusercontent.com/sindresorhus/screenfull/v6.0.2/license",
|
||||
"sha256": "5c932d88256b4ab958f64a856fa48e8bd1f55bc1d96b8149c65689e0c61789d3"
|
||||
},
|
||||
{
|
||||
"file": "refactor/baselines/core-vendor/hint-2.7.0.txt",
|
||||
"url": "https://raw.githubusercontent.com/chinchang/hint.css/v2.7.0/hint.css",
|
||||
"sha256": "a804fa4b607167e579b39d192f1a29d2b27226097094e0351f2d46ac8ebaa864"
|
||||
},
|
||||
{
|
||||
"file": "refactor/baselines/core-vendor/hint-license.txt",
|
||||
"url": "https://raw.githubusercontent.com/chinchang/hint.css/v2.7.0/LICENSE",
|
||||
"sha256": "55cee0a0645d18366eaa0cd21208c224568e14c38b7894e0f9ff537702ff8ea0"
|
||||
}
|
||||
]
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,35 @@
|
||||
# CORE-12 模板及公开资源入口
|
||||
|
||||
状态:完成;源码、严格类型、构建、安装包与本地三浏览器验收通过。
|
||||
|
||||
## 实际模块与兼容边界
|
||||
|
||||
模板拆为入口、html、节点绑定和泛型宿主/节点类型;保持 DOM 字符串、绑定顺序、query 绑定、节点身份、SSR 复用、proxy 调用上下文及销毁策略。SSR 缺节点不擅自补齐;canvas 不断言成原生 video。容器类型断言仅覆盖已有 non-null/div 校验边界,选择器泛型不声称验证任意用户 HTML。
|
||||
|
||||
图标拆分默认 SVG 与注册器,保持每次读取的新 i 包装、自定义节点移动、描述符和默认覆盖。12 个语言源码迁移 TS,共享发布别名边界;构建仍输出 11 对独立语言文件。style 入口与注入实现迁移 TS,主入口维持全局赋值/调用顺序,utils 继续导出原帮助函数。
|
||||
|
||||
BASE-I18N-01:旧 get('constructor') 在缺少翻译时返回函数;候选只查自身属性,返回原 key 字符串。自有 constructor/toString/__proto__ 翻译、空字符串 fallback、大小写和 update 深合并保持。此为明确缺陷修正,发布基线不改。
|
||||
|
||||
BASE-TYPE-09:旧 icons 声明为 HTMLDivElement,实际为 i 元素;template 实例声明 html,但实际是构造器静态字段,video 又可能为 canvas。源码保留真实类型,公开声明旧合法赋值暂不收紧,交 CORE-21 统一提供精确兼容视图。
|
||||
|
||||
## 复制资源与许可
|
||||
|
||||
screenfull 固定以 v6.0.2 为比较基准;AST 输出去注释后仅四项适配:取消可选下标、let 改 const、element 保留 null、移除不支持时替换整个对象的分支。本地首次引入 fab5afed2(2022-07-18)未记录精确上游 tag;6.0.0/6.0.1 的规范化实现相同且也有差异,因此不把比较基准伪装成已证实的历史复制版本。现有实现未替换。
|
||||
|
||||
Hint.css 头部明确 v2.7.0;剥离 ArtPlayer 外层作用域、经 Less 规范化并统一引号后,全部样式仅相差首条 font-style:normal 和默认颜色 #383838 改 #000000。所有规则保持。
|
||||
|
||||
固定上游原文、许可证、URL/SHA 见 baselines/core-vendor。core-vendor.mjs 对全部规范化内容进行差异限定,并确认通知含完整 MIT 许可。THIRD_PARTY_NOTICES 包含 screenfull、Hint.css 及已打包 option-validator 2.0.6 的许可,构建脚本将全文加入每个核心输出头部。已核对实际 tarball 中的通知文件和三个独立 JS 头部完整许可,并验证当前源码/产物/语言文件与安装消费者的 SHA 一致;VENDOR-01/02 关闭。历史 screenfull 引入 tag 的不确定性保持明示,固定比较版本与全部适配可重复验证。
|
||||
|
||||
## 最终验证
|
||||
|
||||
- 源码专项:4 项语言/SSR、7 项复制内容/全屏适配测试通过;核心及源码类型用例编译通过。
|
||||
- 三浏览器专项包括新旧 SSR 复用、proxy、图标、语言缺陷对照、fullscreenWeb 和实际点击进入/退出原生全屏。三个本地引擎均报告 native fullscreen 可用,六个新旧组合全部实际执行原生路径。
|
||||
- yarn ci:check:169 项通过(140 单元、4 工程、25 基线);76 个生产 TS 文件严格检查。
|
||||
- 实际核心/chapter tarball:27 项运行时通过、五组类型零诊断;全部 11 对语言子路径、UMD 和 ESM 浏览器别名及目录完整性通过。
|
||||
- 最终安装 UMD:258 项三浏览器通过;最终安装 legacy:同套 258 项通过。没有跳过、重试、flaky 或未处理 JS 异常。
|
||||
- [证据](../baselines/template-resources-validation.json) 记录完整源文件/测试/产物指纹、语言与许可文件、引擎版本、每项结果和原生全屏能力。
|
||||
- 初次新增原生全屏用例误用了 /media/pattern.mp4,六项在 ready 前失败;保留报告,改为实际 /test/pattern.mp4 路由后通过,没有修改播放器或扩大超时。许可头部格式修正后重新构建、打包并复跑最终两套矩阵;一次 Windows copyfile UNKNOWN 失败保留,原命令重跑成功。
|
||||
|
||||
没有升级依赖、版本或锁文件;公开 d.ts 保持旧消费接受范围。尚未验证远端 CI、实体设备和所有插件发布。重复 loading 阶段样式注入不在此轮重新设计;native fullscreen 的五种方法映射有受控单元验证,三个本地引擎另有真实点击证据;不能扩大为实体移动设备或 WebKit video-only fullscreen 验收。回退需一起回退源码、语言构建、通知、生成产物、测试和相关文档。
|
||||
|
||||
BASE-I18N-01 已关闭;BASE-TYPE-09 保持开放并交 CORE-21。迁移与维护地图见 packages/artplayer/ARCHITECTURE.md。当前核心 71 个 TS 源文件,chapter 5 个;主入口仍是待 CORE-20 整合的兼容 JS 门面。本任务独立本地提交,无推送或发布。
|
||||
+3
-2
@@ -4,7 +4,7 @@
|
||||
|
||||
基线:`40fcda6a37d0049d42e49c1e64e70d4fd9ba5f7f`。总任务 214 项,范围 22 个包及工作区/示例。
|
||||
|
||||
状态:todo 167 / doing 0 / blocked 0 / done 47 / deferred 0。风险 L/M/H 表示兼容风险,不表示工期。
|
||||
状态:todo 166 / doing 0 / blocked 0 / done 48 / deferred 0。风险 L/M/H 表示兼容风险,不表示工期。
|
||||
|
||||
前置依赖是启动条件;验收是完成条件。任务可以继续拆分,但不能复用或悄悄删除旧 ID。
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
| CORE-09 | artplayer<br>整理 URL 与切源操作 | CORE-04, CORE-06, CORE-08 | url/switch/customType 的操作身份及取消方案 | 并发切源、错误、同 URL、销毁和 Promise 结算有契约;处理 baselines/lifecycle-coverage.md 的 BASE-LIFE-01/02/06 并增加候选正向回归 | H | done |
|
||||
| CORE-10 | artplayer<br>迁移播放与时间/状态属性 | CORE-09 | play/pause/toggle/seek/volume/rate/duration 等模块 | 旧返回值、拒绝、mutex、位置恢复、属性描述符与事件通过;接续 CORE-07 / BASE-TYPE-04 的 toggle void 与实际 Promise 分支冲突,不吞拒绝 | H | done |
|
||||
| CORE-11 | artplayer<br>整理媒体事件、ready 与重连 | CORE-10 | 媒体转发、重连、UI 响应职责分离 | readiness 次数/顺序、过期重连、原错误参数有回归 | H | done |
|
||||
| CORE-12 | artplayer<br>迁移模板及公开资源入口 | CORE-06, CORE-04, BASE-04 | template/icons/i18n/style、SSR 与 proxy 挂载 | DOM/CSS/global/样式注入、i18n 子路径及 SSR import 保持;不把 SSR import/useSSR 保持扩大为服务端构造播放器;复跑 BASE-05 的 SSR import/模板、浏览器 useSSR 节点复用和非浏览器构造错误;接续 VENDOR-01/02,核对 screenfull/hint 复制版本、修改与分发通知,保留 DOM/CSS/fullscreen 行为 | H | todo |
|
||||
| CORE-12 | artplayer<br>迁移模板及公开资源入口 | CORE-06, CORE-04, BASE-04 | template/icons/i18n/style、SSR 与 proxy 挂载 | DOM/CSS/global/样式注入、i18n 子路径及 SSR import 保持;不把 SSR import/useSSR 保持扩大为服务端构造播放器;复跑 BASE-05 的 SSR import/模板、浏览器 useSSR 节点复用和非浏览器构造错误;接续 VENDOR-01/02,核对 screenfull/hint 复制版本、修改与分发通知,保留 DOM/CSS/fullscreen 行为 | H | done |
|
||||
| CORE-13 | artplayer<br>迁移组件注册与控件 | CORE-12, CORE-08 | Component/control/layer/contextmenu 的资源与 TS 边界 | add/update/remove、name、selector、mounted/beforeUnmount 通过;处理 BASE-DOM-02 窄容器控件裁切,保留 controls.update 的旧 undefined 返回值 | H | todo |
|
||||
| CORE-14 | artplayer<br>拆分设置树、渲染和布局 | CORE-13 | setting model/selection/render/layout 的分批实现 | 不强行统一控件返回值,嵌套选择、默认高亮、更新清理通过;结合 BASE-DOM-02 验证窄容器设置定位;接续 BASE-TYPE-07 的 find null、add/update item、remove undefined 声明冲突 | H | todo |
|
||||
| CORE-15 | artplayer<br>迁移字幕获取、解析和渲染 | CORE-11, CORE-13 | subtitle 请求/track/DOM/URL 生命周期与类型 | 过期结果、偏移、cue 数组、原生全屏及错误路径通过;接续 BASE-TYPE-07 的真实 cue 数组与旧隐式 scalar 回调声明兼容 | H | todo |
|
||||
@@ -446,6 +446,7 @@
|
||||
- CORE-09: [记录](changes/2026-09-11-CORE-09-source-operations.md) [记录](baselines/source-operations-validation.json)
|
||||
- CORE-10: [记录](changes/2026-09-11-CORE-10-playback-properties.md) [记录](baselines/playback-properties-validation.json)
|
||||
- CORE-11: [记录](changes/2026-09-11-CORE-11-media-events.md) [记录](baselines/media-events-validation.json)
|
||||
- CORE-12: [记录](changes/2026-09-11-CORE-12-template-resources.md) [记录](baselines/template-resources-validation.json)
|
||||
- PKG-CHAPTER-01: [记录](changes/2026-09-10-PKG-CHAPTER-01-contract.md) [记录](baselines/chapter-contract.md)
|
||||
- PKG-CHAPTER-02: [记录](changes/2026-09-10-PKG-CHAPTER-02-tests.md) [记录](baselines/chapter-validation.json)
|
||||
- PKG-CHAPTER-03: [记录](changes/2026-09-10-PKG-CHAPTER-03-typescript-modules.md) [记录](baselines/chapter-migration-validation.json)
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# 进度与证据
|
||||
|
||||
## 当前实施:CORE-12 模板及公开资源入口完成
|
||||
|
||||
模板、图标、语言和样式入口迁移 TS,保留 SSR/DOM/proxy 身份及语言分发。169 项 Node/工程/基线通过,最终安装 UMD 与 legacy 各 258 项三浏览器通过;打包 27 项运行时及五组类型零诊断。复制资源固定上游内容、全部适配和实际分发许可已核对,关闭 VENDOR-01/02 与 BASE-I18N-01;公开模板/图标类型差异 BASE-TYPE-09 交 CORE-21。见 [交付](changes/2026-09-11-CORE-12-template-resources.md)。当前 214 项,48 完成、166 待办;核心 71 个 TS 文件、chapter 5 个。下一项 CORE-13 组件注册与控件。
|
||||
|
||||
## 当前实施:CORE-11 媒体事件、ready 与重连完成
|
||||
|
||||
事件入口迁移 TS,拆出转发、ready、播放 UI、重连、订阅和宿主类型;资源代次与切源操作分离,失败切源仍可重试,换源/恢复/销毁取消过期工作。158 项 Node/基线、安装 UMD 与 legacy 各 222 项三浏览器、打包 27 项运行时及五组类型检查通过。见 [交付](changes/2026-09-11-CORE-11-media-events.md)。关闭新增 BASE-LIFE-07/08,保留原 Event、重试次数和正常 ready 顺序;第三方 SDK 事件仍由适配器负责。当前 214 项,47 完成、167 待办;核心 49 个 TS 文件、chapter 5 个。下一项 CORE-12 模板及公开资源入口。
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
| BASE-SOURCE-02 | open / 源码/产物事实 | registry gitHead 与发布包版本对应不可靠 | ENG-07, REL-01 |
|
||||
| BASE-SITE-01 | open / 源码/产物事实 | 文档站实际为静态站点但 manifest 未设 private | SITE-01, REL-01 |
|
||||
| BASE-MEDIA-01 | open / 待取证 | 示例媒体和字体的完整来源/授权链待核实 | BASE-08, SITE-01, EX-03 |
|
||||
| VENDOR-01 | open / 待取证 | screenfull 来源、版本与许可闭环 | CORE-12 |
|
||||
| VENDOR-02 | open / 待取证 | hint.css 来源、版本与许可闭环 | CORE-12 |
|
||||
| VENDOR-01 | resolved / 源码/产物事实 | screenfull 来源、版本与许可闭环 | CORE-12 |
|
||||
| VENDOR-02 | resolved / 源码/产物事实 | hint.css 来源、版本与许可闭环 | CORE-12 |
|
||||
| VENDOR-03 | open / 待取证 | webvtt-parser 来源、版本与许可闭环 | PKG-MULTI-SUB-01 |
|
||||
| VENDOR-04 | open / 待取证 | jassub-code-and-workers 来源、版本与许可闭环 | PKG-JASSUB-01 |
|
||||
| VENDOR-05 | open / 待取证 | jassub-font-assets 来源、版本与许可闭环 | PKG-JASSUB-01, SITE-01 |
|
||||
@@ -54,3 +54,5 @@
|
||||
| BASE-TYPE-08 | open / 已复现 | Write-only player commands have fictitious public getter declarations | CORE-21 |
|
||||
| BASE-LIFE-07 | resolved / 已复现 | Queued reconnect survives source replacement and reloads the new resource | CORE-11 |
|
||||
| BASE-LIFE-08 | resolved / 已复现 | Ready continues after a control callback destroys the instance | CORE-11 |
|
||||
| BASE-I18N-01 | resolved / 已复现 | Missing prototype-named translations return inherited functions | CORE-12 |
|
||||
| BASE-TYPE-09 | open / 源码/产物事实 | Template and icon declarations claim incompatible DOM and static shapes | CORE-21 |
|
||||
+62
-6
@@ -387,8 +387,8 @@
|
||||
{
|
||||
"id": "VENDOR-01",
|
||||
"title": "screenfull 来源、版本与许可闭环",
|
||||
"confirmation": "unverified",
|
||||
"status": "open",
|
||||
"confirmation": "source-observed",
|
||||
"status": "resolved",
|
||||
"owners": [
|
||||
"CORE-12"
|
||||
],
|
||||
@@ -397,13 +397,21 @@
|
||||
"packages/artplayer/src/libs/screenfull.js"
|
||||
],
|
||||
"compatibleResolution": "Keep separate from owned TS migration. Verify source/version/diff and license notices before replacement; preserve API/CSS/worker URLs and run owning package tests.",
|
||||
"closureCriteria": "固定上游版本/内容差异、完整组件许可与分发 notices,兼容测试通过;仅当前上游许可证名称不足以关闭。"
|
||||
"closureCriteria": "固定上游版本/内容差异、完整组件许可与分发 notices,兼容测试通过;仅当前上游许可证名称不足以关闭。",
|
||||
"resolutionEvidence": [
|
||||
"refactor/changes/2026-09-11-CORE-12-template-resources.md",
|
||||
"refactor/baselines/template-resources-validation.json",
|
||||
"refactor/scripts/core-vendor.mjs",
|
||||
"test/core-vendor.test.js",
|
||||
"packages/artplayer/THIRD_PARTY_NOTICES"
|
||||
],
|
||||
"resolutionRationale": "Pinned upstream source and license contents, exhaustive normalized adaptation checks, actual package notices and standalone bundle headers verified. Local runtime retained; native fullscreen gestures and prefixed adapter tests pass. Historical screenfull acquisition tag is explicitly unknown; v6.0.2 is the fixed comparison reference."
|
||||
},
|
||||
{
|
||||
"id": "VENDOR-02",
|
||||
"title": "hint.css 来源、版本与许可闭环",
|
||||
"confirmation": "unverified",
|
||||
"status": "open",
|
||||
"confirmation": "source-observed",
|
||||
"status": "resolved",
|
||||
"owners": [
|
||||
"CORE-12"
|
||||
],
|
||||
@@ -412,7 +420,15 @@
|
||||
"packages/artplayer/src/style/hint.less"
|
||||
],
|
||||
"compatibleResolution": "Keep separate from owned TS migration. Verify source/version/diff and license notices before replacement; preserve API/CSS/worker URLs and run owning package tests.",
|
||||
"closureCriteria": "固定上游版本/内容差异、完整组件许可与分发 notices,兼容测试通过;仅当前上游许可证名称不足以关闭。"
|
||||
"closureCriteria": "固定上游版本/内容差异、完整组件许可与分发 notices,兼容测试通过;仅当前上游许可证名称不足以关闭。",
|
||||
"resolutionEvidence": [
|
||||
"refactor/changes/2026-09-11-CORE-12-template-resources.md",
|
||||
"refactor/baselines/template-resources-validation.json",
|
||||
"refactor/scripts/core-vendor.mjs",
|
||||
"test/core-vendor.test.js",
|
||||
"packages/artplayer/THIRD_PARTY_NOTICES"
|
||||
],
|
||||
"resolutionRationale": "Pinned upstream source and license contents, exhaustive normalized adaptation checks, actual package notices and standalone bundle headers verified. Local runtime retained; native fullscreen gestures and prefixed adapter tests pass. Historical screenfull acquisition tag is explicitly unknown; v6.0.2 is the fixed comparison reference."
|
||||
},
|
||||
{
|
||||
"id": "VENDOR-03",
|
||||
@@ -937,6 +953,46 @@
|
||||
"test/browser/media-events.spec.js"
|
||||
],
|
||||
"resolutionRationale": "Published/candidate real-browser comparisons reproduce stale retry or ghost ready and validate candidate cancellation. Owned source lifetimes preserve retries after switch rejection, while instance closure stops UI work; original Event/count and ordinary readiness order remain tested."
|
||||
},
|
||||
{
|
||||
"id": "BASE-I18N-01",
|
||||
"title": "Missing prototype-named translations return inherited functions",
|
||||
"confirmation": "reproduced",
|
||||
"status": "resolved",
|
||||
"owners": [
|
||||
"CORE-12"
|
||||
],
|
||||
"evidence": [
|
||||
"test/template-resources.test.js",
|
||||
"test/browser/template-resources.spec.js",
|
||||
"refactor/changes/2026-09-11-CORE-12-template-resources.md"
|
||||
],
|
||||
"compatibleResolution": "Read own dictionary keys while preserving explicit custom names and empty-string fallback.",
|
||||
"closureCriteria": "Published/candidate browser comparison, source tests and installed distribution entries pass.",
|
||||
"resolutionEvidence": [
|
||||
"refactor/changes/2026-09-11-CORE-12-template-resources.md",
|
||||
"refactor/baselines/template-resources-validation.json",
|
||||
"test/template-resources.test.js",
|
||||
"test/browser/template-resources.spec.js"
|
||||
],
|
||||
"resolutionRationale": "Published/candidate real browser comparison verifies own-key fallback while preserving explicit prototype-named translations and empty values. Installed UMD/legacy and all language entries pass."
|
||||
},
|
||||
{
|
||||
"id": "BASE-TYPE-09",
|
||||
"title": "Template and icon declarations claim incompatible DOM and static shapes",
|
||||
"confirmation": "source-observed",
|
||||
"status": "open",
|
||||
"owners": [
|
||||
"CORE-21"
|
||||
],
|
||||
"evidence": [
|
||||
"packages/artplayer/types/template.d.ts",
|
||||
"packages/artplayer/types/icons.d.ts",
|
||||
"test/browser/template-resources.spec.js",
|
||||
"refactor/changes/2026-09-11-CORE-12-template-resources.md"
|
||||
],
|
||||
"compatibleResolution": "Keep old legal declarations accepted, expose accurate template and icon views without inventing runtime properties.",
|
||||
"closureCriteria": "Old consumers and accurate template/media/icon view consumers pass all supported type modes and runtime shape checks."
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
import assert from 'node:assert/strict'
|
||||
import crypto from 'node:crypto'
|
||||
import fs from 'node:fs'
|
||||
import less from 'less'
|
||||
import ts from 'typescript'
|
||||
|
||||
const base = new URL('../baselines/core-vendor/', import.meta.url)
|
||||
const root = new URL('../../', import.meta.url)
|
||||
const read = name => fs.readFileSync(new URL(name, root), 'utf8')
|
||||
const sha = text => crypto.createHash('sha256').update(text).digest('hex')
|
||||
const print = source => ts.createPrinter({ removeComments: true }).printFile(ts.createSourceFile('vendor.js', source, ts.ScriptTarget.Latest, true, ts.ScriptKind.JS))
|
||||
|
||||
export async function checkCoreVendors() {
|
||||
const sources = JSON.parse(fs.readFileSync(new URL('sources.json', base), 'utf8'))
|
||||
for (const source of sources)
|
||||
assert.equal(sha(read(source.file)), source.sha256, `Upstream reference changed: ${source.file}`)
|
||||
|
||||
const reference = fs.readFileSync(new URL('screenfull-6.0.2.txt', base), 'utf8')
|
||||
const adapted = reference
|
||||
.replace('methodList?.[1]', 'methodList[1]')
|
||||
.replace('let screenfull =', 'const screenfull =')
|
||||
.replace('document[nativeAPI.fullscreenElement] ?? undefined', 'document[nativeAPI.fullscreenElement]')
|
||||
.replace(/if \(!nativeAPI\) \{\s*screenfull = \{isEnabled: false\};\s*\}/, '')
|
||||
assert.equal(print(read('packages/artplayer/src/libs/screenfull.js')), print(adapted), 'Unreviewed screenfull changes')
|
||||
|
||||
const hint = read('packages/artplayer/src/style/hint.less')
|
||||
assert(hint.startsWith('.art-video-player {'))
|
||||
const body = hint.slice(hint.indexOf('{') + 1, hint.lastIndexOf('}'))
|
||||
const upstream = fs.readFileSync(new URL('hint-2.7.0.txt', base), 'utf8')
|
||||
const render = async source => (await less.render(source, { compress: true })).css.replace(/\/\*[\s\S]*?\*\//g, '').replaceAll('"', '\'').trim()
|
||||
const expected = (await render(upstream)).replaceAll('#383838', '#000000').replace('display:inline-block}', 'display:inline-block;font-style:normal}')
|
||||
assert.equal(await render(body), expected, 'Unreviewed Hint.css changes')
|
||||
|
||||
const notices = read('packages/artplayer/THIRD_PARTY_NOTICES').replaceAll('\r\n', '\n')
|
||||
for (const name of ['screenfull-license.txt', 'hint-license.txt'])
|
||||
assert(notices.includes(fs.readFileSync(new URL(name, base), 'utf8').replaceAll('\r\n', '\n').trim()), `Incomplete bundled license: ${name}`)
|
||||
return { sources, local: Object.fromEntries(['packages/artplayer/src/libs/screenfull.js', 'packages/artplayer/src/style/hint.less', 'packages/artplayer/THIRD_PARTY_NOTICES'].map(name => [name, sha(read(name).replaceAll('\r\n', '\n'))])) }
|
||||
}
|
||||
+5
-2
@@ -970,11 +970,14 @@
|
||||
"CORE-04",
|
||||
"BASE-04"
|
||||
],
|
||||
"status": "todo",
|
||||
"status": "done",
|
||||
"risk": "H",
|
||||
"deliverable": "template/icons/i18n/style、SSR 与 proxy 挂载",
|
||||
"acceptance": "DOM/CSS/global/样式注入、i18n 子路径及 SSR import 保持;不把 SSR import/useSSR 保持扩大为服务端构造播放器;复跑 BASE-05 的 SSR import/模板、浏览器 useSSR 节点复用和非浏览器构造错误;接续 VENDOR-01/02,核对 screenfull/hint 复制版本、修改与分发通知,保留 DOM/CSS/fullscreen 行为",
|
||||
"evidence": []
|
||||
"evidence": [
|
||||
"changes/2026-09-11-CORE-12-template-resources.md",
|
||||
"baselines/template-resources-validation.json"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "CORE-13",
|
||||
|
||||
@@ -243,12 +243,13 @@
|
||||
"owners": [
|
||||
"CORE-12"
|
||||
],
|
||||
"sourceStatus": "Local filename/implementation identifies screenfull; exact upstream revision not established.",
|
||||
"licenseStatus": "Current upstream license is MIT; local copied file lacks a license header. Exact version and notice coverage remain unverified.",
|
||||
"sourceStatus": "Fixed v6.0.2 comparison reference with four verified local adaptations; original acquisition tag is not recorded. Runtime file unchanged.",
|
||||
"licenseStatus": "Pinned upstream MIT notice included verbatim in actual core tarball and all three standalone bundle headers; verified in CORE-12. Local copied implementation unchanged.",
|
||||
"upstreamSources": [
|
||||
"https://github.com/sindresorhus/screenfull/blob/main/license"
|
||||
"https://raw.githubusercontent.com/sindresorhus/screenfull/v6.0.2/index.js",
|
||||
"https://raw.githubusercontent.com/sindresorhus/screenfull/v6.0.2/license"
|
||||
],
|
||||
"upstreamReviewedAt": "2026-09-10",
|
||||
"upstreamReviewedAt": "2026-09-11",
|
||||
"updatePolicy": "Keep separate from owned TS migration. Verify source/version/diff and license notices before replacement; preserve API/CSS/worker URLs and run owning package tests.",
|
||||
"fingerprints": [
|
||||
{
|
||||
@@ -256,6 +257,13 @@
|
||||
"algorithm": "sha256-lf",
|
||||
"sha256": "2332b50c0c6364d5c99080be0f5739255e4b9e465d2cca40f761adce9a1908f8"
|
||||
}
|
||||
],
|
||||
"reviewEvidence": [
|
||||
"refactor/changes/2026-09-11-CORE-12-template-resources.md",
|
||||
"refactor/baselines/core-vendor/sources.json",
|
||||
"refactor/scripts/core-vendor.mjs",
|
||||
"test/core-vendor.test.js",
|
||||
"refactor/baselines/template-resources-validation.json"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -267,12 +275,13 @@
|
||||
"owners": [
|
||||
"CORE-12"
|
||||
],
|
||||
"sourceStatus": "Local header names Hint.css 2.7.0, 2021-10-01; code is scoped/adapted in Less.",
|
||||
"licenseStatus": "Local copyright header and current upstream MIT license observed; exact upstream diff and shipped notices pending.",
|
||||
"sourceStatus": "Header identifies v2.7.0; full normalized CSS comparison verifies ArtPlayer scoping, font-style and default color adaptations. Runtime file unchanged.",
|
||||
"licenseStatus": "Pinned upstream MIT notice included verbatim in actual core tarball and all three standalone bundle headers; verified in CORE-12. Local copied implementation unchanged.",
|
||||
"upstreamSources": [
|
||||
"https://github.com/chinchang/hint.css/blob/master/LICENSE"
|
||||
"https://raw.githubusercontent.com/chinchang/hint.css/v2.7.0/hint.css",
|
||||
"https://raw.githubusercontent.com/chinchang/hint.css/v2.7.0/LICENSE"
|
||||
],
|
||||
"upstreamReviewedAt": "2026-09-10",
|
||||
"upstreamReviewedAt": "2026-09-11",
|
||||
"updatePolicy": "Keep separate from owned TS migration. Verify source/version/diff and license notices before replacement; preserve API/CSS/worker URLs and run owning package tests.",
|
||||
"fingerprints": [
|
||||
{
|
||||
@@ -280,6 +289,13 @@
|
||||
"algorithm": "sha256-lf",
|
||||
"sha256": "e2dc4940e6b212d8da75a404fd5ff1ad894008457677bc37554c6b64b735bc31"
|
||||
}
|
||||
],
|
||||
"reviewEvidence": [
|
||||
"refactor/changes/2026-09-11-CORE-12-template-resources.md",
|
||||
"refactor/baselines/core-vendor/sources.json",
|
||||
"refactor/scripts/core-vendor.mjs",
|
||||
"test/core-vendor.test.js",
|
||||
"refactor/baselines/template-resources-validation.json"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -11,9 +11,9 @@ const i18nSrcDir = path.join(basePath, 'src/i18n')
|
||||
const distDir = path.join(basePath, 'dist/i18n')
|
||||
const compiledPath = path.resolve('docs/compiled/i18n')
|
||||
|
||||
const entries = glob.sync('*.js', {
|
||||
const entries = glob.sync('*.{js,ts}', {
|
||||
cwd: i18nSrcDir,
|
||||
ignore: ['index.js', 'zh-cn.js'],
|
||||
ignore: ['index.{js,ts}', 'publish.{js,ts}', 'zh-cn.{js,ts}', '*.d.ts'],
|
||||
}).map(f => path.join(i18nSrcDir, f))
|
||||
|
||||
async function buildI18n() {
|
||||
@@ -23,7 +23,7 @@ async function buildI18n() {
|
||||
fs.mkdirSync(distDir, { recursive: true })
|
||||
|
||||
for (const entry of entries) {
|
||||
const baseName = path.basename(entry, '.js')
|
||||
const baseName = path.basename(entry, path.extname(entry))
|
||||
const globalName = `artplayerI18n${toPascalCase(baseName)}`
|
||||
|
||||
// Build UMD and ESM formats
|
||||
|
||||
+4
-1
@@ -10,11 +10,14 @@ const projects = getProjects()
|
||||
const compiledPath = path.resolve('docs/compiled')
|
||||
|
||||
function getBanner(name, version) {
|
||||
const noticeFile = path.join(projects[name], 'THIRD_PARTY_NOTICES')
|
||||
const notices = fs.existsSync(noticeFile) ? fs.readFileSync(noticeFile, 'utf8').trim() : ''
|
||||
const noticeBlock = notices ? `\n *\n${notices.split(/\r?\n/).map(line => line.trimEnd() ? ` * ${line.trimEnd()}` : ' *').join('\n')}` : ''
|
||||
return `/*!
|
||||
* ${name}.js v${version}
|
||||
* Github: https://github.com/zhw2590582/ArtPlayer
|
||||
* (c) 2017-${new Date().getFullYear()} Harvey Zhao
|
||||
* Released under the MIT License.
|
||||
* Released under the MIT License.${noticeBlock}
|
||||
*/`
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
import { expect, test } from './fixtures.js'
|
||||
|
||||
for (const core of ['published', 'candidate']) {
|
||||
test(`${core}: native fullscreen uses a real gesture when the engine supports it`, async ({ page }, testInfo) => {
|
||||
await page.goto(`/test/player.html?core=${core}&chapter=published`)
|
||||
await page.evaluate(() => window.createPlayer('/test/pattern.mp4'))
|
||||
await expect.poll(() => page.evaluate(() => window.art.isReady)).toBe(true)
|
||||
const capability = await page.evaluate(() => ({
|
||||
native: Boolean(document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled),
|
||||
video: Boolean(window.art.video.webkitSupportsFullscreen),
|
||||
}))
|
||||
await testInfo.attach('native-fullscreen-capability', { contentType: 'application/json', body: JSON.stringify(capability) })
|
||||
if (!capability.native) {
|
||||
expect(await page.evaluate(() => Boolean(document.fullscreenElement || document.webkitFullscreenElement))).toBe(false)
|
||||
return
|
||||
}
|
||||
await page.evaluate(() => {
|
||||
window.fullscreenEvents = []
|
||||
window.art.on('fullscreen', value => window.fullscreenEvents.push(value))
|
||||
document.querySelector('#play').onclick = () => {
|
||||
window.art.fullscreen = true
|
||||
}
|
||||
})
|
||||
await page.click('#play')
|
||||
await expect.poll(() => page.evaluate(() => {
|
||||
const art = window.art
|
||||
return art.fullscreen && (document.fullscreenElement || document.webkitFullscreenElement) === art.template.$player && art.template.$player.classList.contains('art-fullscreen')
|
||||
})).toBe(true)
|
||||
await page.evaluate(() => {
|
||||
window.art.fullscreen = false
|
||||
})
|
||||
await expect.poll(() => page.evaluate(() => !window.art.fullscreen && !window.art.template.$player.classList.contains('art-fullscreen'))).toBe(true)
|
||||
expect(await page.evaluate(() => window.fullscreenEvents)).toEqual([true, false])
|
||||
await page.evaluate(() => window.art.destroy())
|
||||
})
|
||||
|
||||
test(`${core}: SSR mounting preserves nodes, listeners, selectors and style ownership`, async ({ page }) => {
|
||||
await page.goto(`/test/player.html?core=${core}&chapter=published`)
|
||||
const result = await page.evaluate(() => {
|
||||
const container = document.querySelector('.player')
|
||||
container.innerHTML = window.Artplayer.html
|
||||
const original = Array.from(container.querySelectorAll('*'))
|
||||
const video = container.querySelector('video')
|
||||
const player = container.firstElementChild
|
||||
let clicks = 0
|
||||
player.addEventListener('contract', () => clicks++)
|
||||
const style = document.getElementById('artplayer-style')
|
||||
const art = new window.Artplayer({ container, url: '', useSSR: true, backdrop: true })
|
||||
const { query } = art.template
|
||||
player.dispatchEvent(new Event('contract'))
|
||||
const mounted = {
|
||||
retained: original.every(node => container.contains(node)),
|
||||
media: art.video === video,
|
||||
query: query('.art-video') === video && query('.absent') === null,
|
||||
backdrop: player.classList.contains('art-backdrop'),
|
||||
track: art.template.$track === video.querySelector('track'),
|
||||
clicks,
|
||||
style: style.textContent === window.Artplayer.STYLE,
|
||||
}
|
||||
art.destroy(false)
|
||||
return { ...mounted, retainedOnDestroy: container.contains(player), destroyed: player.classList.contains('art-destroy'), styleRetained: document.getElementById('artplayer-style') === style }
|
||||
})
|
||||
expect(result).toEqual({ retained: true, media: true, query: true, backdrop: true, track: true, clicks: 1, style: true, retainedOnDestroy: true, destroyed: true, styleRetained: true })
|
||||
})
|
||||
|
||||
test(`${core}: proxy replacement preserves callback and node identity`, async ({ page }) => {
|
||||
await page.goto(`/test/player.html?core=${core}&chapter=published`)
|
||||
const result = await page.evaluate(() => {
|
||||
const container = document.querySelector('.player')
|
||||
container.innerHTML = window.Artplayer.html
|
||||
const track = container.querySelector('track')
|
||||
const originalVideo = container.querySelector('video')
|
||||
const video = document.createElement('video')
|
||||
video.className = 'before'
|
||||
let callback
|
||||
let context
|
||||
let count
|
||||
const art = new window.Artplayer({ container, url: '', useSSR: true, proxy(art) {
|
||||
callback = art
|
||||
context = this
|
||||
count = arguments.length
|
||||
return video
|
||||
} })
|
||||
const result = { callback: callback === art && context === art, count, media: art.video === video, className: video.className, retainedTrack: art.template.$track === track, detachedTrack: !container.contains(track), detachedVideo: !container.contains(originalVideo) }
|
||||
art.destroy()
|
||||
return { ...result, empty: container.innerHTML === '' }
|
||||
})
|
||||
expect(result).toEqual({ callback: true, count: 1, media: true, className: 'art-video', retainedTrack: true, detachedTrack: true, detachedVideo: true, empty: true })
|
||||
})
|
||||
|
||||
test(`${core}: icon access preserves descriptors and moves custom DOM into fresh wrappers`, async ({ page }) => {
|
||||
await page.goto(`/test/player.html?core=${core}&chapter=published`)
|
||||
const result = await page.evaluate(() => {
|
||||
const node = document.createElement('b')
|
||||
node.textContent = 'custom'
|
||||
const art = new window.Artplayer({ container: '.player', url: '', icons: { custom: node, markup: '<em>markup</em>' } })
|
||||
const first = art.icons.custom
|
||||
const second = art.icons.custom
|
||||
const builtin = art.icons.play
|
||||
const descriptor = Object.getOwnPropertyDescriptor(art.icons, 'custom')
|
||||
const result = { tag: second.tagName, fresh: first !== second, moved: first.childNodes.length === 0 && second.firstChild === node, classes: second.className, markup: art.icons.markup.innerHTML, builtins: builtin !== art.icons.play, flags: [descriptor.enumerable, descriptor.configurable, descriptor.set === undefined], alias: window['artplayer-i18n-zh-cn'].Play }
|
||||
art.destroy()
|
||||
return result
|
||||
})
|
||||
expect(result).toEqual({ tag: 'I', fresh: true, moved: true, classes: 'art-icon art-icon-custom', markup: '<em>markup</em>', builtins: true, flags: [false, false, true], alias: '播放' })
|
||||
})
|
||||
|
||||
test(`${core}: i18n prototype fallback difference and custom keys are explicit`, async ({ page }) => {
|
||||
await page.goto(`/test/player.html?core=${core}&chapter=published`)
|
||||
const result = await page.evaluate(() => {
|
||||
const art = new window.Artplayer({ container: '.player', url: '', lang: 'en' })
|
||||
const inherited = typeof art.i18n.get('constructor')
|
||||
art.i18n.update({ en: { constructor: 'custom', Play: '' } })
|
||||
const result = { inherited, custom: art.i18n.get('constructor'), empty: art.i18n.get('Play'), missing: art.i18n.get('Not translated') }
|
||||
art.destroy()
|
||||
return result
|
||||
})
|
||||
expect(result).toEqual({ inherited: core === 'candidate' ? 'string' : 'function', custom: 'custom', empty: 'Play', missing: 'Not translated' })
|
||||
})
|
||||
|
||||
test(`${core}: fullscreen web retains DOM and CSS hooks through entry and exit`, async ({ page }) => {
|
||||
await page.goto(`/test/player.html?core=${core}&chapter=published`)
|
||||
const result = await page.evaluate(() => {
|
||||
const art = new window.Artplayer({ container: '.player', url: '' })
|
||||
const player = art.template.$player
|
||||
const parent = player.parentNode
|
||||
const events = []
|
||||
art.on('fullscreenWeb', value => events.push(value))
|
||||
art.fullscreenWeb = true
|
||||
const entered = art.fullscreenWeb && player.classList.contains('art-fullscreen-web')
|
||||
art.fullscreenWeb = false
|
||||
const exited = !art.fullscreenWeb && !player.classList.contains('art-fullscreen-web')
|
||||
const identity = art.template.$player === player && player.parentNode === parent
|
||||
art.destroy()
|
||||
return { entered, exited, identity, events }
|
||||
})
|
||||
expect(result).toEqual({ entered: true, exited: true, identity: true, events: [true, false] })
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
import assert from 'node:assert/strict'
|
||||
import fs from 'node:fs'
|
||||
// eslint-disable-next-line test/no-import-node-test -- Use the repository Node test runner.
|
||||
import { test } from 'node:test'
|
||||
import vm from 'node:vm'
|
||||
import { checkCoreVendors } from '../refactor/scripts/core-vendor.mjs'
|
||||
|
||||
test('copied core libraries match fixed references plus reviewed local adaptations', async () => {
|
||||
const evidence = await checkCoreVendors()
|
||||
assert.equal(evidence.sources.length, 4)
|
||||
})
|
||||
|
||||
const methods = [
|
||||
['requestFullscreen', 'exitFullscreen', 'fullscreenElement', 'fullscreenEnabled', 'fullscreenchange'],
|
||||
['webkitRequestFullscreen', 'webkitExitFullscreen', 'webkitFullscreenElement', 'webkitFullscreenEnabled', 'webkitfullscreenchange'],
|
||||
['webkitRequestFullScreen', 'webkitCancelFullScreen', 'webkitCurrentFullScreenElement', 'webkitCancelFullScreen', 'webkitfullscreenchange'],
|
||||
['mozRequestFullScreen', 'mozCancelFullScreen', 'mozFullScreenElement', 'mozFullScreenEnabled', 'mozfullscreenchange'],
|
||||
['msRequestFullscreen', 'msExitFullscreen', 'msFullscreenElement', 'msFullscreenEnabled', 'MSFullscreenChange'],
|
||||
]
|
||||
const source = fs.readFileSync(new URL('../packages/artplayer/src/libs/screenfull.js', import.meta.url), 'utf8').replace('export default screenfull', 'globalThis.result = screenfull')
|
||||
|
||||
for (const [request, exit, element, enabled, change] of methods) {
|
||||
test(`screenfull preserves ${request} mapping, options, promise completion and listeners`, async () => {
|
||||
const listeners = new Map()
|
||||
const options = { navigationUI: 'hide' }
|
||||
const document = {
|
||||
[element]: null,
|
||||
[enabled]: true,
|
||||
[exit]() {
|
||||
this[element] = null
|
||||
listeners.get(change)?.()
|
||||
return Promise.resolve()
|
||||
},
|
||||
addEventListener(name, callback) { listeners.set(name, callback) },
|
||||
removeEventListener(name, callback) {
|
||||
if (listeners.get(name) === callback)
|
||||
listeners.delete(name)
|
||||
},
|
||||
}
|
||||
document.documentElement = {
|
||||
[request](actual) {
|
||||
assert.equal(actual, options)
|
||||
document[element] = this
|
||||
listeners.get(change)?.()
|
||||
return Promise.resolve()
|
||||
},
|
||||
}
|
||||
const context = { document, Promise }
|
||||
vm.runInNewContext(source, context)
|
||||
const screenfull = context.result
|
||||
assert.equal(screenfull.isEnabled, true)
|
||||
assert.equal(screenfull.element, null)
|
||||
assert.equal(await screenfull.request(undefined, options), undefined)
|
||||
assert.equal(screenfull.element, document.documentElement)
|
||||
assert.equal(screenfull.isFullscreen, true)
|
||||
assert.equal(listeners.size, 0)
|
||||
assert.equal(await screenfull.toggle(), undefined)
|
||||
assert.equal(screenfull.isFullscreen, false)
|
||||
assert.equal(listeners.size, 0)
|
||||
})
|
||||
}
|
||||
|
||||
test('screenfull import remains inert without document and retains local disabled surface', () => {
|
||||
const context = {}
|
||||
vm.runInNewContext(source, context)
|
||||
assert.equal(typeof context.result.request, 'function')
|
||||
assert.equal(context.result.raw, false)
|
||||
const browser = { document: {} }
|
||||
vm.runInNewContext(source, browser)
|
||||
assert.equal(browser.result.isEnabled, false)
|
||||
assert.equal(browser.result.element, undefined)
|
||||
})
|
||||
@@ -63,14 +63,25 @@ const vm = require('node:vm');
|
||||
check('SSR.constructor-browser-only', observations.constructorErrors.length === 6)
|
||||
observations.languages = []
|
||||
const languages = fs.readdirSync(path.join(root, 'node_modules/artplayer/dist/i18n')).filter(file => file.endsWith('.mjs')).map(file => file.slice(0, -4)).sort()
|
||||
assert.deepEqual(languages, ['ar', 'cs', 'es', 'fa', 'fr', 'id', 'pl', 'ru', 'tr', 'vi', 'zh-tw'])
|
||||
assert.deepEqual(fs.readdirSync(path.join(root, 'node_modules/artplayer/dist/i18n')).sort(), languages.flatMap(name => [`${name}.js`, `${name}.mjs`]).sort())
|
||||
for (const name of languages) {
|
||||
const cjs = require(`artplayer/i18n/${name}`)
|
||||
const module = await import(`artplayer/i18n/${name}`)
|
||||
globalThis.window = {}
|
||||
let module
|
||||
try {
|
||||
module = await import(`artplayer/i18n/${name}`)
|
||||
assert.equal(globalThis.window[`artplayer-i18n-${name}`], module.default)
|
||||
}
|
||||
finally {
|
||||
delete globalThis.window
|
||||
}
|
||||
assert.deepEqual(module.default, cjs)
|
||||
const globalName = `artplayerI18n${name.replace(/(^|-)([a-z])/g, (_, _prefix, char) => char.toUpperCase())}`
|
||||
const context = vm.createContext({})
|
||||
const context = vm.createContext({ window: {} })
|
||||
vm.runInContext(load(`artplayer/dist/i18n/${name}.js`), context, { timeout: 2000 })
|
||||
assert.equal(JSON.stringify(context[globalName]), JSON.stringify(cjs))
|
||||
assert.equal(context.window[`artplayer-i18n-${name}`], context[globalName])
|
||||
observations.languages.push({ name, globalName, keys: Object.keys(cjs).sort(), play: cjs.Play })
|
||||
}
|
||||
check('DIST.i18n-cjs-esm-global', languages.length > 0)
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
import assert from 'node:assert/strict'
|
||||
// eslint-disable-next-line test/no-import-node-test -- Use the repository Node test runner.
|
||||
import { test } from 'node:test'
|
||||
import { loadModules, loadPackage, loadPublishedCore } from './helpers/load.js'
|
||||
|
||||
const { I18n, html } = await loadModules({
|
||||
I18n: 'packages/artplayer/src/i18n/index',
|
||||
html: 'packages/artplayer/src/template/html',
|
||||
})
|
||||
|
||||
test('language selection, extension and fallback preserve case and truthy semantics', () => {
|
||||
const host = { option: { lang: 'ZH-CN', i18n: { 'zh-cn': { Play: 'custom' }, 'extension': { Play: 'extension', Empty: '' } } } }
|
||||
const i18n = new I18n(host)
|
||||
assert.equal(i18n.get('Play'), 'custom')
|
||||
assert.equal(i18n.get('Pause'), '暂停')
|
||||
assert.equal(i18n.get('Missing'), 'Missing')
|
||||
host.option.lang = 'EXTENSION'
|
||||
assert.equal(i18n.update({ extension: { Pause: 'pause' } }), undefined)
|
||||
assert.equal(i18n.get('Play'), 'extension')
|
||||
assert.equal(i18n.get('Pause'), 'pause')
|
||||
assert.equal(i18n.get('Empty'), 'Empty')
|
||||
assert.deepEqual(host.option.i18n.extension, { Play: 'extension', Empty: '' })
|
||||
host.option.lang = 'UNKNOWN'
|
||||
i18n.init()
|
||||
assert.equal(i18n.get('Play'), 'Play')
|
||||
})
|
||||
|
||||
test('prototype names fall back as strings and explicit own translations remain usable', () => {
|
||||
const host = { option: { lang: 'constructor', i18n: {} } }
|
||||
const i18n = new I18n(host)
|
||||
for (const key of ['constructor', 'toString', '__proto__'])
|
||||
assert.equal(i18n.get(key), key)
|
||||
i18n.update(JSON.parse('{"constructor":{"constructor":"ctor","toString":"string","__proto__":"proto"}}'))
|
||||
assert.equal(i18n.get('constructor'), 'ctor')
|
||||
assert.equal(i18n.get('toString'), 'string')
|
||||
assert.equal(i18n.get('__proto__'), 'proto')
|
||||
assert.equal(Object.getPrototypeOf(i18n.languages), Object.prototype)
|
||||
assert.equal(Object.getPrototypeOf(i18n.language), Object.prototype)
|
||||
})
|
||||
|
||||
test('language updates remain isolated between instances', () => {
|
||||
const host = { option: { lang: 'zh-cn', i18n: {} } }
|
||||
const first = new I18n(host)
|
||||
const second = new I18n(host)
|
||||
first.update({ 'zh-cn': { Play: 'first' } })
|
||||
assert.equal(first.get('Play'), 'first')
|
||||
assert.equal(second.get('Play'), '播放')
|
||||
})
|
||||
|
||||
test('SSR imports expose exact historical template and retain browser-only construction', async () => {
|
||||
const { Artplayer: published } = await loadPublishedCore()
|
||||
const { default: candidate } = await loadPackage('artplayer')
|
||||
assert.equal(html, candidate.html)
|
||||
assert.equal(candidate.html.replace(candidate.version, '<version>'), published.html.replace(published.version, '<version>'))
|
||||
for (const Artplayer of [published, candidate]) {
|
||||
assert.throws(() => new Artplayer({ container: '#player', url: '' }), {
|
||||
message: 'Artplayer can only be used in the browser environment',
|
||||
})
|
||||
assert.equal(Artplayer.instances.length, 0)
|
||||
}
|
||||
})
|
||||
Loaded 100 of 101 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user