refactor(core): [CORE-23] complete keyboard controls and focus lifecycle

This commit is contained in:
Harvey Zhao committed 2026-09-11 21:06:33 +08:00
1 parent faaa3e8c2d
commit 8ed0a5228c
190 files changed
+53981 -489

No files matched your search

+5
View File
@@ -275,10 +275,15 @@ declare namespace ArtplayerDefinitions {
}
export type I18nKeys = 'en' | 'zh-cn' | 'zh-tw' | 'pl' | 'cs' | 'es' | 'fa' | 'fr' | 'id' | 'ru' | 'tr' | 'ar' | 'vi' | (string & Record<never, never>)
export interface I18nValue {
'Context Menu'?: string
'Lock'?: string
'Video Info': string
'Close': string
'Video Load Failed': string
'Volume': string
'Progress'?: string
'Back'?: string
'Settings'?: string
'Play': string
'Pause': string
'Rate': string
+1 -1
View File
@@ -67,4 +67,4 @@
* 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 n=(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 o=t(r);if("boolean"===o)return"boolean";if("string"===o)return"string";if("number"===o)return"number";if("symbol"===o)return"symbol";if("function"===o)return"GeneratorFunction"===n(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(n(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(o=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 o.slice(8,-1).toLowerCase().replace(/\s/g,"")};function n(t){return t.constructor?t.constructor.name:null}function o(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:["option"];return i(t,e,n),a(t,e,n),function(t,e,n){var s=r(e),l=r(t);if("object"===s){if("object"!==l)throw new Error("[Type Error]: '".concat(n.join("."),"' require 'object' type, but got '").concat(l,"'"));Object.keys(e).forEach(function(r){var s=t[r],l=e[r],c=n.slice();c.push(r),i(s,l,c),a(s,l,c),o(s,l,c)})}if("array"===s){if("array"!==l)throw new Error("[Type Error]: '".concat(n.join("."),"' require 'array' type, but got '").concat(l,"'"));t.forEach(function(r,s){var l=t[s],c=e[s]||e[0],d=n.slice();d.push(s),i(l,c,d),a(l,c,d),o(l,c,d)})}}(t,e,n),t}function i(t,e,n){if("string"===r(e)){var o=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 o===t}):e.toLowerCase().trim()===o))throw new Error("[Type Error]: '".concat(n.join("."),"' require '").concat(e,"' type, but got '").concat(o,"'"))}}function a(t,e,n){if("function"===r(e)){var o=e(t,r(t),n);if(!0!==o){var i=r(o);throw"string"===i?new Error(o):"error"===i?o:new Error("[Validator Error]: The scheme for '".concat(n.join("."),"' validator require return true, but got '").concat(o,"'"))}}}return o.kindOf=r,o}()),r.exports);const o=t(n),i="5.4.1";function a(t,e){let r=document.getElementById(t);r||(r=document.createElement("style"),r.id=t,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(r)}):(document.head||document.documentElement).appendChild(r)),r.textContent=e}const s=globalThis.CUSTOM_USER_AGENT??("undefined"===typeof navigator?"":navigator.userAgent),l=/^(?:(?!chrome|android).)*safari/i.test(s),c=/iPad|iPhone|iPod/i.test(s)&&("undefined"===typeof window||!window.MSStream),d=c||s.includes("Macintosh")&&"undefined"!==typeof navigator&&navigator.maxTouchPoints>=1,p=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(s)||d,u="undefined"!==typeof window&&"undefined"!==typeof document;const h={properties:["audioTracks","autoplay","buffered","controller","controlLine 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 n=(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 o=t(r);if("boolean"===o)return"boolean";if("string"===o)return"string";if("number"===o)return"number";if("symbol"===o)return"symbol";if("function"===o)return"GeneratorFunction"===n(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(n(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(o=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 o.slice(8,-1).toLowerCase().replace(/\s/g,"")};function n(t){return t.constructor?t.constructor.name:null}function o(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:["option"];return i(t,e,n),a(t,e,n),function(t,e,n){var s=r(e),c=r(t);if("object"===s){if("object"!==c)throw new Error("[Type Error]: '".concat(n.join("."),"' require 'object' type, but got '").concat(c,"'"));Object.keys(e).forEach(function(r){var s=t[r],c=e[r],l=n.slice();l.push(r),i(s,c,l),a(s,c,l),o(s,c,l)})}if("array"===s){if("array"!==c)throw new Error("[Type Error]: '".concat(n.join("."),"' require 'array' type, but got '").concat(c,"'"));t.forEach(function(r,s){var c=t[s],l=e[s]||e[0],d=n.slice();d.push(s),i(c,l,d),a(c,l,d),o(c,l,d)})}}(t,e,n),t}function i(t,e,n){if("string"===r(e)){var o=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 o===t}):e.toLowerCase().trim()===o))throw new Error("[Type Error]: '".concat(n.join("."),"' require '").concat(e,"' type, but got '").concat(o,"'"))}}function a(t,e,n){if("function"===r(e)){var o=e(t,r(t),n);if(!0!==o){var i=r(o);throw"string"===i?new Error(o):"error"===i?o:new Error("[Validator Error]: The scheme for '".concat(n.join("."),"' validator require return true, but got '").concat(o,"'"))}}}return o.kindOf=r,o}()),r.exports);const o=t(n),i="5.4.1";function a(t,e){let r=document.getElementById(t);r||(r=document.createElement("style"),r.id=t,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(r)}):(document.head||document.documentElement).appendChild(r)),r.textContent=e}const s=globalThis.CUSTOM_USER_AGENT??("undefined"===typeof navigator?"":navigator.userAgent),c=/^(?:(?!chrome|android).)*safari/i.test(s),l=/iPad|iPhone|iPod/i.test(s)&&("undefined"===typeof window||!window.MSStream),d=l||s.includes("Macintosh")&&"undefined"!==typeof navigator&&navigator.maxTouchPoints>=1,u=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(s)||d,p="undefined"!==typeof window&&"undefined"!==typeof document;const f={properties:["audioTracks","autoplay","buffered","controller","controlLine truncated
+1 -1
View File
@@ -67,4 +67,4 @@
* 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=Object.defineProperty,e=Object.defineProperties,r=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,a=(e,r,n)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,s=(t,e)=>{for(var r in e||(e={}))o.call(e,r)&&a(t,r,e[r]);if(n)for(var r of n(e))i.call(e,r)&&a(t,r,e[r]);return t},l=(t,n)=>e(t,r(n)),c=(t,e,r)=>new Promise((n,o)=>{var i=t=>{try{s(r.next(t))}catch(e){o(e)}},a=t=>{try{s(r.throw(t))}catch(e){o(e)}},s=t=>t.done?n(t.value):Promise.resolve(t.value).then(i,a);s((r=r.apply(t,e)).next())});function d(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var u,p={exports:{}};var h=(u||(u=1,p.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 o=t(r);if("boolean"===o)return"boolean";if("string"===o)return"string";if("number"===o)return"number";if("symbol"===o)return"symbol";if("function"===o)return"GeneratorFunction"===n(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(n(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(o=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 o.slice(8,-1).toLowerCase().replace(/\s/g,"")};function n(t){return t.constructor?t.constructor.name:null}function o(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:["option"];return i(t,e,n),a(t,e,n),function(t,e,n){var s=r(e),l=r(t);if("object"===s){if("object"!==l)throw new Error("[Type Error]: '".concat(n.join("."),"' require 'object' type, but got '").concat(l,"'"));Object.keys(e).forEach(function(r){var s=t[r],l=e[r],c=n.slice();c.push(r),i(s,l,c),a(s,l,c),o(s,l,c)})}if("array"===s){if("array"!==l)throw new Error("[Type Error]: '".concat(n.join("."),"' require 'array' type, but got '").concat(l,"'"));t.forEach(function(r,s){var l=t[s],c=e[s]||e[0],d=n.slice();d.push(s),i(l,c,d),a(l,c,d),o(l,c,d)})}}(t,e,n),t}function i(t,e,n){if("string"===r(e)){var o=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 o===t}):e.toLowerCase().trim()===o))throw new Error("[Type Error]: '".concat(n.join("."),"' require '").concat(e,"' type, but got '").concat(o,"'"))}}function a(t,e,n){if("function"===r(e)){var o=e(t,r(t),n);if(!0!==o){var i=r(o);throw"string"===i?new Error(o):"error"===i?o:new Error("[Validator Error]: The scheme for '".concat(n.join("."),"' validator require return true, but got '").concat(o,"'"))}}}return o.kindOf=r,o}()),p.exports);const f=d(h),m="5.4.1";function g(t,e){let r=document.getElementById(t);r||(r=document.createElement("style"),r.id=t,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.apLine 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=Object.defineProperty,e=Object.defineProperties,r=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,a=(e,r,n)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,s=(t,e)=>{for(var r in e||(e={}))o.call(e,r)&&a(t,r,e[r]);if(n)for(var r of n(e))i.call(e,r)&&a(t,r,e[r]);return t},l=(t,n)=>e(t,r(n)),c=(t,e,r)=>new Promise((n,o)=>{var i=t=>{try{s(r.next(t))}catch(e){o(e)}},a=t=>{try{s(r.throw(t))}catch(e){o(e)}},s=t=>t.done?n(t.value):Promise.resolve(t.value).then(i,a);s((r=r.apply(t,e)).next())});function d(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var u,p={exports:{}};var f=(u||(u=1,p.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 o=t(r);if("boolean"===o)return"boolean";if("string"===o)return"string";if("number"===o)return"number";if("symbol"===o)return"symbol";if("function"===o)return"GeneratorFunction"===n(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(n(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(o=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 o.slice(8,-1).toLowerCase().replace(/\s/g,"")};function n(t){return t.constructor?t.constructor.name:null}function o(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:["option"];return i(t,e,n),a(t,e,n),function(t,e,n){var s=r(e),l=r(t);if("object"===s){if("object"!==l)throw new Error("[Type Error]: '".concat(n.join("."),"' require 'object' type, but got '").concat(l,"'"));Object.keys(e).forEach(function(r){var s=t[r],l=e[r],c=n.slice();c.push(r),i(s,l,c),a(s,l,c),o(s,l,c)})}if("array"===s){if("array"!==l)throw new Error("[Type Error]: '".concat(n.join("."),"' require 'array' type, but got '").concat(l,"'"));t.forEach(function(r,s){var l=t[s],c=e[s]||e[0],d=n.slice();d.push(s),i(l,c,d),a(l,c,d),o(l,c,d)})}}(t,e,n),t}function i(t,e,n){if("string"===r(e)){var o=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 o===t}):e.toLowerCase().trim()===o))throw new Error("[Type Error]: '".concat(n.join("."),"' require '").concat(e,"' type, but got '").concat(o,"'"))}}function a(t,e,n){if("function"===r(e)){var o=e(t,r(t),n);if(!0!==o){var i=r(o);throw"string"===i?new Error(o):"error"===i?o:new Error("[Validator Error]: The scheme for '".concat(n.join("."),"' validator require return true, but got '").concat(o,"'"))}}}return o.kindOf=r,o}()),p.exports);const h=d(f),m="5.4.1";function v(t,e){let r=document.getElementById(t);r||(r=document.createElement("style"),r.id=t,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.apLine truncated
+1336 -179
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -1 +1 @@
(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}));
(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={"Context Menu":"قائمة السياق",Lock:"قفل",Back:"رجوع",Settings:"الإعدادات",Progress:"تقدم التشغيل","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}));
+5
View File
@@ -5,6 +5,11 @@ function i(e, t) {
}
}
const o = {
"Context Menu": "قائمة السياق",
Lock: "قفل",
Back: "رجوع",
Settings: "الإعدادات",
Progress: "تقدم التشغيل",
"Video Info": "معلومات الفيديو",
Close: "إغلاق",
"Video Load Failed": "فشل تحميل الفيديو",
+1 -1
View File
@@ -1 +1 @@
(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}));
(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,n){if(typeof window<"u"){const i=window;i[o]=n}}const e={"Context Menu":"Kontextová nabídka",Lock:"Zamknout",Back:"Zpět",Settings:"Nastavení",Progress:"Průběh přehrávání","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}));
+9 -4
View File
@@ -1,10 +1,15 @@
function i(e, t) {
function n(e, t) {
if (typeof window < "u") {
const o = window;
o[e] = t;
}
}
const n = {
const i = {
"Context Menu": "Kontextová nabídka",
Lock: "Zamknout",
Back: "Zpět",
Settings: "Nastavení",
Progress: "Průběh přehrávání",
"Video Info": "Info o videu",
Close: "Zavřít",
"Video Load Failed": "Nahrání videa selhalo",
@@ -42,7 +47,7 @@ const n = {
AirPlay: "AirPlay",
"AirPlay Not Available": "AirPlay není k dispozici"
};
i("artplayer-i18n-cs", n);
n("artplayer-i18n-cs", i);
export {
n as default
i as default
};
+1 -1
View File
@@ -1 +1 @@
(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}));
(function(o,e){typeof exports=="object"&&typeof module<"u"?module.exports=e():typeof define=="function"&&define.amd?define(e):(o=typeof globalThis<"u"?globalThis:o||self,o.artplayerI18nEs=e())})(this,(function(){"use strict";function o(a,t){if(typeof window<"u"){const i=window;i[a]=t}}const e={"Context Menu":"Menú contextual",Lock:"Bloquear",Back:"Volver",Settings:"Configuración",Progress:"Progreso de reproducción","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 o("artplayer-i18n-es",e),e}));
+5
View File
@@ -5,6 +5,11 @@ function l(e, a) {
}
}
const t = {
"Context Menu": "Menú contextual",
Lock: "Bloquear",
Back: "Volver",
Settings: "Configuración",
Progress: "Progreso de reproducción",
"Video Info": "Información del video",
Close: "Cerrar",
"Video Load Failed": "Falló carga de video",
+1 -1
View File
@@ -1 +1 @@
(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}));
(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={"Context Menu":"منوی زمینه",Lock:"قفل",Back:"بازگشت",Settings:"تنظیمات",Progress:"پیشرفت پخش","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}));
+9 -4
View File
@@ -1,10 +1,15 @@
function i(e, t) {
function o(e, t) {
if (typeof window < "u") {
const l = window;
l[e] = t;
}
}
const o = {
const i = {
"Context Menu": "منوی زمینه",
Lock: "قفل",
Back: "بازگشت",
Settings: "تنظیمات",
Progress: "پیشرفت پخش",
"Video Info": "اطلاعات ویدیو",
Close: "بستن",
"Video Load Failed": "بارگذاری ناموفق",
@@ -42,7 +47,7 @@ const o = {
AirPlay: "ایر پلی",
"AirPlay Not Available": "عدم پشتیبانی از ایرپلی"
};
i("artplayer-i18n-fa", o);
o("artplayer-i18n-fa", i);
export {
o as default
i as default
};
+1 -1
View File
@@ -1 +1 @@
(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}));
(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.artplayerI18nFr=e())})(this,(function(){"use strict";function t(i,n){if(typeof window<"u"){const o=window;o[i]=n}}const e={"Context Menu":"Menu contextuel",Lock:"Verrouiller",Back:"Retour",Settings:"Paramètres",Progress:"Progression de lecture","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 t("artplayer-i18n-fr",e),e}));
+9 -4
View File
@@ -1,10 +1,15 @@
function l(e, i) {
function i(e, t) {
if (typeof window < "u") {
const t = window;
t[e] = i;
const r = window;
r[e] = t;
}
}
const o = {
"Context Menu": "Menu contextuel",
Lock: "Verrouiller",
Back: "Retour",
Settings: "Paramètres",
Progress: "Progression de lecture",
"Video Info": "Informations de la vidéo",
Close: "Fermer",
"Video Load Failed": "Téléchargement de la vidéo échoué",
@@ -42,7 +47,7 @@ const o = {
AirPlay: "AirPlay",
"AirPlay Not Available": "AirPlay non disponible"
};
l("artplayer-i18n-fr", o);
i("artplayer-i18n-fr", o);
export {
o as default
};
+1 -1
View File
@@ -1 +1 @@
(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}));
(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,n){if(typeof window<"u"){const t=window;t[i]=n}}const e={"Context Menu":"Menu konteks",Lock:"Kunci",Back:"Kembali",Settings:"Pengaturan",Progress:"Progres pemutaran","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}));
+5
View File
@@ -5,6 +5,11 @@ function t(e, a) {
}
}
const n = {
"Context Menu": "Menu konteks",
Lock: "Kunci",
Back: "Kembali",
Settings: "Pengaturan",
Progress: "Progres pemutaran",
"Video Info": "Informasi Video",
Close: "Tutup",
"Video Load Failed": "Gagal Memuat Video",
+1 -1
View File
@@ -1 +1 @@
(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}));
(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.artplayerI18nPl=e())})(this,(function(){"use strict";function n(i,o){if(typeof window<"u"){const t=window;t[i]=o}}const e={"Context Menu":"Menu kontekstowe",Lock:"Zablokuj",Back:"Wstecz",Settings:"Ustawienia",Progress:"Postęp odtwarzania","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 n("artplayer-i18n-pl",e),e}));
+5
View File
@@ -5,6 +5,11 @@ function o(e, i) {
}
}
const a = {
"Context Menu": "Menu kontekstowe",
Lock: "Zablokuj",
Back: "Wstecz",
Settings: "Ustawienia",
Progress: "Postęp odtwarzania",
"Video Info": "Informacje o wideo",
Close: "Zamknij",
"Video Load Failed": "Błąd ładowania wideo",
+1 -1
View File
@@ -1 +1 @@
(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}));
(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={"Context Menu":"Контекстное меню",Lock:"Заблокировать",Back:"Назад",Settings:"Настройки",Progress:"Ход воспроизведения","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}));
+5
View File
@@ -5,6 +5,11 @@ function i(e, t) {
}
}
const o = {
"Context Menu": "Контекстное меню",
Lock: "Заблокировать",
Back: "Назад",
Settings: "Настройки",
Progress: "Ход воспроизведения",
"Video Info": "Информация",
Close: "Закрыть",
"Video Load Failed": "Ошибка загрузки видео",
+1 -1
View File
@@ -1 +1 @@
(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}));
(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={"Context Menu":"Bağlam menüsü",Lock:"Kilitle",Back:"Geri",Settings:"Ayarlar",Progress:"Oynatma ilerlemesi","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}));
+8 -3
View File
@@ -4,7 +4,12 @@ function l(e, a) {
i[e] = a;
}
}
const n = {
const t = {
"Context Menu": "Bağlam menüsü",
Lock: "Kilitle",
Back: "Geri",
Settings: "Ayarlar",
Progress: "Oynatma ilerlemesi",
"Video Info": "Video Bilgisi",
Close: "Kapat",
"Video Load Failed": "Video Yüklenemedi",
@@ -42,7 +47,7 @@ const n = {
AirPlay: "AirPlay",
"AirPlay Not Available": "AirPlay Kullanılamıyor"
};
l("artplayer-i18n-tr", n);
l("artplayer-i18n-tr", t);
export {
n as default
t as default
};
+1 -1
View File
@@ -1 +1 @@
(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}));
(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={"Context Menu":"Menu ngữ cảnh",Lock:"Khóa",Back:"Quay lại",Settings:"Cài đặt",Progress:"Tiến trình phát","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}));
+5
View File
@@ -5,6 +5,11 @@ function h(n, t) {
}
}
const i = {
"Context Menu": "Menu ngữ cảnh",
Lock: "Khóa",
Back: "Quay lại",
Settings: "Cài đặt",
Progress: "Tiến trình phát",
"Video Info": "Thông tin video",
Close: "Đóng",
"Video Load Failed": "Tải video thất bại",
+1 -1
View File
@@ -1 +1 @@
(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}));
(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={"Context Menu":"快捷選單",Lock:"鎖定",Back:"返回",Settings:"設定",Progress:"播放進度","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 -4
View File
@@ -1,10 +1,15 @@
function i(e, t) {
function o(e, t) {
if (typeof window < "u") {
const l = window;
l[e] = t;
}
}
const o = {
const i = {
"Context Menu": "快捷選單",
Lock: "鎖定",
Back: "返回",
Settings: "設定",
Progress: "播放進度",
"Video Info": "統計訊息",
Close: "關閉",
"Video Load Failed": "載入失敗",
@@ -42,7 +47,7 @@ const o = {
AirPlay: "隔空播放",
"AirPlay Not Available": "隔空播放不可用"
};
i("artplayer-i18n-zh-tw", o);
o("artplayer-i18n-zh-tw", i);
export {
o as default
i as default
};
+1 -1
View File
@@ -50,7 +50,7 @@
"ci:build": "yarn build:types && 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/template-resources.test.js test/core-vendor.test.js test/component-resources.test.js test/setting-model.test.js test/setting-layout.test.js test/setting-resources.test.js test/subtitle.test.js test/display-native.test.js test/display-video-fullscreen.test.js test/display-pip.test.js test/display-mini.test.js test/display-sizing.test.js test/display-orientation.test.js test/hotkey.test.js test/listener-registry.test.js test/global-events.test.js test/pointer-events.test.js test/gesture.test.js test/event-scheduling.test.js test/notice.test.js test/fast-forward.test.js test/auto-playback.test.js test/builtin-layers.test.js test/prompt-components.test.js test/screenshot.test.js test/thumbnails.test.js test/progress.test.js test/environment.test.js test/storage.test.js test/facade-properties.test.js test/dom-boundaries.test.js test/initialization.test.js test/entry.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/component-resources.test.js test/setting-model.test.js test/setting-layout.test.js test/setting-resources.test.js test/subtitle.test.js test/display-native.test.js test/display-video-fullscreen.test.js test/display-pip.test.js test/display-mini.test.js test/display-sizing.test.js test/display-orientation.test.js test/hotkey.test.js test/listener-registry.test.js test/global-events.test.js test/pointer-events.test.js test/gesture.test.js test/event-scheduling.test.js test/notice.test.js test/fast-forward.test.js test/auto-playback.test.js test/builtin-layers.test.js test/prompt-components.test.js test/screenshot.test.js test/thumbnails.test.js test/progress.test.js test/environment.test.js test/storage.test.js test/facade-properties.test.js test/dom-boundaries.test.js test/initialization.test.js test/entry.test.js test/accessibility-button.test.js test/accessibility-focus.test.js test/accessibility-slider.test.js",
"test": "yarn test:node && yarn test:baseline",
"test:browser": "playwright test",
"test:browser:install": "playwright install chromium firefox webkit",
+225
View File
@@ -1279,3 +1279,228 @@ intentional defect corrections from preserved behavior. For timers or Blob URLs,
also identify the owner and verify cleanup in the consuming module. Remaining
ecosystem declaration work, accessibility and release validation are recorded
in refactor/tasks.json and should extend this map as they land.
## Keyboard interaction ownership
`accessibility/button.ts` makes the existing control nodes keyboard-operable without
replacing their DOM or pointer click callbacks. Enter activates on keydown; Space
activates on keyup only if the same enabled control retained focus. Repeats, blur,
modifier/composition input and disposed scopes cannot activate an armed action.
Listeners belong to the existing component entry scope. `accessibility/keyboard.ts`
records handled events in a WeakSet so Hotkey can retain generic keydown delivery
without performing a second Space action. Unrelated prevented events retain the
historical hotkey policy. Native button/summary and ARIA button/switch activation,
and Enter on links, are reserved for those elements; unrelated custom keys remain.
Play/pause uses its stable control wrapper and changes its accessible name with
the existing media events. Volume keeps its original icon and panel hierarchy;
both icon buttons use the localized Mute name and aria-pressed, transferring focus
only when the previously focused icon becomes hidden. This leaves the volume panel
outside a button's accessibility subtree. Setting, fullscreen/web-fullscreen, PiP,
AirPlay and screenshot buttons reuse existing tooltip names and click paths. Custom
controls with option.click receive the same behavior unless their supplied content
already contains interactive elements, whose native behavior is preserved.
`accessibility/focus.ts` owns keyboard/pointer modality and the additive
art-keyboard-focus class. The control auto-hide predicate keeps keyboard-focused
content visible, while pointer focus keeps its original hiding behavior. Root
listeners survive DOM moves; document listeners rebind on focus in a new ownerDocument
and release the old document. All listeners and the class release with the bottom
entry scope. Native focus updates existing isFocus/isInput flags without emitting
extra public pointer focus/blur events. `style/accessibility.less` supplies visible
focus and keyboard control-bar visibility without changing existing class hooks.
`accessibility/slider.ts` owns range keyboard input and ARIA state. Arrow keys use
the configured step, PageUp/PageDown use ten steps, and Home/End select endpoints.
Unavailable or non-finite ranges remain focusable but disabled; their navigation
keys cannot fall through to player shortcuts. Values and accessible text follow
the actual media properties, including native seek rounding.
`control/progress/keyboard.ts` binds the range to the existing progress entry,
separately from pointer dragging. It emits the existing setBar payload before seek,
omitting the optional pointer event. Entry disposal, source changes or a newer
nested keyboard action cancel the pending seek. Native metadata, seeking and time
events refresh the range. Volume uses the same helper on the existing slider
outside the mute buttons. Keyboard adjustment unmutes and then writes volume,
unless the muted callback disposed the entry or started a newer action.
The volume panel becomes visible on focus within the control. Only opacity and
transform animate: delaying visibility can make rapid Tab navigation skip its
slider. Mouse hover remains supported and keyboard visibility does not prevent
the existing pointer auto-hide policy. The additive Progress translation exists
in all twelve shipped dictionaries; its public type is optional so complete old
dictionaries remain assignable. Regenerate types and Monaco declarations together.
Run the accessibility-button/accessibility-focus/accessibility-slider unit tests and
`yarn test:browser accessibility hotkey progress-quality`
when changing these boundaries. Tests use actual Tab/Enter/Space input and media,
including Firefox's pre-existing native video Tab stop, one-action semantics,
native nested buttons, pointer hiding, replacement and disposal. Slider coverage
includes real media seek/volume, fast Tab, unavailable metadata, localization and
callback cancellation alongside old progress dragging. CORE-23 still owns
settings-tree, dynamic control focus, mode-exit and full accessibility acceptance; these focused checks
are not whole-player accessibility certification.
`control/selector-keyboard.ts` owns the selector popup's keyboard focus and
visibility. The existing value opens with Enter/Space/Up/Down. The current option
receives focus; arrows, Home/End and typed prefixes move focus without selecting.
Enter/Space call the existing item click path, preserving the onSelect receiver,
item/node identity and click event. Escape dismisses the popup and returns focus
to its value; Tab leaves without committing. Hover remains a separate input path.
Only the component entry scope owns these listeners and popup classes.
Ordinary selector lists expose listbox/options with aria-selected. Caller-supplied
interactive option HTML uses a group instead so native buttons/inputs retain their
semantics and editing keys. Native buttons in the value become the trigger instead
of being nested inside a new button role. Selection and async returned HTML refresh
that binding. Focus lost only because the focused value child was replaced is
restored to the new trigger; callbacks that deliberately focus elsewhere retain
that focus. Caller-supplied interactive content still needs its own accessible names.
The existing selector generation and trackSelection guards remain responsible for
async result ownership. Keyboard navigation does not change those generations;
committing a real click does. Changing this boundary requires both
accessibility-selector and the existing components/progress-quality browser tests,
including reusing selector objects, rejecting async callbacks, updating controls,
removing entries and preserving old property-descriptor flags.
`setting/keyboard.ts` owns panel entry, arrow navigation, Escape and focusout;
`setting/keyboard-item.ts` adds row activation, switch state and native range names;
`setting/keyboard-focus.ts` selects visible targets and restores focus after panel
navigation, replacement, rollback or removal. These helpers respect paused item
and panel scopes. Native inputs retain editing keys; nested native buttons retain
their click behavior. Tab exit checks actual focus in a scope-owned zero-delay
task, since a microtask can observe body during the browser's focus transition.
Pointer opening does not move focus into the panel. Existing click callbacks and
selection/update generations remain the mutation boundaries.
`accessibility/moved-focus.ts` restores a connected focused node when moving the
player for web fullscreen makes the browser focus body. It never overrides focus
deliberately assigned elsewhere and is not used during destruction cleanup. Mode
code rechecks cancellation after focus callbacks before publishing notifications.
Back and Settings names are optional public i18n fields with generated package
and Monaco declarations; keep all shipped dictionaries synchronized.
Progress keyboard seeks reuse `source/restore-position.ts` for one bounded
correction when an outstanding native end seek overwrites the latest position.
The initial operation uses the existing seek setter and setBar-before-seek order;
the correction writes currentTime without another public seek notification. The
pending operation belongs to both the control entry and current source. A newer
keyboard action, public position write, source replacement, removal or destruction
supersedes it. Never turn this into indefinite retries or overwrite manual input.
Validate this boundary with accessibility-slider and source unit/browser tests;
settings and moved-focus changes also require accessibility-setting and display-web.
`component/focus.ts` restores control focus at the end of remove/update. An update
owns one focus transaction, so its internal remove does not first focus a neighbor.
Prefer the replacement entry, then surviving following/preceding controls; preserve
focus explicitly assigned outside by beforeUnmount/mounted callbacks. Failed mounts
can restore to a neighbor, while a beforeUnmount veto leaves the original focused
node intact. Native descendants, disabled fieldsets, hidden entries and inert trees
must be evaluated as actual focus targets. A selector option may be the removed
focused descendant even though the replacement is an ordinary button.
If no control survives, `accessibility/player-focus.ts` gives the connected player
programmatic focus using tabindex=-1. Keep that owned attribute until instance
cleanup: removing it immediately after focus blurs the player in Chromium. It adds
no sequential Tab stop and preserves caller-supplied tabindex values. Focus recovery
is skipped during destruction and for unrelated instances. Run accessibility-controls
alongside components, settings, selectors, sliders and Hotkey after changing this
boundary; keep Component/Control's historical return values and failure behavior.
`display/mini-focus.ts` captures a mini session's originating player element and
restores it only when closing would hide the current popup focus. Keyboard entry
focuses Close; pointer/programmatic entry keeps external focus. If the origin was
removed, hidden, disabled or made inert, use the player focus fallback. Starting a
new session outside the player clears stale origins. Mini revision checks still
surround focus callbacks, so reentry or destruction cancels obsolete notifications.
The owned mini view makes its existing Close and stable playback wrapper keyboard
buttons. Playback activation calls the existing visible icon's click handler, so
native media playback, pause and public events retain their paths. Escape is owned
only while the popup is active. Names reuse Close, Mini Player, Play and Pause from
i18n; the wrapper name follows actual playback. Focus within reveals the existing
hover controls and focus-visible supplies an outline. Custom caller-owned mini DOM
keeps its own controls, structure and styling; no fresh-view button binding is added
to it. Destroy releases owned listeners without attempting to restore focus.
Run accessibility-mini with display-mini, display-web, the other accessibility
scenarios and Hotkey. Check real Tab/Enter/Space/Escape, playback, repeated entry,
external/removed focus origins, hidden controls, and destroy during restored focus;
the older drag, DOM order, restore-failure and supplied-popup tests remain required.
`info/keyboard.ts` installs the close button, panel Escape and visibility-driven
focus restoration inside the existing polling scope. Keyboard opening focuses
Close; pointer/programmatic visibility preserves unrelated focus. The originating
player element survives repeated init calls, while each init replaces listeners.
Closing restores a connected visible origin or the player fallback. An optional
SSR info wrapper may be absent: skip wrapper-dependent keyboard behavior while
retaining the historical poll and click close path. Info keeps its existing class
fields and prototype; failed initialization and manual destroy release keyboard
resources together with polling. Close and Video Info reuse existing i18n keys.
`plugins/lock-keyboard.ts` binds the existing lock layer as a stable toggle button,
with aria-pressed and Escape to unlock. The existing state setter and click path
still own class/flag/event ordering. Its entry scope owns a temporary control-bar
focus suspension. `accessibility/suspend-focus.ts` uses inert/aria-hidden plus saved
tabindex values, so Tab exclusion also works without native inert. Child additions
are observed, moved-out nodes regain their tabindex, and unlock/removal/destruction
restore owned attributes without overwriting different caller values.
Keyboard focus no longer overrides the locked control-bar transform. A locked
layer whose controls are hidden stays a Tab target while visually hidden; focus
reveals it through the existing control visibility behavior. Lock is an optional
public i18n field with twelve dictionary translations; regenerate package and
Monaco declarations together. Test accessibility-info/accessibility-lock alongside
prompt-components, builtin-layers, other keyboard controls and Hotkey, including
failed init, absent SSR wrapper, dynamic controls and focus-attribute ownership.
When remounting the lock layer while already locked, initialize its icons from the
actual current state along with aria-pressed and the new focus scope; defaulting
the visible icon to unlocked would contradict the still-active public state.
`contextmenu/keyboard.ts` binds Shift+F10 and ContextMenu to the existing menu,
then owns arrow/Home/End navigation, typeahead, Escape, Tab exit and focus return.
The container is a named group; action rows are buttons and choice rows contain
individual buttons. Native links, buttons and editable custom HTML retain their
roles and activation. Opening uses the focused element's viewport rectangle with
the same positioning rules as pointer opening, extracted to contextmenu/position.ts.
Editable input context gestures remain native; the static CONTEXTMENU switch
disables both player opening paths. Pointer opening does not acquire focus.
`contextmenu/choices.ts` adds keyboard activation and aria-pressed to the existing
data-value spans, retaining click targets, art-current highlighting and property
events. Custom row callbacks keep their old arguments, this, return values and
responsibility for closing the menu. Component focus recovery covers contextmenu
as well as control: replacement first, then following/preceding visible DOM entries.
Initialization replaces root listeners only after entries were successfully added;
a duplicate-entry error preserves the old bindings. Entry and instance scopes own
all listeners and the deferred focusout check; destruction never restores focus.
`accessibility/overlay-focus.ts` tracks menu origins in a WeakMap. Info and mini
resolve an origin through it before an action closes the menu, so closing the next
panel can return to the original control rather than a hidden menu item. This does
not pre-focus another node or change the existing menu callback/event sequence.
Closing skips removed, hidden, disabled or inert origins, uses the player fallback,
and preserves deliberate external focus transfers. Context Menu is an optional
public translation key; update all dictionaries and regenerate both declaration views.
Run accessibility-contextmenu with accessibility, components, prompt-components,
display-mini and hotkey. Cover real keyboard entry, one activation, choice rows,
callback focus/destruction, repeated init, editable HTML, cross-player focus,
Info/mini handoff and menu positioning. Browser automation does not certify screen
reader speech, native system context menus or physical mobile keyboard behavior.
Setting navigation excludes hidden, disabled (including fieldsets) and inert
targets. `setting/keyboard-focus.ts` also owns exit fallback when a plugin removes,
hides, disables or moves the setting button while the panel is open. Only focus
still inside the closing panel is transferred; an external callback keeps its focus.
Run accessibility-integration for native fullscreen entry/exit with actual keyboard
gestures, browser-initiated fullscreen exit, and PiP with the native capability
attachment. Unsupported PiP environments verify the existing notice/focus fallback;
they are not successful native PiP sessions. SSR tests retain player/video/subtitle
node identities, load actual WebVTT cues, toggle them from a custom keyboard control
and check web fullscreen focus and caption visibility. Subtitles retain their
existing passive rendering without adding Tab stops or continuous live announcements.
Physical Apple presentation surfaces and assistive technology remain release-review
checks; no simulated adapter is counted as those devices.
+29
View File
@@ -0,0 +1,29 @@
import type * as Definition from './artplayer.js'
declare const Artplayer: typeof Definition.default
// eslint-disable-next-line ts/no-redeclare -- CJS constructor value and instance type share the export.
type Artplayer = Definition.default
// eslint-disable-next-line ts/no-redeclare, ts/no-namespace -- Namespace merging carries named types on the existing CJS export.
declare namespace Artplayer {
type Config = Definition.Config
type Emitter<Events extends { [Name in keyof Events]: readonly unknown[] } = Record<PropertyKey, unknown[]>> = Definition.Emitter<Events>
type Events = Definition.Events
type I18n = Definition.I18n
type Icons = Definition.Icons
type Option = Definition.Option
type OptionInput = Definition.OptionInput
type Player = Definition.Player
type PlaybackControls = Definition.PlaybackControls
type PluginFactory<Host = Artplayer, Result = unknown> = Definition.PluginFactory<Host, Result>
type Plugins = Definition.Plugins
type Setting = Definition.Setting
type SettingOption = Definition.SettingOption
type Subtitle = Definition.Subtitle
type SubtitleUpdateEvents = Definition.SubtitleUpdateEvents
type Template = Definition.Template
type Utils = Definition.Utils
}
// eslint-disable-next-line no-restricted-syntax -- Preserve the real CommonJS constructor export.
export = Artplayer
+1 -1
View File
@@ -67,4 +67,4 @@
* 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 n=(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 o=t(r);if("boolean"===o)return"boolean";if("string"===o)return"string";if("number"===o)return"number";if("symbol"===o)return"symbol";if("function"===o)return"GeneratorFunction"===n(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(n(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(o=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 o.slice(8,-1).toLowerCase().replace(/\s/g,"")};function n(t){return t.constructor?t.constructor.name:null}function o(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:["option"];return i(t,e,n),a(t,e,n),function(t,e,n){var s=r(e),l=r(t);if("object"===s){if("object"!==l)throw new Error("[Type Error]: '".concat(n.join("."),"' require 'object' type, but got '").concat(l,"'"));Object.keys(e).forEach(function(r){var s=t[r],l=e[r],c=n.slice();c.push(r),i(s,l,c),a(s,l,c),o(s,l,c)})}if("array"===s){if("array"!==l)throw new Error("[Type Error]: '".concat(n.join("."),"' require 'array' type, but got '").concat(l,"'"));t.forEach(function(r,s){var l=t[s],c=e[s]||e[0],d=n.slice();d.push(s),i(l,c,d),a(l,c,d),o(l,c,d)})}}(t,e,n),t}function i(t,e,n){if("string"===r(e)){var o=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 o===t}):e.toLowerCase().trim()===o))throw new Error("[Type Error]: '".concat(n.join("."),"' require '").concat(e,"' type, but got '").concat(o,"'"))}}function a(t,e,n){if("function"===r(e)){var o=e(t,r(t),n);if(!0!==o){var i=r(o);throw"string"===i?new Error(o):"error"===i?o:new Error("[Validator Error]: The scheme for '".concat(n.join("."),"' validator require return true, but got '").concat(o,"'"))}}}return o.kindOf=r,o}()),r.exports);const o=t(n),i="5.4.1";function a(t,e){let r=document.getElementById(t);r||(r=document.createElement("style"),r.id=t,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(r)}):(document.head||document.documentElement).appendChild(r)),r.textContent=e}const s=globalThis.CUSTOM_USER_AGENT??("undefined"===typeof navigator?"":navigator.userAgent),l=/^(?:(?!chrome|android).)*safari/i.test(s),c=/iPad|iPhone|iPod/i.test(s)&&("undefined"===typeof window||!window.MSStream),d=c||s.includes("Macintosh")&&"undefined"!==typeof navigator&&navigator.maxTouchPoints>=1,p=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(s)||d,u="undefined"!==typeof window&&"undefined"!==typeof document;const h={properties:["audioTracks","autoplay","buffered","controller","controlLine 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 n=(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 o=t(r);if("boolean"===o)return"boolean";if("string"===o)return"string";if("number"===o)return"number";if("symbol"===o)return"symbol";if("function"===o)return"GeneratorFunction"===n(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(n(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(o=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 o.slice(8,-1).toLowerCase().replace(/\s/g,"")};function n(t){return t.constructor?t.constructor.name:null}function o(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:["option"];return i(t,e,n),a(t,e,n),function(t,e,n){var s=r(e),c=r(t);if("object"===s){if("object"!==c)throw new Error("[Type Error]: '".concat(n.join("."),"' require 'object' type, but got '").concat(c,"'"));Object.keys(e).forEach(function(r){var s=t[r],c=e[r],l=n.slice();l.push(r),i(s,c,l),a(s,c,l),o(s,c,l)})}if("array"===s){if("array"!==c)throw new Error("[Type Error]: '".concat(n.join("."),"' require 'array' type, but got '").concat(c,"'"));t.forEach(function(r,s){var c=t[s],l=e[s]||e[0],d=n.slice();d.push(s),i(c,l,d),a(c,l,d),o(c,l,d)})}}(t,e,n),t}function i(t,e,n){if("string"===r(e)){var o=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 o===t}):e.toLowerCase().trim()===o))throw new Error("[Type Error]: '".concat(n.join("."),"' require '").concat(e,"' type, but got '").concat(o,"'"))}}function a(t,e,n){if("function"===r(e)){var o=e(t,r(t),n);if(!0!==o){var i=r(o);throw"string"===i?new Error(o):"error"===i?o:new Error("[Validator Error]: The scheme for '".concat(n.join("."),"' validator require return true, but got '").concat(o,"'"))}}}return o.kindOf=r,o}()),r.exports);const o=t(n),i="5.4.1";function a(t,e){let r=document.getElementById(t);r||(r=document.createElement("style"),r.id=t,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(r)}):(document.head||document.documentElement).appendChild(r)),r.textContent=e}const s=globalThis.CUSTOM_USER_AGENT??("undefined"===typeof navigator?"":navigator.userAgent),c=/^(?:(?!chrome|android).)*safari/i.test(s),l=/iPad|iPhone|iPod/i.test(s)&&("undefined"===typeof window||!window.MSStream),d=l||s.includes("Macintosh")&&"undefined"!==typeof navigator&&navigator.maxTouchPoints>=1,u=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(s)||d,p="undefined"!==typeof window&&"undefined"!==typeof document;const f={properties:["audioTracks","autoplay","buffered","controller","controlLine truncated
+1 -1
View File
@@ -67,4 +67,4 @@
* 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=Object.defineProperty,e=Object.defineProperties,r=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,a=(e,r,n)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,s=(t,e)=>{for(var r in e||(e={}))o.call(e,r)&&a(t,r,e[r]);if(n)for(var r of n(e))i.call(e,r)&&a(t,r,e[r]);return t},l=(t,n)=>e(t,r(n)),c=(t,e,r)=>new Promise((n,o)=>{var i=t=>{try{s(r.next(t))}catch(e){o(e)}},a=t=>{try{s(r.throw(t))}catch(e){o(e)}},s=t=>t.done?n(t.value):Promise.resolve(t.value).then(i,a);s((r=r.apply(t,e)).next())});function d(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var u,p={exports:{}};var h=(u||(u=1,p.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 o=t(r);if("boolean"===o)return"boolean";if("string"===o)return"string";if("number"===o)return"number";if("symbol"===o)return"symbol";if("function"===o)return"GeneratorFunction"===n(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(n(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(o=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 o.slice(8,-1).toLowerCase().replace(/\s/g,"")};function n(t){return t.constructor?t.constructor.name:null}function o(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:["option"];return i(t,e,n),a(t,e,n),function(t,e,n){var s=r(e),l=r(t);if("object"===s){if("object"!==l)throw new Error("[Type Error]: '".concat(n.join("."),"' require 'object' type, but got '").concat(l,"'"));Object.keys(e).forEach(function(r){var s=t[r],l=e[r],c=n.slice();c.push(r),i(s,l,c),a(s,l,c),o(s,l,c)})}if("array"===s){if("array"!==l)throw new Error("[Type Error]: '".concat(n.join("."),"' require 'array' type, but got '").concat(l,"'"));t.forEach(function(r,s){var l=t[s],c=e[s]||e[0],d=n.slice();d.push(s),i(l,c,d),a(l,c,d),o(l,c,d)})}}(t,e,n),t}function i(t,e,n){if("string"===r(e)){var o=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 o===t}):e.toLowerCase().trim()===o))throw new Error("[Type Error]: '".concat(n.join("."),"' require '").concat(e,"' type, but got '").concat(o,"'"))}}function a(t,e,n){if("function"===r(e)){var o=e(t,r(t),n);if(!0!==o){var i=r(o);throw"string"===i?new Error(o):"error"===i?o:new Error("[Validator Error]: The scheme for '".concat(n.join("."),"' validator require return true, but got '").concat(o,"'"))}}}return o.kindOf=r,o}()),p.exports);const f=d(h),m="5.4.1";function g(t,e){let r=document.getElementById(t);r||(r=document.createElement("style"),r.id=t,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.apLine 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=Object.defineProperty,e=Object.defineProperties,r=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,a=(e,r,n)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,s=(t,e)=>{for(var r in e||(e={}))o.call(e,r)&&a(t,r,e[r]);if(n)for(var r of n(e))i.call(e,r)&&a(t,r,e[r]);return t},l=(t,n)=>e(t,r(n)),c=(t,e,r)=>new Promise((n,o)=>{var i=t=>{try{s(r.next(t))}catch(e){o(e)}},a=t=>{try{s(r.throw(t))}catch(e){o(e)}},s=t=>t.done?n(t.value):Promise.resolve(t.value).then(i,a);s((r=r.apply(t,e)).next())});function d(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var u,p={exports:{}};var f=(u||(u=1,p.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 o=t(r);if("boolean"===o)return"boolean";if("string"===o)return"string";if("number"===o)return"number";if("symbol"===o)return"symbol";if("function"===o)return"GeneratorFunction"===n(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(n(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(o=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 o.slice(8,-1).toLowerCase().replace(/\s/g,"")};function n(t){return t.constructor?t.constructor.name:null}function o(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:["option"];return i(t,e,n),a(t,e,n),function(t,e,n){var s=r(e),l=r(t);if("object"===s){if("object"!==l)throw new Error("[Type Error]: '".concat(n.join("."),"' require 'object' type, but got '").concat(l,"'"));Object.keys(e).forEach(function(r){var s=t[r],l=e[r],c=n.slice();c.push(r),i(s,l,c),a(s,l,c),o(s,l,c)})}if("array"===s){if("array"!==l)throw new Error("[Type Error]: '".concat(n.join("."),"' require 'array' type, but got '").concat(l,"'"));t.forEach(function(r,s){var l=t[s],c=e[s]||e[0],d=n.slice();d.push(s),i(l,c,d),a(l,c,d),o(l,c,d)})}}(t,e,n),t}function i(t,e,n){if("string"===r(e)){var o=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 o===t}):e.toLowerCase().trim()===o))throw new Error("[Type Error]: '".concat(n.join("."),"' require '").concat(e,"' type, but got '").concat(o,"'"))}}function a(t,e,n){if("function"===r(e)){var o=e(t,r(t),n);if(!0!==o){var i=r(o);throw"string"===i?new Error(o):"error"===i?o:new Error("[Validator Error]: The scheme for '".concat(n.join("."),"' validator require return true, but got '").concat(o,"'"))}}}return o.kindOf=r,o}()),p.exports);const h=d(f),m="5.4.1";function v(t,e){let r=document.getElementById(t);r||(r=document.createElement("style"),r.id=t,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.apLine truncated
+1336 -179
View File
File diff suppressed because it is too large. Load diff
+2
View File
@@ -0,0 +1,2 @@
export { default } from './artplayer.cjs'
export type { Config, Emitter, Events, I18n, Icons, Option, OptionInput, PlaybackControls, Player, PluginFactory, Plugins, Setting, SettingOption, Subtitle, SubtitleUpdateEvents, Template, Utils } from './artplayer.js'
+216
View File
@@ -0,0 +1,216 @@
import type { Component } from './component'
import type { Config } from './config'
import type { Emitter } from './emitter'
import type { Events, SubtitleUpdateEvents } from './events'
import type { I18n } from './i18n'
import type { Icons } from './icons'
import type { Option, OptionInput } from './option'
import type { PlaybackControls } from './playback'
import type { Player } from './player'
import type { PluginFactory, Plugins } from './plugin'
import type { Setting, SettingOption } from './setting'
import type { Subtitle } from './subtitle'
import type { Template } from './template'
import type { Utils } from './utils'
export type {
Config,
Emitter,
Events,
I18n,
Icons,
Option,
OptionInput,
PlaybackControls,
Player,
PluginFactory,
Plugins,
Setting,
SettingOption,
Subtitle,
SubtitleUpdateEvents,
Template,
Utils,
}
declare class Artplayer extends Player {
constructor(option: Option, readyCallback?: (this: Artplayer, art: Artplayer) => unknown)
constructor(option: OptionInput, readyCallback?: (this: Artplayer, art: Artplayer) => unknown)
static readonly instances: Artplayer[]
static readonly version: string
static readonly env: 'development' | 'production'
static readonly build: string
static readonly config: Config
static readonly utils: Utils
static readonly scheme: Record<keyof Option, unknown>
static readonly Emitter: new <Events extends { [Name in keyof Events]: readonly unknown[] } = Record<PropertyKey, unknown[]>>(...args: unknown[]) => Emitter<Events>
static readonly validator: <T extends object>(option: T, scheme: object) => T
static readonly kindOf: (item: unknown) => string
static readonly html: Artplayer['template']['html']
static readonly option: Option
static STYLE: string
static DEBUG: boolean
static CONTEXTMENU: boolean
static NOTICE_TIME: number
static SETTING_WIDTH: number
static SETTING_ITEM_WIDTH: number
static SETTING_ITEM_HEIGHT: number
static RESIZE_TIME: number
static SCROLL_TIME: number
static SCROLL_GAP: number
static AUTO_PLAYBACK_MAX: number
static AUTO_PLAYBACK_MIN: number
static AUTO_PLAYBACK_TIMEOUT: number
static RECONNECT_TIME_MAX: number
static RECONNECT_SLEEP_TIME: number
static CONTROL_HIDE_TIME: number
static DBCLICK_TIME: number
static DBCLICK_FULLSCREEN: boolean
static MOBILE_DBCLICK_PLAY: boolean
static MOBILE_CLICK_PLAY: boolean
static AUTO_ORIENTATION_TIME: number
static INFO_LOOP_TIME: number
static FAST_FORWARD_VALUE: number
static FAST_FORWARD_TIME: number
static TOUCH_MOVE_RATIO: number
static VOLUME_STEP: number
static SEEK_STEP: number
static PLAYBACK_RATE: number[]
static ASPECT_RATIO: string[]
static FLIP: string[]
static FULLSCREEN_WEB_IN_BODY: boolean
static LOG_VERSION: boolean
static USE_RAF: boolean
static REMOVE_SRC_WHEN_DESTROY: boolean
readonly id: number
readonly option: Option
readonly isLock: boolean
readonly isReady: boolean
readonly isFocus: boolean
readonly isInput: boolean
readonly isRotate: boolean
readonly isDestroy: boolean
flv?: unknown
m3u8?: unknown
hls?: unknown
ts?: unknown
mpd?: unknown
torrent?: unknown
on<T extends keyof Events>(name: T, fn: (...args: Events[T]) => unknown, ctx?: object): this
on<T extends keyof SubtitleUpdateEvents>(name: T, fn: (...args: SubtitleUpdateEvents[T]) => unknown, ctx?: object): this
on(name: string, fn: (...args: unknown[]) => unknown, ctx?: object): this
once<T extends keyof Events>(name: T, fn: (...args: Events[T]) => unknown, ctx?: object): this
once<T extends keyof SubtitleUpdateEvents>(name: T, fn: (...args: SubtitleUpdateEvents[T]) => unknown, ctx?: object): this
once(name: string, fn: (...args: unknown[]) => unknown, ctx?: object): this
emit<T extends keyof Events>(name: T, ...args: Events[T]): this
emit<T extends keyof SubtitleUpdateEvents>(name: T, ...args: SubtitleUpdateEvents[T]): this
emit(name: string, ...args: unknown[]): this
off<T extends keyof Events>(name: T, callback?: (...args: Events[T]) => unknown): this
off<T extends keyof SubtitleUpdateEvents>(name: T, callback?: (...args: SubtitleUpdateEvents[T]) => unknown): this
off(name: string, callback?: (...args: unknown[]) => unknown): this
query: Artplayer['template']['query']
proxy: Artplayer['events']['proxy']
video: Artplayer['template']['$video']
e: { [K in keyof Events]?: { fn: (...args: Events[K]) => unknown, ctx: unknown }[] }
destroy(removeHtml?: boolean): void
reset(): void
readonly template: {
get html(): string
query: <T extends Element = Element>(selector: string) => T | null
} & Template
readonly events: {
proxy: {
(target: EventTarget, eventName: string, handler: (event: Event) => void, options?: boolean | AddEventListenerOptions): () => void
(target: EventTarget, eventName: string[], handler: (event: Event) => void, options?: boolean | AddEventListenerOptions): Array<() => void>
}
hover: (element: HTMLElement, mouseenter?: (event: Event) => any, mouseleave?: (event: Event) => any) => void
remove: (destroyEvent: () => void) => void
destroy: () => void
bindGlobalEvents: (source?: { window?: Window, document?: Document }) => void
}
readonly storage: {
name: string
settings: Record<string, unknown>
get: {
(key: string): unknown
(): Record<string, unknown>
}
set: (key: string, value: unknown) => void
del: (key: string) => void
clear: () => void
}
readonly icons: Icons
readonly i18n: {
languages: I18n
language: Partial<Record<string, string>>
init: () => void
get: (key: string) => string
update: (language: Partial<I18n>) => void
}
readonly notice: {
timer: number | null
get show(): string | Error | false | ''
set show(msg: string | Error | false | '')
destroy: () => void
}
readonly layers: Record<string, HTMLElement | undefined> & Component
readonly controls: Record<string, HTMLElement | undefined> & Component
readonly contextmenu: Record<string, HTMLElement | undefined> & Component
readonly subtitle: {
get url(): string
set url(url: string)
get textTrack(): TextTrack | undefined
get activeCues(): VTTCue[]
get cues(): VTTCue[]
style: (name: string | Partial<CSSStyleDeclaration>, value?: string) => void
switch: (url: string, option?: Subtitle) => Promise<string>
init: (subtitle: Subtitle) => Promise<string | null | undefined>
} & Component
readonly info: Component
readonly loading: Component
readonly hotkey: {
keys: Record<string, ((event: KeyboardEvent) => any)[]>
add: (key: string, callback: (this: Artplayer, event: KeyboardEvent) => any) => Artplayer['hotkey']
remove: (key: string, callback: (event: KeyboardEvent) => any) => Artplayer['hotkey']
}
readonly mask: Component
readonly setting: {
option: SettingOption[]
updateStyle: (width?: number) => void
/** Legacy return signature; a missing runtime entry is null. */
find: (name: string) => SettingOption | undefined
/** Legacy return signature; runtime returns the formatted input item. */
add: (setting: Setting) => Artplayer['setting']
/** Legacy return signature; runtime returns the updated or added item. */
update: (settings: Setting) => Artplayer['setting']
/** Legacy return signature; runtime returns undefined. */
remove: (name: string) => Artplayer['setting']
} & Component
readonly plugins: Plugins
}
export default Artplayer
+143
View File
@@ -0,0 +1,143 @@
import type Artplayer from './artplayer'
/** Input accepted by the existing HTML renderer, including numeric content. */
export interface ComponentInput extends Omit<ComponentOption, 'html'> {
html?: string | HTMLElement | number
}
export interface Selector {
/**
* Whether the default is selected
*/
default?: boolean
/**
* Html string of selector
*/
html: string | HTMLElement
/**
* Value of selector item
*/
value?: string | number
/**
* Allow custom properties
*/
[key: string]: any
}
export interface Component {
/**
* Component self-increasing id
*/
readonly id: number
/**
* Component parent name
*/
readonly name: string | undefined
/**
* Component parent element
*/
readonly $parent: HTMLElement | undefined
/**
* Whether to show component parent
*/
get show(): boolean
/**
* Whether to show component parent
*/
set show(state: boolean)
/**
* Toggle the component parent
*/
toggle: () => void
/**
* Dynamic add a component
*/
add: {
(option: ComponentOption | ((art: Artplayer) => ComponentOption)): HTMLElement | undefined
(option: ComponentInput | ((art: Artplayer) => ComponentInput)): HTMLElement | undefined
}
/**
* Dynamic remove a component by name
*/
remove: (name: string) => void
/**
* Dynamic update a component
*/
update: {
(option: ComponentOption): HTMLElement | undefined
(option: ComponentInput): HTMLElement | undefined
}
}
export interface ComponentOption {
/**
* Html string or html element of component
*/
html?: string | HTMLElement
/**
* Whether to disable component
*/
disable?: boolean
/**
* Unique name for component
*/
name?: string
/**
* Component sort index
*/
index?: number
/**
* Component style object
*/
style?: Partial<CSSStyleDeclaration>
/**
* Component click event
*/
click?: (this: Artplayer, component: Component, event: Event) => void
/**
* When the component was mounted
*/
mounted?: (this: Artplayer, element: HTMLElement) => void
/**
* When the component was before unmount
*/
beforeUnmount?: (this: Artplayer, element: HTMLElement) => void
/**
* Component tooltip, use in controls
*/
tooltip?: string
/**
* Component position, use in controls
*/
position?: 'top' | 'left' | 'right' | (string & Record<never, never>)
/**
* Custom selector list, use in controls
*/
selector?: Selector[]
/**
* When selector item click, use in controls
*/
onSelect?: (this: Artplayer, selector: Selector, element: HTMLElement, event: Event) => void
}
+81
View File
@@ -0,0 +1,81 @@
export interface Config {
readonly properties: readonly [
'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',
]
readonly methods: readonly ['addTextTrack', 'canPlayType', 'load', 'play', 'pause']
readonly events: readonly [
'abort',
'canplay',
'canplaythrough',
'durationchange',
'emptied',
'ended',
'error',
'loadeddata',
'loadedmetadata',
'loadstart',
'pause',
'play',
'playing',
'progress',
'ratechange',
'seeked',
'seeking',
'stalled',
'suspend',
'timeupdate',
'volumechange',
'waiting',
]
readonly prototypes: readonly [
'width',
'height',
'videoWidth',
'videoHeight',
'poster',
'webkitDecodedFrameCount',
'webkitDroppedFrameCount',
'playsInline',
'webkitSupportsFullscreen',
'webkitDisplayingFullscreen',
'onenterpictureinpicture',
'onleavepictureinpicture',
'disablePictureInPicture',
'cancelVideoFrameCallback',
'requestVideoFrameCallback',
'getVideoPlaybackQuality',
'requestPictureInPicture',
'webkitEnterFullScreen',
'webkitEnterFullscreen',
'webkitExitFullScreen',
'webkitExitFullscreen',
]
}
+45
View File
@@ -0,0 +1,45 @@
export interface CssVar {
'--art-theme': string
'--art-font-color': string
'--art-background-color': string
'--art-text-shadow-color': string
'--art-transition-duration': string
'--art-padding': string
'--art-border-radius': string
'--art-progress-height': string
'--art-progress-color': string
'--art-progress-top-gap': string
'--art-hover-color': string
'--art-loaded-color': string
'--art-state-size': string
'--art-state-opacity': number
'--art-bottom-height': string
'--art-bottom-offset': string
'--art-bottom-gap': string
'--art-highlight-width': string
'--art-highlight-color': string
'--art-control-height': string
'--art-control-opacity': number
'--art-control-icon-size': string
'--art-control-icon-scale': number
'--art-volume-height': string
'--art-volume-handle-size': string
'--art-lock-size': string
'--art-indicator-scale': number
'--art-indicator-size': string
'--art-fullscreen-web-index': 9999
'--art-settings-icon-size': string
'--art-settings-max-height': string
'--art-selector-max-height': string
'--art-contextmenus-min-width': string
'--art-subtitle-font-size': string
'--art-subtitle-gap': string
'--art-subtitle-bottom': string
'--art-subtitle-border': string
'--art-widget-background': string
'--art-tip-background': string
'--art-scrollbar-size': string
'--art-scrollbar-background': string
'--art-scrollbar-background-hover': string
'--art-mini-progress-height': string
}
+8
View File
@@ -0,0 +1,8 @@
/** The event bus exposed by Artplayer.Emitter; no new runtime export. */
export interface Emitter<Events extends { [Name in keyof Events]: readonly unknown[] } = Record<PropertyKey, unknown[]>> {
e?: { [Name in keyof Events]?: { fn: (...args: [...Events[Name]]) => unknown, ctx: unknown }[] }
on: <Name extends keyof Events, Context>(name: Name, fn: (this: Context, ...args: [...Events[Name]]) => unknown, ctx?: Context) => this
once: <Name extends keyof Events, Context>(name: Name, fn: (this: Context, ...args: [...Events[Name]]) => unknown, ctx?: Context) => this
emit: <Name extends keyof Events>(name: Name, ...args: [...Events[Name]]) => this
off: <Name extends keyof Events>(name: Name, fn?: (...args: [...Events[Name]]) => unknown) => this
}
+106
View File
@@ -0,0 +1,106 @@
import type { AspectRatio, Flip } from './player'
import type { Subtitle } from './subtitle'
export type Bar = 'loaded' | 'played' | 'hover'
/** Actual built-in subtitle update payloads; legacy Events keeps its scalar types. */
export interface SubtitleUpdateEvents {
subtitleBeforeUpdate: [cues: VTTCue[]]
subtitleAfterUpdate: [cues: VTTCue[]]
}
export interface Events {
'document:click': [event: Event]
'document:mouseup': [event: Event]
'document:keydown': [event: Event]
'document:touchend': [event: Event]
'document:touchcancel': [event: Event]
'document:touchmove': [event: Event]
'document:mousemove': [event: Event]
'document:pointerup': [event: Event]
'document:contextmenu': [event: Event]
'document:pointermove': [event: Event]
'document:visibilitychange': [event: Event]
'document:webkitfullscreenchange': [event: Event]
'window:resize': [event: Event]
'window:scroll': [event: Event]
'window:orientationchange': [event: Event]
'video:abort': [event: Event]
'video:canplay': [event: Event]
'video:canplaythrough': [event: Event]
'video:complete': [event: Event]
'video:durationchange': [event: Event]
'video:emptied': [event: Event]
'video:encrypted': [event: Event]
'video:ended': [event: Event]
'video:error': [error: Error]
'video:loadeddata': [event: Event]
'video:loadedmetadata': [event: Event]
'video:loadstart': [event: Event]
'video:pause': [event: Event]
'video:play': [event: Event]
'video:playing': [event: Event]
'video:progress': [event: Event]
'video:ratechange': [event: Event]
'video:seeked': [event: Event]
'video:seeking': [event: Event]
'video:stalled': [event: Event]
'video:suspend': [event: Event]
'video:timeupdate': [event: Event]
'video:volumechange': [event: Event]
'video:waiting': [event: Event]
'info': [state: boolean]
'layer': [state: boolean]
'loading': [state: boolean]
'mask': [state: boolean]
'subtitle': [state: boolean]
'contextmenu': [state: boolean]
'control': [state: boolean]
'setting': [state: boolean]
'hotkey': [event: KeyboardEvent]
'destroy': []
'subtitleOffset': [offset: number]
/** Legacy contextual type; annotate listeners with VTTCue[] for the runtime payload. */
'subtitleBeforeUpdate': [cue: VTTCue]
/** Legacy contextual type; annotate listeners with VTTCue[] for the runtime payload. */
'subtitleAfterUpdate': [cue: VTTCue]
'subtitleLoad': [cues: VTTCue[], option: Subtitle]
'focus': [event: Event]
'blur': [event: Event]
'dblclick': [event: Event]
'click': [event: Event]
'hover': [state: boolean, event: Event]
'mousemove': [event: Event]
'resize': []
'view': [state: boolean]
'lock': [state: boolean]
'aspectRatio': [aspectRatio: AspectRatio]
'autoHeight': [height: number]
'autoSize': [size: { width: number, height: number }]
'ready': []
'airplay': []
'raf': []
'error': [error: Error, reconnectTime: number]
'flip': [flip: Flip]
'fullscreen': [state: boolean]
'fullscreenError': [event: Event]
'fullscreenWeb': [state: boolean]
'mini': [state: boolean]
'pause': []
'pip': [state: boolean]
'play': []
'screenshot': [dataUri: string]
'seek': [currentTime: number, time: number]
'restart': [url: string]
'muted': [state: boolean]
'setBar': [type: Bar, percentage: number, event?: Event | undefined]
'keydown': [event: KeyboardEvent]
}
+61
View File
@@ -0,0 +1,61 @@
type I18nKeys
= | 'en'
| 'zh-cn'
| 'zh-tw'
| 'pl'
| 'cs'
| 'es'
| 'fa'
| 'fr'
| 'id'
| 'ru'
| 'tr'
| 'ar'
| 'vi'
| (string & Record<never, never>)
interface I18nValue {
'Context Menu'?: string
'Lock'?: string
'Video Info': string
'Close': string
'Video Load Failed': string
'Volume': string
'Progress'?: string
'Back'?: string
'Settings'?: string
'Play': string
'Pause': string
'Rate': string
'Mute': string
'Video Flip': string
'Horizontal': string
'Vertical': string
'Reconnect': string
'Show Setting': string
'Hide Setting': string
'Screenshot': string
'Play Speed': string
'Aspect Ratio': string
'Default': string
'Normal': string
'Open': string
'Switch Video': string
'Switch Subtitle': string
'Fullscreen': string
'Exit Fullscreen': string
'Web Fullscreen': string
'Exit Web Fullscreen': string
'Mini Player': string
'PIP Mode': string
'Exit PIP Mode': string
'PIP Not Supported': string
'Fullscreen Not Supported': string
'Subtitle Offset': string
'Last Seen': string
'Jump Play': string
'AirPlay': string
'AirPlay Not Available': string
}
export type I18n = Partial<Record<I18nKeys, Partial<I18nValue>>>
+1 -1
View File
@@ -1 +1 @@
(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}));
(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={"Context Menu":"قائمة السياق",Lock:"قفل",Back:"رجوع",Settings:"الإعدادات",Progress:"تقدم التشغيل","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}));
+5
View File
@@ -5,6 +5,11 @@ function i(e, t) {
}
}
const o = {
"Context Menu": "قائمة السياق",
Lock: "قفل",
Back: "رجوع",
Settings: "الإعدادات",
Progress: "تقدم التشغيل",
"Video Info": "معلومات الفيديو",
Close: "إغلاق",
"Video Load Failed": "فشل تحميل الفيديو",
+1 -1
View File
@@ -1 +1 @@
(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}));
(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,n){if(typeof window<"u"){const i=window;i[o]=n}}const e={"Context Menu":"Kontextová nabídka",Lock:"Zamknout",Back:"Zpět",Settings:"Nastavení",Progress:"Průběh přehrávání","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}));
+9 -4
View File
@@ -1,10 +1,15 @@
function i(e, t) {
function n(e, t) {
if (typeof window < "u") {
const o = window;
o[e] = t;
}
}
const n = {
const i = {
"Context Menu": "Kontextová nabídka",
Lock: "Zamknout",
Back: "Zpět",
Settings: "Nastavení",
Progress: "Průběh přehrávání",
"Video Info": "Info o videu",
Close: "Zavřít",
"Video Load Failed": "Nahrání videa selhalo",
@@ -42,7 +47,7 @@ const n = {
AirPlay: "AirPlay",
"AirPlay Not Available": "AirPlay není k dispozici"
};
i("artplayer-i18n-cs", n);
n("artplayer-i18n-cs", i);
export {
n as default
i as default
};
+1 -1
View File
@@ -1 +1 @@
(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}));
(function(o,e){typeof exports=="object"&&typeof module<"u"?module.exports=e():typeof define=="function"&&define.amd?define(e):(o=typeof globalThis<"u"?globalThis:o||self,o.artplayerI18nEs=e())})(this,(function(){"use strict";function o(a,t){if(typeof window<"u"){const i=window;i[a]=t}}const e={"Context Menu":"Menú contextual",Lock:"Bloquear",Back:"Volver",Settings:"Configuración",Progress:"Progreso de reproducción","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 o("artplayer-i18n-es",e),e}));
+5
View File
@@ -5,6 +5,11 @@ function l(e, a) {
}
}
const t = {
"Context Menu": "Menú contextual",
Lock: "Bloquear",
Back: "Volver",
Settings: "Configuración",
Progress: "Progreso de reproducción",
"Video Info": "Información del video",
Close: "Cerrar",
"Video Load Failed": "Falló carga de video",
+1 -1
View File
@@ -1 +1 @@
(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}));
(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={"Context Menu":"منوی زمینه",Lock:"قفل",Back:"بازگشت",Settings:"تنظیمات",Progress:"پیشرفت پخش","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}));
+9 -4
View File
@@ -1,10 +1,15 @@
function i(e, t) {
function o(e, t) {
if (typeof window < "u") {
const l = window;
l[e] = t;
}
}
const o = {
const i = {
"Context Menu": "منوی زمینه",
Lock: "قفل",
Back: "بازگشت",
Settings: "تنظیمات",
Progress: "پیشرفت پخش",
"Video Info": "اطلاعات ویدیو",
Close: "بستن",
"Video Load Failed": "بارگذاری ناموفق",
@@ -42,7 +47,7 @@ const o = {
AirPlay: "ایر پلی",
"AirPlay Not Available": "عدم پشتیبانی از ایرپلی"
};
i("artplayer-i18n-fa", o);
o("artplayer-i18n-fa", i);
export {
o as default
i as default
};
+1 -1
View File
@@ -1 +1 @@
(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}));
(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.artplayerI18nFr=e())})(this,(function(){"use strict";function t(i,n){if(typeof window<"u"){const o=window;o[i]=n}}const e={"Context Menu":"Menu contextuel",Lock:"Verrouiller",Back:"Retour",Settings:"Paramètres",Progress:"Progression de lecture","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 t("artplayer-i18n-fr",e),e}));
+9 -4
View File
@@ -1,10 +1,15 @@
function l(e, i) {
function i(e, t) {
if (typeof window < "u") {
const t = window;
t[e] = i;
const r = window;
r[e] = t;
}
}
const o = {
"Context Menu": "Menu contextuel",
Lock: "Verrouiller",
Back: "Retour",
Settings: "Paramètres",
Progress: "Progression de lecture",
"Video Info": "Informations de la vidéo",
Close: "Fermer",
"Video Load Failed": "Téléchargement de la vidéo échoué",
@@ -42,7 +47,7 @@ const o = {
AirPlay: "AirPlay",
"AirPlay Not Available": "AirPlay non disponible"
};
l("artplayer-i18n-fr", o);
i("artplayer-i18n-fr", o);
export {
o as default
};
+1 -1
View File
@@ -1 +1 @@
(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}));
(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,n){if(typeof window<"u"){const t=window;t[i]=n}}const e={"Context Menu":"Menu konteks",Lock:"Kunci",Back:"Kembali",Settings:"Pengaturan",Progress:"Progres pemutaran","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}));
+5
View File
@@ -5,6 +5,11 @@ function t(e, a) {
}
}
const n = {
"Context Menu": "Menu konteks",
Lock: "Kunci",
Back: "Kembali",
Settings: "Pengaturan",
Progress: "Progres pemutaran",
"Video Info": "Informasi Video",
Close: "Tutup",
"Video Load Failed": "Gagal Memuat Video",
+1 -1
View File
@@ -1 +1 @@
(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}));
(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.artplayerI18nPl=e())})(this,(function(){"use strict";function n(i,o){if(typeof window<"u"){const t=window;t[i]=o}}const e={"Context Menu":"Menu kontekstowe",Lock:"Zablokuj",Back:"Wstecz",Settings:"Ustawienia",Progress:"Postęp odtwarzania","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 n("artplayer-i18n-pl",e),e}));
+5
View File
@@ -5,6 +5,11 @@ function o(e, i) {
}
}
const a = {
"Context Menu": "Menu kontekstowe",
Lock: "Zablokuj",
Back: "Wstecz",
Settings: "Ustawienia",
Progress: "Postęp odtwarzania",
"Video Info": "Informacje o wideo",
Close: "Zamknij",
"Video Load Failed": "Błąd ładowania wideo",
+1 -1
View File
@@ -1 +1 @@
(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}));
(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={"Context Menu":"Контекстное меню",Lock:"Заблокировать",Back:"Назад",Settings:"Настройки",Progress:"Ход воспроизведения","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}));
+5
View File
@@ -5,6 +5,11 @@ function i(e, t) {
}
}
const o = {
"Context Menu": "Контекстное меню",
Lock: "Заблокировать",
Back: "Назад",
Settings: "Настройки",
Progress: "Ход воспроизведения",
"Video Info": "Информация",
Close: "Закрыть",
"Video Load Failed": "Ошибка загрузки видео",
+1 -1
View File
@@ -1 +1 @@
(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}));
(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={"Context Menu":"Bağlam menüsü",Lock:"Kilitle",Back:"Geri",Settings:"Ayarlar",Progress:"Oynatma ilerlemesi","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}));
+8 -3
View File
@@ -4,7 +4,12 @@ function l(e, a) {
i[e] = a;
}
}
const n = {
const t = {
"Context Menu": "Bağlam menüsü",
Lock: "Kilitle",
Back: "Geri",
Settings: "Ayarlar",
Progress: "Oynatma ilerlemesi",
"Video Info": "Video Bilgisi",
Close: "Kapat",
"Video Load Failed": "Video Yüklenemedi",
@@ -42,7 +47,7 @@ const n = {
AirPlay: "AirPlay",
"AirPlay Not Available": "AirPlay Kullanılamıyor"
};
l("artplayer-i18n-tr", n);
l("artplayer-i18n-tr", t);
export {
n as default
t as default
};
+1 -1
View File
@@ -1 +1 @@
(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}));
(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={"Context Menu":"Menu ngữ cảnh",Lock:"Khóa",Back:"Quay lại",Settings:"Cài đặt",Progress:"Tiến trình phát","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}));
+5
View File
@@ -5,6 +5,11 @@ function h(n, t) {
}
}
const i = {
"Context Menu": "Menu ngữ cảnh",
Lock: "Khóa",
Back: "Quay lại",
Settings: "Cài đặt",
Progress: "Tiến trình phát",
"Video Info": "Thông tin video",
Close: "Đóng",
"Video Load Failed": "Tải video thất bại",
+1 -1
View File
@@ -1 +1 @@
(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}));
(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={"Context Menu":"快捷選單",Lock:"鎖定",Back:"返回",Settings:"設定",Progress:"播放進度","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 -4
View File
@@ -1,10 +1,15 @@
function i(e, t) {
function o(e, t) {
if (typeof window < "u") {
const l = window;
l[e] = t;
}
}
const o = {
const i = {
"Context Menu": "快捷選單",
Lock: "鎖定",
Back: "返回",
Settings: "設定",
Progress: "播放進度",
"Video Info": "統計訊息",
Close: "關閉",
"Video Load Failed": "載入失敗",
@@ -42,7 +47,7 @@ const o = {
AirPlay: "隔空播放",
"AirPlay Not Available": "隔空播放不可用"
};
i("artplayer-i18n-zh-tw", o);
o("artplayer-i18n-zh-tw", i);
export {
o as default
i as default
};
+30
View File
@@ -0,0 +1,30 @@
export interface Icons {
readonly loading: HTMLDivElement
readonly state: HTMLDivElement
readonly play: HTMLDivElement
readonly pause: HTMLDivElement
readonly check: HTMLDivElement
readonly volume: HTMLDivElement
readonly volumeClose: HTMLDivElement
readonly screenshot: HTMLDivElement
readonly setting: HTMLDivElement
readonly pip: HTMLDivElement
readonly arrowLeft: HTMLDivElement
readonly arrowRight: HTMLDivElement
readonly playbackRate: HTMLDivElement
readonly aspectRatio: HTMLDivElement
readonly config: HTMLDivElement
readonly lock: HTMLDivElement
readonly flip: HTMLDivElement
readonly unlock: HTMLDivElement
readonly fullscreenOff: HTMLDivElement
readonly fullscreenOn: HTMLDivElement
readonly fullscreenWebOff: HTMLDivElement
readonly fullscreenWebOn: HTMLDivElement
readonly switchOn: HTMLDivElement
readonly switchOff: HTMLDivElement
readonly error: HTMLDivElement
readonly close: HTMLDivElement
readonly airplay: HTMLDivElement
readonly [key: string]: HTMLDivElement
}
+5
View File
@@ -0,0 +1,5 @@
import type { I18n } from './i18n.js'
declare const language: NonNullable<I18n['en']>
// eslint-disable-next-line no-restricted-syntax -- Preserve the language object's CommonJS value export.
export = language
+1
View File
@@ -0,0 +1 @@
export { default } from './language.cjs'
+4
View File
@@ -0,0 +1,4 @@
import type { I18n } from '../i18n'
declare const language: NonNullable<I18n['en']>
export default language
+331
View File
@@ -0,0 +1,331 @@
import type Artplayer from './artplayer'
import type { ComponentInput, ComponentOption } from './component'
import type { CssVar } from './cssVar'
import type { I18n } from './i18n'
import type { Icons } from './icons'
import type { PluginFactory } from './plugin'
import type { Quality } from './quality'
import type { Setting } from './setting'
import type { Subtitle } from './subtitle'
export type CustomType
= | 'flv'
| 'm3u8'
| 'hls'
| 'ts'
| 'mpd'
| 'torrent'
| (string & Record<never, never>)
export interface Thumbnails {
/**
* The thumbnail image url
*/
url: string
/**
* The thumbnail item number
*/
number?: number
/**
* The thumbnail column size
*/
column?: number
/**
* The thumbnail width
*/
width?: number
/**
* The thumbnail height
*/
height?: number
/**
* The thumbnail scale
*/
scale?: number
}
/** Constructor input; Option retains its historical required URL/read types. */
export interface OptionInput extends Omit<Option, 'url' | 'controls' | 'layers' | 'contextmenu'> {
url?: string
controls?: ComponentInput[]
layers?: ComponentInput[]
contextmenu?: ComponentInput[]
}
export interface Option {
/**
* The player id
*/
id?: string
/**
* The container mounted by the player
*/
container: string | HTMLDivElement
/**
* Video url
*/
url: string
/**
* Video poster image url
*/
poster?: string
/**
* Video url type
*/
type?: CustomType
/**
* Player color theme
*/
theme?: string
/**
* Player language
*/
lang?: keyof I18n
/**
* Player default volume
*/
volume?: number
/**
* Whether live broadcast mode
*/
isLive?: boolean
/**
* Whether video muted
*/
muted?: boolean
/**
* Whether video auto play
*/
autoplay?: boolean
/**
* Whether player auto resize
*/
autoSize?: boolean
/**
* Whether player auto run mini mode
*/
autoMini?: boolean
/**
* Whether video auto loop
*/
loop?: boolean
/**
* Whether show video flip button
*/
flip?: boolean
/**
* Whether show video playback rate button
*/
playbackRate?: boolean
/**
* Whether show video aspect ratio button
*/
aspectRatio?: boolean
/**
* Whether show video screenshot button
*/
screenshot?: boolean
/**
* Whether show video setting button
*/
setting?: boolean
/**
* Whether to enable player hotkey
*/
hotkey?: boolean
/**
* Whether show video pip button
*/
pip?: boolean
/**
* Do you want to run only one player at a time
*/
mutex?: boolean
/**
* Whether use backdrop in UI
*/
backdrop?: boolean
/**
* Whether show video window fullscreen button
*/
fullscreen?: boolean
/**
* Whether show video web fullscreen button
*/
fullscreenWeb?: boolean
/**
* Whether to enable player subtitle offset
*/
subtitleOffset?: boolean
/**
* Whether to enable player mini progress bar
*/
miniProgressBar?: boolean
/**
* Whether use SSR function
*/
useSSR?: boolean
/**
* Whether use playsInline in mobile
*/
playsInline?: boolean
/**
* Whether use lock in mobile
*/
lock?: boolean
/**
* Whether use gesture in mobile
*/
gesture?: boolean
/**
* Whether use fast forward in mobile
*/
fastForward?: boolean
/**
* Whether use auto playback
*/
autoPlayback?: boolean
/**
* Whether use auto orientation in mobile
*/
autoOrientation?: boolean
/**
* Whether use airplay
*/
airplay?: boolean
/**
* Custom video proxy
*/
proxy?: (this: Artplayer, art: Artplayer) => HTMLCanvasElement | HTMLVideoElement | undefined
/**
* Custom plugin list
*/
plugins?: PluginFactory[]
/**
* Custom layer list
*/
layers?: ComponentOption[]
/**
* Custom contextmenu list
*/
contextmenu?: ComponentOption[]
/**
* Custom control list
*/
controls?: ComponentOption[]
/**
* Custom setting list
*/
settings?: Setting[]
/**
* Custom video quality list
*/
quality?: Quality[]
/**
* Custom highlight list
*/
highlight?: {
/**
* The highlight time
*/
time: number
/**
* The highlight text
*/
text: string
}[]
/**
* Custom thumbnail
*/
thumbnails?: Thumbnails
/**
* Custom subtitle option
*/
subtitle?: Subtitle
/**
* Other video attribute
*/
moreVideoAttr?: Partial<Readonly<{
[K in keyof HTMLVideoElement as HTMLVideoElement[K] extends (...args: unknown[]) => unknown
? never
: K]: HTMLVideoElement[K]
}>>
/**
* Custom i18n
*/
i18n?: I18n
/**
* Custom default icons
*/
icons?: {
[key in keyof Icons]?: HTMLElement | string
}
/**
* Custom css variables
*/
cssVar?: Partial<CssVar>
/**
* Custom video type function
*/
customType?: Partial<
Record<
CustomType,
(this: Artplayer, video: HTMLVideoElement, url: string, art: Artplayer) => unknown | Promise<unknown>
>
>
}
+6
View File
@@ -0,0 +1,6 @@
/** Accurate playback method view; assign an existing player without a runtime wrapper. */
export interface PlaybackControls {
play: () => Promise<void>
pause: () => void
toggle: () => Promise<void> | void
}
+113
View File
@@ -0,0 +1,113 @@
import type { CssVar } from './cssVar'
import type { CustomType, Thumbnails } from './option'
import type { Quality } from './quality'
export type AspectRatio = 'default' | '4:3' | '16:9' | (`${number}:${number}` & Record<never, never>)
export type PlaybackRate = 0.5 | 0.75 | 1.0 | 1.25 | 1.5 | 1.75 | 2.0 | (number & Record<never, never>)
export type Flip = 'normal' | 'horizontal' | 'vertical' | (string & Record<never, never>)
export type State = 'standard' | 'mini' | 'pip' | 'fullscreen' | 'fullscreenWeb'
export declare class Player {
get aspectRatio(): AspectRatio
set aspectRatio(ratio: AspectRatio)
get state(): State
set state(state: State)
get type(): CustomType
set type(name: CustomType)
get playbackRate(): PlaybackRate
set playbackRate(rate: PlaybackRate)
get currentTime(): number
set currentTime(time: number)
get duration(): number
get played(): number
get playing(): boolean
get flip(): Flip
set flip(state: Flip)
get fullscreen(): boolean
set fullscreen(state: boolean)
get fullscreenWeb(): boolean
set fullscreenWeb(state: boolean)
get loaded(): number
get loadedTime(): number
get mini(): boolean
set mini(state: boolean)
get pip(): boolean
set pip(state: boolean)
get poster(): string
set poster(url: string)
get rect(): DOMRect
get bottom(): number
get height(): number
get left(): number
get right(): number
get top(): number
get width(): number
get x(): number
get y(): number
set seek(time: number)
get seek(): number
set forward(time: number)
get forward(): number
set backward(time: number)
get backward(): number
get url(): string
set url(url: string)
get volume(): number
set volume(percentage: number)
get muted(): boolean
set muted(state: boolean)
get theme(): string
set theme(theme: string)
get subtitleOffset(): number
set subtitleOffset(time: number)
get switch(): string
set switch(url: string)
get quality(): Quality[]
set quality(quality: Quality[])
get thumbnails(): Thumbnails
set thumbnails(thumbnails: Thumbnails)
pause(): void
play(): Promise<void>
/** Legacy signature; runtime preserves pause's synchronous result or play's Promise. */
toggle(): void
attr(key: string, value?: unknown): unknown
cssVar<T extends keyof CssVar>(key: T, value?: CssVar[T]): CssVar[T]
switchUrl(url: string): Promise<void>
switchQuality(url: string): Promise<void>
getDataURL(): Promise<string>
getBlobUrl(): Promise<string>
screenshot(name?: string): Promise<string>
airplay(): void
autoSize(): void
autoHeight(): void
reset(): void
}
+10
View File
@@ -0,0 +1,10 @@
import type Artplayer from './artplayer'
export type PluginFactory<Host = Artplayer, Result = unknown> = (this: Host, art: Host) => Result
/** Augment this interface with installed plugin results; augmentation does not register a plugin. */
export interface Plugins {
/** Legacy signature: synchronous factories return this registry; Promise factories return a Promise of it. */
add: (plugin: PluginFactory) => Promise<Plugins>
[name: string]: unknown
}
+16
View File
@@ -0,0 +1,16 @@
export interface Quality {
/**
* Whether the default is selected
*/
default?: boolean
/**
* Html string of quality
*/
html: string | HTMLElement
/**
* Video quality url
*/
url: string
}
+54
View File
@@ -0,0 +1,54 @@
import type * as Definition from './runtime.js'
declare const Artplayer: typeof Definition.default
// eslint-disable-next-line ts/no-redeclare -- CJS constructor value and instance type share the export.
type Artplayer = Definition.default
// eslint-disable-next-line ts/no-redeclare, ts/no-namespace -- Named types share the existing CommonJS export.
declare namespace Artplayer {
type ArtplayerConstructor = Definition.ArtplayerConstructor
type OptionInput = Definition.OptionInput
type Option = Definition.Option
type Events = Definition.Events
type Plugins = Definition.Plugins
type PluginFactory<Result = unknown> = Definition.PluginFactory<Result>
type PluginHost = Definition.PluginHost
type ProxyHost = Definition.ProxyHost
type CustomTypeHost = Definition.CustomTypeHost
type LayerHost = Definition.LayerHost
type ControlHost = Definition.ControlHost
type ContextmenuHost = Definition.ContextmenuHost
type PluginRegistration<Result, Registry> = Definition.PluginRegistration<Result, Registry>
type Component = Definition.Component
type Controls = Definition.Controls
type Setting = Definition.Setting
type Subtitle = Definition.Subtitle
type Notice = Definition.Notice
type Utils = Definition.Utils
type MediaSurface = Definition.MediaSurface
type NativeMedia = Definition.NativeMedia
type CanvasMedia = Definition.CanvasMedia
type Player<Media extends MediaSurface = MediaSurface> = Definition.Player<Media>
type Template<Host = Artplayer, Media extends MediaSurface = MediaSurface> = Definition.Template<Host, Media>
type Icons = Definition.Icons
type Config = Definition.Config
type EventRegistry = Definition.EventRegistry
type Storage = Definition.Storage
type I18n<Host = Artplayer> = Definition.I18n<Host>
type Hotkey<Host = Artplayer> = Definition.Hotkey<Host>
type Languages = Definition.Languages
type Dictionary = Definition.Dictionary
type QualityItem = Definition.QualityItem
type SettingItem<Host = Artplayer> = Definition.SettingItem<Host>
type ComponentInput<Host = Artplayer> = Definition.ComponentInput<Host>
type ComponentOption<Host = Artplayer> = Definition.ComponentOption<Host>
type ControlInput<Host = Artplayer> = Definition.ControlInput<Host>
type ControlOption<Host = Artplayer> = Definition.ControlOption<Host>
type SelectorItem = Definition.SelectorItem
type SubtitleCue = Definition.SubtitleCue
type SubtitleOption = Definition.SubtitleOption
type Emitter<Events extends { [Name in keyof Events]: readonly unknown[] } = Record<PropertyKey, unknown[]>> = Definition.Emitter<Events>
}
// eslint-disable-next-line no-restricted-syntax -- Preserve the actual CommonJS constructor export.
export = Artplayer
+2
View File
@@ -0,0 +1,2 @@
export { default } from './runtime.cjs'
export type * from './runtime.js'
+125
View File
@@ -0,0 +1,125 @@
import type LegacyArtplayer from './artplayer'
import type { Emitter } from './emitter'
import type { OptionInput as LegacyOptionInput } from './option'
import type { PluginFactory as LegacyPluginFactory, Plugins as LegacyPlugins } from './plugin'
import type { ComponentInput, Component as ComponentView, ControlInput, Controls as ControlsView } from './runtime/component'
import type { ContextmenuHost, ControlHost, CustomTypeHost, LayerHost, PluginHost, ProxyHost } from './runtime/construction'
import type { Events } from './runtime/events'
import type { MediaSurface } from './runtime/media'
import type { OptionInput as OptionInputView, Option as OptionView } from './runtime/option'
import type { Player } from './runtime/player'
import type { PluginFactory as FactoryView, PluginRegistration, Plugins as PluginsView } from './runtime/plugin'
import type { Config, EventRegistry, Hotkey, I18n, Scheme, Storage, ValidatorPath } from './runtime/services'
import type { Setting as SettingView } from './runtime/setting'
import type { Notice as NoticeView, Subtitle as SubtitleView } from './runtime/subtitle'
import type { Icons, Template } from './runtime/template'
import type { Utils } from './runtime/utils'
export type { Emitter } from './emitter'
export type { ComponentInput, ComponentOption, ControlInput, ControlOption, SelectorItem } from './runtime/component'
export type { ContextmenuHost, ControlHost, CustomTypeHost, LayerHost, PluginHost, ProxyHost } from './runtime/construction'
export type { Events } from './runtime/events'
export type { CanvasMedia, MediaSurface, NativeMedia } from './runtime/media'
export type { Player, QualityItem } from './runtime/player'
export type { PluginRegistration } from './runtime/plugin'
export type { Config, Dictionary, EventRegistry, Hotkey, I18n, Languages, Storage } from './runtime/services'
export type { SettingItem } from './runtime/setting'
export type { SubtitleCue, SubtitleOption } from './runtime/subtitle'
export type { Icons, Template } from './runtime/template'
export type { Utils } from './runtime/utils'
export type PluginFactory<Result = unknown> = FactoryView<PluginHost, Result>
export interface OptionInput extends Omit<OptionInputView<Artplayer>, 'plugins' | 'proxy' | 'customType' | 'layers' | 'controls' | 'contextmenu'> {
plugins?: PluginFactory[]
proxy?: (this: ProxyHost, art: ProxyHost) => MediaSurface
customType?: Record<string, ((this: CustomTypeHost, video: MediaSurface, url: string, art: CustomTypeHost) => unknown) | undefined>
layers?: ComponentInput<LayerHost>[]
controls?: ControlInput<ControlHost>[]
contextmenu?: ComponentInput<ContextmenuHost>[]
}
export interface Option extends OptionView<Artplayer> {}
export interface Component extends ComponentView<Artplayer> {}
export interface Controls extends ControlsView<Artplayer> {}
export interface Setting extends SettingView<Artplayer> {}
export interface Subtitle extends SubtitleView, Omit<Component, keyof SubtitleView> {}
export interface Notice extends NoticeView { art: Artplayer }
/** Augment with installed results. Factories are not wrapped or converted. */
export interface PluginAdd<Registry> {
<Result>(plugin: FactoryView<Artplayer, Result>): PluginRegistration<Result, Registry>
<Result>(plugin: LegacyPluginFactory<LegacyArtplayer, Result>): PluginRegistration<Result, Registry>
}
type LegacyPluginResults = {
[Name in keyof LegacyPlugins as string extends Name ? never : number extends Name ? never : Name extends keyof PluginsView<Artplayer> ? never : Name]: LegacyPlugins[Name]
}
export interface Plugins extends Omit<PluginsView<Artplayer>, 'add'>, LegacyPluginResults {
add: PluginAdd<this>
[name: string]: unknown
}
/** Public view of the existing constructor; this interface emits no runtime fields. */
interface Artplayer extends Player, Emitter<Events> {
constructor: ArtplayerConstructor
id: number
option: Option
isLock: boolean
isReady: boolean
isFocus: boolean
isInput: boolean
isRotate: boolean
isDestroy: boolean
flv?: unknown
m3u8?: unknown
hls?: unknown
ts?: unknown
mpd?: unknown
torrent?: unknown
template: Template<Artplayer>
events: EventRegistry
storage: Storage
icons: Icons
i18n: I18n<Artplayer>
notice: Notice
/** The descriptor installer has no public instance members. */
player: object
layers: Component
controls: Controls
contextmenu: Component & { init: () => void }
subtitle: Subtitle
info: Component & { init: () => void }
loading: Component
hotkey: Hotkey<Artplayer>
mask: Component
setting: Setting
plugins: Plugins
readonly query: Template<Artplayer>['query']
readonly proxy: EventRegistry['proxy']
readonly video: MediaSurface
reset: () => void
destroy: (removeHtml?: boolean) => void
}
type StaticOptions = Pick<typeof LegacyArtplayer, Extract<keyof typeof LegacyArtplayer, Uppercase<string>>>
export interface ArtplayerConstructor extends StaticOptions {
new (option: OptionInput, readyCallback?: (this: Artplayer, art: Artplayer) => unknown): Artplayer
new (option: LegacyOptionInput, readyCallback?: (this: Artplayer, art: Artplayer) => unknown): Artplayer
readonly prototype: Artplayer
readonly instances: Artplayer[]
readonly version: string
readonly config: Config
readonly utils: Utils
readonly scheme: Record<keyof Option, Scheme>
readonly Emitter: new <Events extends { [Name in keyof Events]: readonly unknown[] } = Record<PropertyKey, unknown[]>>(...args: unknown[]) => Emitter<Events>
readonly validator: <T>(option: T, scheme: Scheme, paths?: ValidatorPath) => T
readonly kindOf: (value: unknown) => string
readonly html: string
readonly option: Option
}
// eslint-disable-next-line ts/no-redeclare -- One existing constructor value and its instance view.
declare const Artplayer: ArtplayerConstructor
export default Artplayer
+65
View File
@@ -0,0 +1,65 @@
export type EventCleanup = () => void
export interface SelectorItem {
html: string | HTMLElement | number
value?: string | number
default?: boolean
readonly $control_option?: SelectorItem[]
readonly $control_item?: HTMLDivElement
readonly $control_value?: HTMLDivElement
}
export interface ComponentOption<Host> {
html?: string | HTMLElement | number
disable?: boolean
name?: string
index?: number
style?: Partial<CSSStyleDeclaration>
tooltip?: string | number
position?: string
selector?: SelectorItem[]
click?: (this: Host, component: Component<Host>, event: Event) => unknown
mounted?: (this: Host, element: HTMLDivElement) => unknown
beforeUnmount?: (this: Host, element: HTMLDivElement) => unknown
onSelect?: (this: Host, item: SelectorItem, element: HTMLDivElement, event: Event) => unknown
}
export type ComponentInput<Host> = ComponentOption<Host> | ((art: Host) => ComponentOption<Host>)
export interface ControlOption<Host> extends Omit<ComponentOption<Host>, 'position'> {
position: 'top' | 'left' | 'right'
}
export type ControlInput<Host> = ControlOption<Host> | ((art: Host) => ControlOption<Host>)
export interface ComponentEntry<Host> {
$ref: HTMLDivElement
events: EventCleanup[]
option: ComponentOption<Host>
}
export interface Component<Host> {
id: number
art: Host
name?: string
$parent?: HTMLElement
cache: Map<string, ComponentEntry<Host>>
show: boolean
toggle: () => void
add: (input: ComponentInput<Host>) => HTMLDivElement | undefined
remove: (name: string) => void
update: (option: ComponentOption<Host>) => ReturnType<this['add']>
selector?: (option: ComponentOption<Host>, element: HTMLDivElement, events: EventCleanup[]) => void
}
export interface Controls<Host> extends Omit<Component<Host>, 'add' | 'update' | 'selector'> {
isHover: boolean
timer: number
setting?: HTMLDivElement
thumbnails?: HTMLDivElement
init: () => void
add: (input: ControlInput<Host>) => undefined
update: (option: ComponentOption<Host>) => undefined
check: (target?: SelectorItem) => void
selector: (option: ComponentOption<Host>, element: HTMLDivElement, events: EventCleanup[]) => void
}
+19
View File
@@ -0,0 +1,19 @@
import type { Emitter } from '../emitter'
import type Artplayer from '../runtime'
import type { Events } from './events'
import type { Player } from './player'
/** Safe fields before Template returns; video/query/proxy getters are not usable yet. */
export interface ProxyHost extends Emitter<Events>, Pick<Artplayer, 'constructor' | 'id' | 'option' | 'isLock' | 'isReady' | 'isFocus' | 'isInput' | 'isRotate' | 'isDestroy' | 'destroy'> {}
// Mapped types collapse distinct getter/setter types; preserve Player directly.
type Pending<Names extends keyof Artplayer> = Player & Omit<Artplayer, Names | keyof Player> & Partial<Pick<Artplayer, Names>>
type AfterPlayer = 'layers' | 'controls' | 'contextmenu' | 'subtitle' | 'info' | 'loading' | 'hotkey' | 'mask' | 'setting' | 'plugins'
/** URL assignment awaits its owned delay before invoking customType. */
export type CustomTypeHost = Artplayer
export type LayerHost = Pending<AfterPlayer>
export type ControlHost = Pending<Exclude<AfterPlayer, 'layers'>>
export type ContextmenuHost = Pending<Exclude<AfterPlayer, 'layers' | 'controls'>>
/** Constructor factories run before the Plugins registry is assigned to the player. */
export type PluginHost = Pending<'plugins'>
+26
View File
@@ -0,0 +1,26 @@
import type { Events as LegacyEvents } from '../events'
import type { SubtitleCue, SubtitleOption } from './subtitle'
type NativeEvents = { [Name in Extract<keyof LegacyEvents, `video:${string}`>]: [event: Event] }
interface BuiltinEvents {
[name: `video:${string}`]: [event: Event]
'document:keydown': [KeyboardEvent]
'document:mousemove': [MouseEvent]
'document:mouseup': [MouseEvent]
'mousemove': [MouseEvent]
'click': [MouseEvent]
'blur': [Event]
'error': [error: unknown, attempt: number]
'fullscreenError': [error: unknown]
'aspectRatio': [string]
'flip': [string]
'seek': [time: number, requestedTime: number | string]
'setBar': [type: string, percentage: number, event?: MouseEvent | TouchEvent]
'subtitleBeforeUpdate': [cues: SubtitleCue[]]
'subtitleAfterUpdate': [cues: SubtitleCue[]]
'subtitleLoad': [cues: SubtitleCue[], option: SubtitleOption | null]
}
/** Legacy custom event augmentation is retained; builtin payload corrections take precedence. */
export interface Events extends Omit<LegacyEvents, keyof BuiltinEvents>, NativeEvents, BuiltinEvents, Record<PropertyKey, unknown[]> {}
+41
View File
@@ -0,0 +1,41 @@
export type MediaState = Pick<HTMLMediaElement, 'currentTime' | 'duration' | 'paused' | 'ended' | 'readyState'> & {
readonly playing?: boolean
}
export interface PlaybackMethods<PlayResult = unknown, PauseResult = unknown> {
play: () => PlayResult
pause: () => PauseResult
}
export interface OptionalMediaCapabilities {
readonly textTracks?: ArrayLike<TextTrack>
readonly error?: unknown
requestPictureInPicture?: () => Promise<PictureInPictureWindow>
requestVideoFrameCallback?: (callback: VideoFrameRequestCallback) => number
cancelVideoFrameCallback?: (handle: number) => void
webkitEnterFullscreen?: () => void
webkitExitFullscreen?: () => void
readonly webkitSupportsFullscreen?: boolean
webkitShowPlaybackTargetPicker?: () => void
webkitSupportsPresentationMode?: (mode: string) => boolean
webkitSetPresentationMode?: (mode: string) => void
readonly webkitPresentationMode?: string
readonly webkitDisplayingFullscreen?: boolean
}
export type NativeMedia = Omit<HTMLVideoElement, keyof OptionalMediaCapabilities> & OptionalMediaCapabilities
export type CanvasMedia = HTMLCanvasElement & MediaState & PlaybackMethods & OptionalMediaCapabilities & {
src: string | null
readonly currentSrc: string | null
readonly videoWidth: number
readonly videoHeight: number
readonly buffered: TimeRanges
volume: number
muted: boolean
playbackRate: number
load: () => unknown
}
/** Check optional capabilities before calling them on a native or proxy surface. */
export type MediaSurface = NativeMedia | CanvasMedia
+28
View File
@@ -0,0 +1,28 @@
import type { OptionInput as LegacyOptionInput, Thumbnails } from '../option'
import type { ComponentInput, ControlInput } from './component'
import type { MediaSurface } from './media'
import type { PluginFactory } from './plugin'
import type { Languages } from './services'
import type { SettingItem } from './setting'
import type { SubtitleOption } from './subtitle'
/** Callback receivers are the unchanged player instance selected by this view. */
export interface OptionInput<Host> extends Omit<LegacyOptionInput, 'container' | 'proxy' | 'plugins' | 'layers' | 'controls' | 'contextmenu' | 'settings' | 'customType' | 'i18n' | 'icons'> {
container: string | HTMLDivElement
proxy?: (this: Host, art: Host) => MediaSurface | undefined
plugins?: PluginFactory<Host>[]
layers?: ComponentInput<Host>[]
controls?: ControlInput<Host>[]
contextmenu?: ComponentInput<Host>[]
settings?: SettingItem<Host>[]
customType?: Record<string, ((this: Host, video: MediaSurface, url: string, art: Host) => unknown) | undefined>
i18n?: Languages
icons?: Record<string, string | HTMLElement | undefined>
}
/** Defaults are merged once; later setters may replace thumbnails with a partial input. */
export interface Option<Host> extends Omit<Required<OptionInput<Host>>, 'proxy' | 'subtitle' | 'thumbnails'> {
proxy: OptionInput<Host>['proxy']
subtitle: SubtitleOption
thumbnails: Thumbnails
}
+78
View File
@@ -0,0 +1,78 @@
import type { Thumbnails } from '../option'
import type { State } from '../player'
import type { MediaSurface } from './media'
export interface QualityItem {
html: string | HTMLElement
url: string
default?: boolean
}
/** Player-facing descriptors; native/proxy method results retain their identity. */
export interface Player<Media extends MediaSurface = MediaSurface> {
get currentTime(): number
set currentTime(time: number | string)
readonly duration: number
get seek(): undefined
set seek(time: number | string)
get forward(): undefined
set forward(time: number)
get backward(): undefined
set backward(time: number)
get switch(): undefined
set switch(url: string)
get quality(): undefined
set quality(items: QualityItem[])
get url(): string | null
set url(value: string)
get state(): State
set state(value: string)
get pip(): Element | null | boolean
set pip(value: boolean)
/** The descriptor may be absent before metadata installs the available mode. */
fullscreen?: boolean
fullscreenWeb: boolean
mini: boolean
volume: number
muted: boolean
playbackRate: number
aspectRatio: string
flip: string
poster: string
theme: string
type: string
subtitleOffset: number
thumbnails: Thumbnails
readonly loaded: number
readonly loadedTime: number
readonly played: number
readonly playing: boolean
readonly rect: DOMRect
readonly bottom: number
readonly height: number
readonly left: number
readonly right: number
readonly top: number
readonly width: number
readonly x: number
readonly y: number
play: () => Promise<Awaited<ReturnType<Media['play']>>>
pause: () => ReturnType<Media['pause']>
toggle: () => Promise<Awaited<ReturnType<Media['play']>>> | ReturnType<Media['pause']>
switchUrl: (url: string) => Promise<void>
switchQuality: (url: string) => Promise<void>
autoSize: () => void
autoHeight: () => void
airplay: () => void
getDataURL: () => Promise<string>
getBlobUrl: () => Promise<string>
screenshot: (name?: string) => Promise<string>
attr: {
(key: PropertyKey): unknown
(key: PropertyKey, value: unknown): unknown
}
cssVar: {
(key: string): string
(key: string, value: unknown): string | void
}
}
+13
View File
@@ -0,0 +1,13 @@
export type PluginFactory<Host, Result = unknown> = (this: Host, art: Host) => Result
export type PluginRegistration<Result, Registry>
= unknown extends Result ? Registry | Promise<Registry>
: Result extends Promise<unknown> ? Promise<Registry> : Registry
/** The same registry is returned immediately or after its Promise factory settles. */
export interface Plugins<Host> {
art: Host
id: number
add: <Result>(plugin: PluginFactory<Host, Result>) => PluginRegistration<Result, this>
next: (plugin: PluginFactory<Host>, result: unknown) => this
}
+57
View File
@@ -0,0 +1,57 @@
export interface Config {
properties: string[]
methods: string[]
events: string[]
prototypes: string[]
}
export type Disposer = () => void
export type Listener = EventListenerOrEventListenerObject | null
export interface EventRegistry {
destroyEvents: Set<Disposer>
proxy: {
(target: EventTarget, name: string, callback: Listener, option?: boolean | AddEventListenerOptions | null): Disposer
(target: EventTarget, name: string[], callback: Listener, option?: boolean | AddEventListenerOptions | null): Disposer[]
(target: EventTarget, name: string | string[], callback: Listener, option?: boolean | AddEventListenerOptions | null): Disposer | Disposer[]
}
hover: (target: EventTarget, mouseenter?: (event: Event) => unknown, mouseleave?: (event: Event) => unknown) => void
remove: (dispose: Disposer) => void
destroy: () => void
bindGlobalEvents: (source?: { window?: Window, document?: Document }) => void
}
export interface Storage {
name: string
settings: Record<PropertyKey, unknown>
get: (key?: PropertyKey) => unknown
set: (key: PropertyKey, value: unknown) => void
del: (key: PropertyKey) => void
clear: () => void
}
export type Dictionary = Record<string, string | undefined>
export type Languages = Record<string, Dictionary | undefined>
export interface I18n<Host> {
art: Host
languages: Languages
language: Dictionary
init: () => void
get: (key: string) => string
update: (value: Languages) => void
}
export type HotkeyCallback<Host> = (this: Host, event: KeyboardEvent) => unknown
export interface Hotkey<Host> {
art: Host
keys: Record<string, HotkeyCallback<Host>[]>
init: () => void
add: (key: string, callback: HotkeyCallback<Host>) => this
remove: (key: string, callback: HotkeyCallback<Host>) => this
}
export type ValidatorPath = (string | number)[]
export type Validator = (value: unknown, type: string, paths: ValidatorPath) => unknown
export type Scheme = string | Validator | Scheme[] | { [key: string]: Scheme }
+58
View File
@@ -0,0 +1,58 @@
export type SettingContent = string | HTMLElement | number
export type SettingRange = [value?: number, min?: number, max?: number, step?: number]
export type SettingCallback<Host> = (this: Host, item: SettingItem<Host>, element: HTMLDivElement, event: Event) => unknown
export interface SettingItem<Host> {
name?: string
html?: SettingContent
icon?: SettingContent
tooltip?: SettingContent
width?: number
value?: string | number
default?: boolean
switch?: boolean
range?: SettingRange
selector?: SettingItem<Host>[]
mounted?: (this: Host, element: HTMLDivElement, item: SettingItem<Host>) => unknown
onClick?: SettingCallback<Host>
onSwitch?: SettingCallback<Host>
onRange?: SettingCallback<Host>
onChange?: SettingCallback<Host>
onSelect?: SettingCallback<Host>
readonly $parent?: SettingItem<Host>
readonly $parents?: SettingItem<Host>[]
readonly $option?: SettingItem<Host>[]
readonly $events?: (() => void)[]
readonly $formatted?: boolean
readonly $item?: HTMLDivElement
readonly $icon?: HTMLDivElement
readonly $html?: HTMLDivElement
readonly $tooltip?: HTMLDivElement
readonly $switch?: HTMLDivElement
readonly $range?: HTMLInputElement
}
export interface Setting<Host> {
id: number
art: Host
name: string
$parent: HTMLElement
cache: Map<SettingItem<Host>[], HTMLDivElement>
active: SettingItem<Host>[] | null
option: SettingItem<Host>[]
readonly builtin: SettingItem<Host>[]
show: boolean
toggle: () => void
traverse: (callback: (item: SettingItem<Host>) => void, option?: SettingItem<Host>[]) => void
check: (target?: SettingItem<Host> | null) => void
format: (option?: SettingItem<Host>[], parent?: SettingItem<Host>, parents?: SettingItem<Host>[], names?: string[]) => void
find: (name?: string) => SettingItem<Host> | null
resize: () => void
inactivate: (item: SettingItem<Host>) => void
remove: (name: string) => void
update: (item: SettingItem<Host>) => SettingItem<Host>
add: <Item extends SettingItem<Host>>(item: Item, option?: SettingItem<Host>[]) => Item
createHeader: (item: SettingItem<Host>) => void
createItem: (item: SettingItem<Host>, isUpdate?: boolean) => void
render: (option?: SettingItem<Host>[]) => void
}
+38
View File
@@ -0,0 +1,38 @@
import type { Subtitle as SubtitleInput } from '../subtitle'
export type SubtitleOption = Required<SubtitleInput>
export interface SubtitleCue extends TextTrackCue {
text: string
originalStartTime?: number
originalEndTime?: number
}
export interface SubtitleTrack extends HTMLTrackElement { offset?: number }
export interface Subtitle {
name: string
option: SubtitleOption | null
destroyEvent: () => unknown
url: string
readonly textTrack: TextTrack | undefined
readonly activeCues: SubtitleCue[]
readonly cues: SubtitleCue[]
show: boolean
toggle: () => void
style: {
(styles: Partial<CSSStyleDeclaration>): HTMLDivElement
(key: string, value: string | number): HTMLDivElement
}
update: () => void
switch: (url: string, option?: SubtitleInput) => Promise<string | null | undefined>
init: (option: SubtitleOption) => Promise<string | null | undefined>
createTrack: (kind: string, url: string) => void
}
export interface Notice {
timer: number | null
get show(): boolean
set show(value: string | Error | false)
destroy: () => void
}
+42
View File
@@ -0,0 +1,42 @@
import type { MediaSurface } from './media'
/** Query results remain nullable for caller-supplied SSR templates. */
export interface Template<Host, Media extends MediaSurface = MediaSurface> {
art: Host
$container: HTMLDivElement
$player: HTMLDivElement | null
$video: Media
$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
$mini?: HTMLElement
query: <ElementType extends Element = Element>(selector: string) => ElementType | null
init: () => void
destroy: (removeHtml: boolean) => void
}
export type IconName = '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'
/** Default getters create fresh icon wrappers; unknown custom keys may be absent. */
export type Icons = Readonly<Record<IconName, HTMLElement>> & { readonly [name: string]: HTMLElement | undefined }
+67
View File
@@ -0,0 +1,67 @@
interface StyledElement { style: CSSStyleDeclaration }
interface EventPathSource {
target: EventTarget | null
composedPath?: () => EventTarget[]
}
type StackFrame = ((...args: never[]) => unknown) | (abstract new (...args: never[]) => object)
export interface Utils {
isBrowser: boolean
userAgent: string
isMobile: boolean
isSafari: boolean
isIOS: boolean
isIOS13: boolean
query: <T extends Element = Element>(selector: string, parent?: ParentNode) => T | null
queryAll: <T extends Element = Element>(selector: string, parent?: ParentNode) => T[]
addClass: (target: Pick<Element, 'classList'>, className: string) => void
removeClass: (target: Pick<Element, 'classList'>, className: string) => void
hasClass: (target: Pick<Element, 'classList'>, className: string) => boolean
append: (parent: Element, child: unknown) => Element | ChildNode | null
remove: <T extends Node>(child: T) => T
replaceElement: <T extends Node>(newChild: T, oldChild: Node) => T
siblings: (target: Element) => Element[]
inverseClass: (target: Element, className: string) => void
createElement: {
<K extends keyof HTMLElementTagNameMap>(tag: K): HTMLElementTagNameMap[K]
(tag: string): HTMLElement
}
setStyle: <T extends StyledElement>(element: T, key: PropertyKey, value: unknown) => T
setStyles: <T extends StyledElement>(element: T, styles: object) => T
getStyle: {
(element: Element, key: string, numberType?: true): number
(element: Element, key: string, numberType: false): string
(element: Element, key: string, numberType: boolean): number | string
}
setStyleText: (id: string, cssText: string) => void
getRect: (element: Pick<Element, 'getBoundingClientRect'>) => DOMRect
tooltip: (target: Element, message: string | number, position?: string) => void
isInViewport: (target: Pick<Element, 'getBoundingClientRect'>, offset?: number) => boolean
includeFromEvent: (event: EventPathSource, target: EventTarget | null | undefined) => boolean
getSafeAreaInsets: () => { top: number, right: number, bottom: number, left: number }
srtToVtt: (text: string) => string
vttToBlob: (text: string) => string
assToVtt: (text: string) => string
getExt: (url: string) => string
download: (url: string, name: string) => void
loadImg: (url: string, scale?: number) => Promise<HTMLImageElement>
errorHandle: <T>(condition: T, message?: string) => T
silencePromise: <T>(value: T) => T extends Promise<infer Result> ? Promise<Result | undefined> : T
def: <T extends object>(object: T, name: PropertyKey, descriptor: PropertyDescriptor & object & ThisType<T>) => T
has: (object: object, name: PropertyKey) => boolean
get: (object: object, name: PropertyKey) => PropertyDescriptor | undefined
mergeDeep: <T extends object[]>(...objects: T) => T[number]
sleep: (milliseconds?: number) => Promise<void>
/** The wrapper preserves its call receiver; the old context argument is ignored. */
debounce: <Receiver, Args extends unknown[]>(callback: (this: Receiver, ...args: Args) => unknown, duration: number, context?: object) => (this: Receiver, ...args: Args) => void
throttle: <Receiver, Args extends unknown[]>(callback: (this: Receiver, ...args: Args) => unknown, duration: number) => (this: Receiver, ...args: Args) => void
clamp: (number: number, a: number, b: number) => number
secondToTime: (second: number) => string
escape: (text: string) => string
unescape: (text: string) => string
capitalize: (text: string) => string
ArtPlayerError: new (message?: string, context?: StackFrame) => Error
getIcon: (key?: string, html?: string | HTMLElement) => HTMLElement
getComposedPath: (event: EventPathSource) => EventTarget[]
supportsFlex: () => boolean
}
+95
View File
@@ -0,0 +1,95 @@
import type Artplayer from './artplayer'
export interface SettingOption extends Omit<Setting, 'html' | 'icon' | 'tooltip'> {
html: string
icon: string | undefined
tooltip: string | undefined
$item: HTMLDivElement
$icon: HTMLDivElement | undefined
$html: HTMLDivElement
$tooltip: HTMLDivElement | undefined
$switch: HTMLDivElement | undefined
$range: HTMLInputElement | undefined
$parent: SettingOption | undefined
$parents: SettingOption[]
$option: SettingOption[]
$events: Array<() => void>
$formatted: boolean
}
export interface Setting {
/**
* Html string or html element of setting name
*/
html: string | HTMLElement
/**
* Html string or html element of setting icon
*/
icon?: string | HTMLElement
/**
* The width of setting
*/
width?: number
/**
* The tooltip of setting
*/
tooltip?: string | HTMLElement
/**
* Whether the default is selected
*/
default?: boolean
/**
* Custom selector list
*/
selector?: Setting[]
/**
* When the setting was mounted
*/
mounted?: (this: Artplayer, panel: HTMLDivElement, item: Setting) => void
/**
* When selector item click
*/
onSelect?: (this: Artplayer, item: SettingOption, element: HTMLDivElement, event: Event) => void
/**
* Custom switch item
*/
switch?: boolean
/**
* When switch item click
*/
onSwitch?: (this: Artplayer, item: SettingOption, element: HTMLDivElement, event: Event) => void
/**
* Custom range item
*/
range?: [value?: number, min?: number, max?: number, step?: number]
/**
* When range item change
*/
onRange?: (this: Artplayer, item: SettingOption, element: HTMLDivElement, event: Event) => void
/**
* When range item change in real time
*/
onChange?: (this: Artplayer, item: SettingOption, element: HTMLDivElement, event: Event) => void
/**
* When range item change in real time
*/
onClick?: (this: Artplayer, item: SettingOption, element: HTMLDivElement, event: Event) => void
/**
* Allow custom properties
*/
[key: string]: any
}
+36
View File
@@ -0,0 +1,36 @@
export interface Subtitle {
/**
* The subtitle url
*/
url?: string
/**
* The subtitle name
*/
name?: string
/**
* The subtitle type
*/
type?: 'vtt' | 'srt' | 'ass' | (string & Record<never, never>)
/**
* The subtitle style object
*/
style?: Partial<CSSStyleDeclaration>
/**
* The subtitle encoding, default utf-8
*/
encoding?: string
/**
* Whether use escape, default true
*/
escape?: boolean
/**
* Change the vtt text
*/
onVttLoad?: (vtt: string) => string
}
+27
View File
@@ -0,0 +1,27 @@
export interface Template {
readonly html: string
readonly $container: HTMLDivElement
readonly $player: HTMLDivElement
readonly $video: HTMLVideoElement
readonly $track: HTMLTrackElement
readonly $poster: HTMLDivElement
readonly $subtitle: HTMLDivElement
readonly $danmuku: HTMLDivElement
readonly $bottom: HTMLDivElement
readonly $progress: HTMLDivElement
readonly $controls: HTMLDivElement
readonly $controlsLeft: HTMLDivElement
readonly $controlsCenter: HTMLDivElement
readonly $controlsRight: HTMLDivElement
readonly $layer: HTMLDivElement
readonly $loading: HTMLDivElement
readonly $notice: HTMLDivElement
readonly $noticeInner: HTMLDivElement
readonly $mask: HTMLDivElement
readonly $state: HTMLDivElement
readonly $setting: HTMLDivElement
readonly $info: HTMLDivElement
readonly $infoPanel: HTMLDivElement
readonly $infoClose: HTMLDivElement
readonly $contextmenu: HTMLDivElement
}
+73
View File
@@ -0,0 +1,73 @@
export interface Utils {
isBrowser: boolean
userAgent: string
isMobile: boolean
isSafari: boolean
isIOS: boolean
isIOS13: boolean
query: <T extends Element = Element>(selector: string, parent?: Document | HTMLElement) => T | null
queryAll: <T extends Element = Element>(selector: string, parent?: Document | HTMLElement) => T[]
addClass: (target: HTMLElement, className: string) => void
removeClass: (target: HTMLElement, className: string) => void
hasClass: (target: HTMLElement, className: string) => boolean
append: (target: HTMLElement, child: HTMLElement | string) => Element | ChildNode
remove: (target: HTMLElement) => HTMLElement
replaceElement: (newChild: HTMLElement, oldChild: HTMLElement) => HTMLElement
siblings: (target: HTMLElement) => HTMLElement[]
inverseClass: (target: HTMLElement, className: string) => void
createElement: <K extends keyof HTMLElementTagNameMap>(tag: K) => HTMLElementTagNameMap[K]
setStyle: <T extends keyof CSSStyleDeclaration>(
element: HTMLElement,
key: T,
value: string | CSSStyleDeclaration[T],
) => HTMLElement
setStyles: (element: HTMLElement, styles: Partial<CSSStyleDeclaration>) => HTMLElement
getStyle: {
(element: HTMLElement, key: keyof CSSStyleDeclaration, numberType?: true): number
(element: HTMLElement, key: keyof CSSStyleDeclaration, numberType: false): string
}
setStyleText: (id: string, cssText: string) => void
getRect: (el: HTMLElement) => { top: number, left: number, width: number, height: number }
tooltip: (target: HTMLElement, msg: string, pos?: string) => void
isInViewport: (target: HTMLElement, offset?: number) => boolean
includeFromEvent: (event: Event, target: HTMLElement) => boolean
getSafeAreaInsets: () => { top: number, right: number, bottom: number, left: number }
srtToVtt: (srtText: string) => string
vttToBlob: (vttText: string) => string
assToVtt: (assText: string) => string
getExt: (url: string) => string
download: (url: string, name: string) => void
loadImg: (url: string, scale?: number) => Promise<HTMLImageElement>
errorHandle: <T extends boolean>(condition: T, msg: string) => T extends true ? T : never
silencePromise: <T>(value: T) => T extends Promise<infer R> ? Promise<R | undefined> : T
def: {
/** Historical string-key signature; runtime returns obj. */
(obj: object, name: string, value: unknown): void
<T>(obj: T, name: PropertyKey, value: PropertyDescriptor & ThisType<T>): T
}
has: (obj: object, name: PropertyKey) => boolean
get: (obj: object, name: PropertyKey) => PropertyDescriptor | undefined
mergeDeep: <T extends object[]>(...args: T) => T[number]
sleep: (ms?: number) => Promise<void>
/** Historical return type; runtime discards the callback result and ignores context. */
debounce: <F extends (...args: any[]) => any>(func: F, wait: number, context?: object) => (...args: Parameters<F>) => ReturnType<F>
/** Historical return type; runtime discards the callback result. */
throttle: <F extends (...args: any[]) => any>(func: F, wait: number) => (...args: Parameters<F>) => ReturnType<F>
clamp: (num: number, a: number, b: number) => number
secondToTime: (second: number) => string
escape: (str: string) => string
unescape: (str: string) => string
capitalize: (str: string) => string
ArtPlayerError: new (message?: string, context?: ((...args: never[]) => unknown) | (abstract new (...args: never[]) => object)) => Error
getIcon: (key?: string, html?: string | HTMLElement) => HTMLElement
getComposedPath: (event: Event) => EventTarget[]
supportsFlex: () => boolean
}
+5
View File
@@ -15,10 +15,15 @@ type I18nKeys
| (string & Record<never, never>)
interface I18nValue {
'Context Menu'?: string
'Lock'?: string
'Video Info': string
'Close': string
'Video Load Failed': string
'Volume': string
'Progress'?: string
'Back'?: string
'Settings'?: string
'Play': string
'Pause': string
'Rate': string
@@ -0,0 +1,48 @@
import type ResourceScope from '../lifecycle/scope'
import { listen } from '../lifecycle/resources'
import { claimKey, plainKey } from './keyboard'
/** Preserve the existing click path and keep owned keys out of player hotkeys. */
export function keyboardButton(scope: ResourceScope, element: HTMLElement, activate = () => element.click(), active = () => true): void {
if (scope.closed)
return
if (!element.hasAttribute('role'))
element.setAttribute('role', 'button')
if (!element.hasAttribute('tabindex'))
element.tabIndex = 0
let space = false
const enabled = () => active() && element.getAttribute('aria-disabled') !== 'true' && !element.hasAttribute('disabled')
const own = (event: KeyboardEvent) => (event.composedPath()[0] || event.target) === element
listen(scope, element, 'keydown', (value) => {
const event = value as KeyboardEvent
if (!own(event) || !plainKey(event) || event.defaultPrevented)
return
if (event.key === 'Enter') {
claimKey(event)
if (!event.repeat && enabled())
activate()
}
else if (event.key === ' ') {
claimKey(event)
if (!event.repeat && enabled())
space = true
}
})
listen(scope, element, 'keyup', (value) => {
const event = value as KeyboardEvent
if (event.key !== ' ')
return
const armed = space
space = false
if (armed && own(event) && plainKey(event) && !event.defaultPrevented && enabled() && element.ownerDocument.activeElement === element) {
claimKey(event)
activate()
}
})
listen(scope, element, 'blur', () => {
space = false
})
scope.add(() => {
space = false
})
}
@@ -0,0 +1,50 @@
import type ResourceScope from '../lifecycle/scope'
import { listen } from '../lifecycle/resources'
/** Keep keyboard visibility separate from the existing pointer focus flags. */
export function focusVisibility(scope: ResourceScope, root: HTMLElement, show: () => void): () => boolean {
let keyboard = true
let document: Document | undefined
let documentScope: ResourceScope | undefined
const focused = () => !scope.closed && keyboard && root.contains(root.ownerDocument.activeElement)
const update = () => {
const visible = focused()
const previous = root.classList.contains('art-keyboard-focus')
root.classList.toggle('art-keyboard-focus', visible)
if (visible && !previous)
show()
}
const key = () => {
keyboard = true
update()
}
const pointer = () => {
keyboard = false
update()
}
const bindDocument = () => {
if (document === root.ownerDocument)
return
documentScope?.dispose()
document = root.ownerDocument
documentScope = scope.child()
listen(documentScope, document, 'keydown', key, { capture: true })
listen(documentScope, document, 'mousedown', pointer, { capture: true })
listen(documentScope, document, 'touchstart', pointer, { capture: true, passive: true })
}
bindDocument()
listen(scope, root, 'keydown', key, { capture: true })
listen(scope, root, 'mousedown', pointer, { capture: true })
listen(scope, root, 'touchstart', pointer, { capture: true, passive: true })
listen(scope, root, 'focusin', () => {
bindDocument()
update()
})
listen(scope, root, 'focusout', () => {
root.classList.remove('art-keyboard-focus')
})
scope.add(() => {
root.classList.remove('art-keyboard-focus')
})
return focused
}
@@ -0,0 +1,14 @@
const handled = new WeakSet<KeyboardEvent>()
export function claimKey(event: KeyboardEvent): void {
handled.add(event)
event.preventDefault()
}
export function isClaimedKey(event: KeyboardEvent): boolean {
return handled.has(event)
}
export function plainKey(event: KeyboardEvent): boolean {
return !event.altKey && !event.ctrlKey && !event.metaKey && !event.isComposing && event.keyCode !== 229
}
@@ -0,0 +1,9 @@
/** Restore the same focused descendant after DOM reparenting. */
export function captureMovedFocus(root: HTMLElement): () => void {
const focused = root.ownerDocument?.activeElement as HTMLElement | null | undefined
const inside = focused && root.contains(focused)
return () => {
if (inside && focused.isConnected && root.contains(focused) && focused.ownerDocument.activeElement === focused.ownerDocument.body)
focused.focus({ preventScroll: true })
}
}
@@ -0,0 +1,26 @@
const origins = new WeakMap<HTMLElement, HTMLElement>()
export function setOverlayOrigin(overlay: HTMLElement, origin?: HTMLElement): void {
if (origin)
origins.set(overlay, origin)
else
origins.delete(overlay)
}
export function resolveFocusOrigin(target: HTMLElement): HTMLElement {
const visited = new Set<HTMLElement>()
let current = target
while (!visited.has(current)) {
visited.add(current)
let element: HTMLElement | null = current
let origin: HTMLElement | undefined
while (element && !origin) {
origin = origins.get(element)
element = element.parentElement
}
if (!origin)
return current
current = origin
}
return target
}
@@ -0,0 +1,22 @@
import type { ComponentHost } from '../component/types'
import { getScope, isClosing } from '../lifecycle/instance'
const owned = new WeakSet<HTMLElement>()
export function focusPlayer(art: Pick<ComponentHost, 'template'>): void {
const player = art.template.$player
if (isClosing(art) || !player.isConnected)
return
if (!player.hasAttribute('tabindex')) {
player.setAttribute('tabindex', '-1')
if (!owned.has(player)) {
owned.add(player)
getScope(art).add(() => {
owned.delete(player)
if (player.getAttribute('tabindex') === '-1')
player.removeAttribute('tabindex')
})
}
}
player.focus({ preventScroll: true })
}
@@ -0,0 +1,55 @@
import type ResourceScope from '../lifecycle/scope'
import { listen } from '../lifecycle/resources'
import { claimKey, plainKey } from './keyboard'
interface Range {
min: number
max: number
value: number
step: number
text: (value: number) => string
}
const directions = new Map([['ArrowRight', 1], ['ArrowUp', 1], ['ArrowLeft', -1], ['ArrowDown', -1], ['PageUp', 10], ['PageDown', -10]])
export function keyboardSlider(scope: ResourceScope, element: HTMLElement, label: string, read: () => Range, write: (value: number) => void, orientation = 'horizontal'): () => void {
const valid = (range: Range) => [range.min, range.max, range.value, range.step].every(Number.isFinite) && range.max > range.min && range.step > 0
const clamp = (value: number, range: Range) => Math.min(range.max, Math.max(range.min, value))
const update = () => {
if (scope.closed)
return
const range = read()
const enabled = valid(range)
const value = enabled ? clamp(range.value, range) : 0
element.setAttribute('aria-disabled', String(!enabled))
element.setAttribute('aria-valuemin', String(enabled ? range.min : 0))
element.setAttribute('aria-valuemax', String(enabled ? range.max : 0))
element.setAttribute('aria-valuenow', String(value))
element.setAttribute('aria-valuetext', range.text(value))
}
if (scope.closed)
return update
element.setAttribute('role', 'slider')
element.tabIndex = 0
element.setAttribute('aria-label', label)
element.setAttribute('aria-orientation', orientation)
listen(scope, element, 'keydown', (value) => {
const event = value as KeyboardEvent
if ((event.composedPath()[0] || event.target) !== element || !plainKey(event) || event.defaultPrevented)
return
const direction = directions.get(event.key)
if (direction === undefined && event.key !== 'Home' && event.key !== 'End')
return
claimKey(event)
const range = read()
if (!valid(range)) {
update()
return
}
const next = event.key === 'Home' ? range.min : event.key === 'End' ? range.max : clamp(range.value, range) + direction! * range.step
write(clamp(next, range))
update()
})
update()
return update
}
@@ -0,0 +1,57 @@
import type ResourceScope from '../lifecycle/scope'
export function suspendFocus(scope: ResourceScope, root: HTMLElement): void {
const original = new Map<HTMLElement, string | null>()
const inert = root.hasAttribute('inert')
const hidden = root.getAttribute('aria-hidden')
const restore = (element: HTMLElement, value: string | null) => {
if (element.getAttribute('tabindex') !== '-1')
return
if (value === null)
element.removeAttribute('tabindex')
else
element.setAttribute('tabindex', value)
}
scope.add(() => {
for (const [element, value] of original)
restore(element, value)
original.clear()
if (!inert && root.getAttribute('inert') === '')
root.removeAttribute('inert')
if (root.getAttribute('aria-hidden') === 'true') {
if (hidden === null)
root.removeAttribute('aria-hidden')
else
root.setAttribute('aria-hidden', hidden)
}
})
if (scope.closed)
return
if (!inert)
root.setAttribute('inert', '')
root.setAttribute('aria-hidden', 'true')
const update = () => {
if (scope.closed)
return
for (const [element, value] of original) {
if (!root.contains(element)) {
restore(element, value)
original.delete(element)
}
}
for (const element of root.querySelectorAll<HTMLElement>('[tabindex],button,input,select,textarea,a[href],[contenteditable]')) {
if (!original.has(element)) {
original.set(element, element.getAttribute('tabindex'))
element.setAttribute('tabindex', '-1')
}
}
}
update()
if (typeof MutationObserver !== 'undefined') {
const observer = new MutationObserver(update)
observer.observe(root, { childList: true, subtree: true })
scope.add(() => {
observer.disconnect()
})
}
}
+50
View File
@@ -0,0 +1,50 @@
import type { ComponentHost } from './types'
import { focusPlayer } from '../accessibility/player-focus'
import { isClosing } from '../lifecycle/instance'
interface FocusOwner {
name?: string
art: ComponentHost
cache: Map<string, { $ref: HTMLDivElement }>
}
const pending = new WeakSet<object>()
const focusable = '[tabindex],button,input,select,textarea,a[href],[contenteditable]'
function targetIn(element: HTMLElement): HTMLElement | undefined {
const targets = [element, ...element.querySelectorAll<HTMLElement>(focusable)]
return targets.find((target) => {
if (!target.matches(focusable) || target.tabIndex < 0 || target.matches(':disabled') || target.closest('[inert]') || target.getAttribute('aria-disabled') === 'true' || !target.getClientRects().length)
return false
const style = target.ownerDocument.defaultView?.getComputedStyle(target)
return style?.visibility !== 'hidden' && style?.visibility !== 'collapse'
})
}
export function captureComponentFocus(owner: FocusOwner, element?: HTMLElement, replacement?: string): () => void {
const doc = element?.ownerDocument
const focused = doc?.activeElement
if (!['control', 'contextmenu'].includes(owner.name ?? '') || pending.has(owner) || !element || !doc || !focused || !element.contains(focused))
return () => {}
const player = owner.art.template.$player
const controls = Array.from(player.querySelectorAll<HTMLElement>(`.art-${owner.name}`))
const index = controls.indexOf(element)
const neighbors = [...controls.slice(index + 1), ...controls.slice(0, index).reverse()]
pending.add(owner)
return () => {
pending.delete(owner)
if (isClosing(owner.art) || !player.isConnected || doc.activeElement !== doc.body)
return
const next = replacement ? owner.cache.get(replacement)?.$ref : undefined
for (const candidate of [...(next ? [next] : []), ...neighbors]) {
if (!player.contains(candidate))
continue
const target = targetIn(candidate)
if (target) {
target.focus({ preventScroll: true })
return
}
}
focusPlayer(owner.art)
}
}
Loaded 100 of 190 files, more files were not shown because too many files have changed in this diff. Show more