Commit Graph
33 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 8af6f7c322 feat: Refactor global event handling in ArtPlayer
- Introduced a new globalInit function to manage document and window events.
- Replaced direct event proxies with a unified bindGlobalEvents method.
- Updated event handling in various modules to utilize the new global event system.
- Removed the deprecated documentInit module.
- Bumped version to 5.2.6 in package.json.
2025-08-16 20:45:19 +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 36b2c80666 add restoreInit 2024-09-14 16:48:30 +08:00
Harvey Zack 5764344aaf refactor: Update thumbnail scale in Artplayer 2024-08-23 12:05:06 +08:00
Harvey Zack 9ba838aa52 add Artplayer.USE_RAF 2023-08-26 00:03:26 +08:00
Harvey Zack 5959eb4669 build:all 2023-05-03 10:14:46 +08:00
Harvey Zack 90915652aa update Component 2023-04-19 02:47:37 +08:00
Harvey Zack 7d6b7f2070 update setting 2023-04-18 00:51:06 +08:00
Harvey Zack 3ab2e96144 rename moveInit 2023-04-18 00:03:59 +08:00
Harvey Zack c4252b21b5 add documentInit 2023-04-17 22:04:57 +08:00
Harvey f160d8eb61 remove art.once('video:loadedmetadata') 2022-05-18 11:29:05 +08:00
zhw2590582 c0321f660c 4.3.2 2022-03-16 22:49:04 +08:00
zhw2590582 455e2189a7 forEach => for 2022-01-07 22:11:48 +08:00
Harvey a6917400c3 4.0.5 2021-12-10 08:36:46 +08:00
Harvey b056a3a8d6 Fix loadImg bug 2021-12-07 15:18:40 +08:00
Harvey 47128ecf9d add proxy() to instance 2021-12-03 11:02:35 +08:00
Harvey 161d6e3e8b Update index.js 2020-11-26 09:07:55 +08:00
Harvey b202c21a7f add autoMin 2020-05-19 11:47:45 +08:00
Harvey bb50f5ab39 添加移动端用户手势 2020-05-15 13:06:10 +08:00
Harvey 4cbefa172d 优化ready事件 2020-05-15 12:01:43 +08:00
Harvey 5f40463713 压缩字符 2019-11-27 15:46:55 +08:00
Harvey Zack dd8397f14e 优化DEMO 2019-07-09 09:45:02 +08:00
zhw2590582 0af2403bb8 build all packages 2019-05-25 12:50:02 +08:00
zhw2590582 89fecf5488 build all packages 2019-05-13 06:07:33 +08:00
Harvey Zack 487e865017 优化整体结构 2019-04-30 13:06:24 +08:00
赵海伟 b8153a5a29 update 2019-04-06 09:15:29 +08:00
赵海伟 38e989bc05 update 2019-04-06 09:05:47 +08:00
Harvey Zack 450e4ac879 移除大部分异步操作 2018-11-28 13:15:45 +08:00
Harvey Zack 203ad0d3a0 格式化 2018-11-21 19:45:44 +08:00
Harvey Zack 16586d8d7e 变更事件名称 2018-11-21 14:13:37 +08:00
Harvey Zack 7f1e1dc255 cleanup 2018-11-12 10:00:55 +08:00
Harvey Zack 1d40d1c46b 分离事件中心 2018-11-09 12:17:19 +08:00