Commit Graph
63 Commits
Author SHA1 Message Date
Harvey Zhao 4681a8bc7a feat: enhance Artplayer type definitions and improve component interfaces
- Updated Artplayer class to specify environment as 'development' | 'production'.
- Refined template query method to return specific element types.
- Improved event proxy method to handle multiple event names.
- Enhanced storage get method to support both key retrieval and full record retrieval.
- Modified i18n interface to include language initialization and partial language records.
- Adjusted notice interface to provide a getter for show state and a setter for messages.
- Updated layers, controls, and contextmenu to allow undefined elements.
- Enhanced subtitle interface with initialization method.
- Refined hotkey methods to use KeyboardEvent instead of Event.
- Updated setting methods to return updated settings instead of arrays.
- Improved plugin method to return a promise.
- Added new events for video handling and refined existing event parameters.
- Enhanced option interface for proxy and plugins to support promises.
- Updated player interface to include reset method.
- Refined setting props to allow optional values.
- Enhanced template interface with additional control elements.
- Improved utils methods for querying and manipulating DOM elements.

fix: update type definitions for notice and subtitle properties, and refine event types

fix: remove unnecessary console warnings in event listener error handling

fix: refactor event listener management to use Set for better performance and error handling
2025-11-29 21:41:52 +08:00
Harvey Zack 35ad9883af build all
Refactor utility functions for improved readability and consistency

- Updated compatibility.js to use consistent line endings and formatting.
- Refactored component.js for better readability and structure, including consistent use of arrow functions and binding.
- Simplified dom.js functions with consistent formatting and improved readability.
- Enhanced emitter.js with consistent formatting and arrow function usage.
- Streamlined error.js for improved readability and consistency.
- Refactored file.js to use consistent formatting and improved readability.
- Improved format.js functions for better readability and consistency.
- Updated index.js to maintain consistent export formatting.
- Refactored property.js for improved readability and consistency.
- Enhanced subtitle.js with consistent formatting and improved readability.
- Refactored time.js for better readability and consistent formatting.

fix: update lint script to target only source files for consistency

Revert "fix: restore export statements for various plugins and update type definitions for better clarity"

This reverts commit b5e969d81ec765cd8a34b06e6ef4f232ef25087f.

fix: restore export statements for various plugins and update type definitions for better clarity

Refactor type definitions to use interfaces instead of type aliases for better extensibility and clarity across i18n, icons, option, player, quality, setting, subtitle, template, and utils modules.
2025-08-03 13:17:33 +08:00
Harvey Zack 945ff841d5 Refactor Artplayer class to update qualityMix.js and component.js 2024-10-21 11:18:22 +08:00
Harvey Zack fbfee926ca Refactor Setting class to update range values and append items 2024-10-20 14:46:40 +08:00
Harvey Zack b949fedc06 Refactor Setting class to fix state loss issue, update range callback return type, and remove isStringOrNumber utility function 2024-10-20 13:56:22 +08:00
Harvey Zack 95ba1810b6 use || 2023-09-01 21:14:10 +08:00
Harvey Zack 894a9db1d7 add Artplayer.LOG_VERSION 2023-08-22 20:51:39 +08:00
O2bmm 16994e446e function-update-optimize (#549) 2023-06-02 15:18:03 +08:00
Harvey Zack 3b57470957 update docs 2023-04-23 00:21:38 +08:00
Harvey Zack 90915652aa update Component 2023-04-19 02:47:37 +08:00
Harvey Zack 3c8cb0e2e2 update component 2023-04-19 02:36:13 +08:00
Harvey Zack 70f551b878 update component 2023-04-18 23:04:52 +08:00
Harvey Zack d1156a40b1 update Component 2023-04-18 23:02:51 +08:00
Harvey Zack 13f3398765 add beforeUnmount 2023-04-18 22:58:16 +08:00
Harvey Zack 645e2e2ec3 update component.d.ts 2023-04-18 22:52:33 +08:00
Harvey Zack cd28cc795f update toggle 2023-04-18 22:39:47 +08:00
Harvey Zack 776a02a221 update component 2023-04-18 22:24:06 +08:00
Harvey Zack 6d81287de9 update isStringOrNumber 2023-04-18 18:25:51 +08:00
Harvey Zack 7b53de941d V5 (#500)
* update dep

* Update package.json

* update contextmenu

* update d.ts

* update onVttLoad

* build artplayer

* update style

* --art-theme

* update style

* update style

* update user-select

* add getIcon

* update style

* update style

* update style

* update style

* update style

* update style

* update style

* update style

* update style

* update style

* update style

* update style

* update style

* update style

* update style

* add progress-hover

* update mini

* update style

* update style

* update style

* update style

* update style

* update volume

* update style

* add art-backdrop

* update style

* update style

* update style

* update currentLevel

* update artplayerPluginControl

* update artplayerPluginDanmuku

* Update package.json
2023-04-16 23:01:26 +08:00
Harvey Zack fa7954de0d Artplayer vitepress (#446)
* init

* init

* update

* update

* update

* update

* update

* update

* add i18n option

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update
2023-01-11 20:45:01 +08:00
Harvey Zack 6b791be35a Aliyundrive (#436)
* init

* init

* add example

* add initControl

* add initControl

* update style

* update style

* update style

* update style

* update style

* update style

* update style

* update style

* build all

* build all

* update style
2022-12-31 21:16:54 +08:00
Harvey Zack ecc54b7428 update style 2022-11-06 14:04:13 +08:00
Harvey Zack 1593a4a528 add prettier 2022-11-04 20:55:17 +08:00
Harvey 8c9db3f302 add createElement 2022-08-18 09:40:33 +08:00
Harvey f4ade95551 onSelect can return a promise 2022-04-27 15:44:06 +08:00
zhw2590582 1de2d2aaed update setting 2022-02-11 20:23:27 +08:00
Harvey 17f79d0b22 update 2022-02-11 11:20:54 +08:00
Harvey d919471838 Add more valid 2021-12-10 11:05:44 +08:00
Harvey 69563e818b update ts 2021-12-01 14:16:43 +08:00
zhw2590582 cf7cfd85ce update eslint rule 2021-11-28 19:32:40 +08:00
zhw2590582 1d45a7b4ca update 2021-11-28 13:00:26 +08:00
zhw2590582 af97602cfa update 2021-11-28 13:00:07 +08:00
zhw2590582 28d9ad2eaa update 2021-11-28 12:33:03 +08:00
zhw2590582 d72d816ef7 update 2021-11-28 11:10:24 +08:00
Harvey 7edd221801 bugfix 2020-09-04 09:04:20 +08:00
Harvey 11cf4f4455 bugfix 2020-09-04 08:56:09 +08:00
Harvey aee225bc7f 完成selector 2020-08-26 10:43:06 +08:00
Harvey 53d2f12ab6 调整选择器参数 2020-08-25 14:51:12 +08:00
Harvey c621687988 完成selector 2020-08-25 14:24:34 +08:00
Harvey 4d77887c03 调整switcher结构 2020-08-25 12:03:45 +08:00
Harvey 20afbab916 修改switcher逻辑 2020-08-25 10:38:29 +08:00
Harvey 4718cd186b 简化事件 2020-05-22 13:23:28 +08:00
Harvey 02915fcee5 重命名事件 2020-05-20 11:13:02 +08:00
Harvey cbc38dd78a 组件选项写进父实例属性 2019-12-09 18:43:07 +08:00
Harvey 415a04a4a7 build all packages 2019-12-09 17:34:55 +08:00
Harvey 7ff61b4660 删除多余事件 2019-11-28 10:10:29 +08:00
Harvey 5f40463713 压缩字符 2019-11-27 15:46:55 +08:00
zhw2590582 1270167a3e 简化工具函数 2019-11-22 20:50:14 +08:00
Harvey 2fcd44e8e7 组件添加add方法 2019-11-22 16:34:31 +08:00
Harvey de20a350e6 添加事件文档 2019-11-20 15:30:11 +08:00