Commit Graph
407 Commits
Author SHA1 Message Date
Harvey Zhao 0bdc59e446 chore: remove unused assets and sponsor page 2026-02-13 09:54:24 +08:00
Harvey Zhao 07a5b0c0f0 Refactor controls.less for improved readability and structure
- Organized the control layout by grouping related styles together.
- Enhanced the alignment and spacing properties for better consistency.
- Maintained existing functionality while improving code clarity.
2026-01-12 22:10:34 +08:00
Harvey Zhao ae03670f9a Revert "feat(cssVar): add new CSS variables for font size and tooltip positioning"
This reverts commit 59e9a32ecb.
2026-01-03 00:11:00 +08:00
Harvey Zhao 59e9a32ecb feat(cssVar): add new CSS variables for font size and tooltip positioning
Refactor styles for consistency and improved theming

- Updated context menu styles to use new spacing and surface mixins.
- Adjusted control styles to utilize touch hit size for better accessibility.
- Refined info panel padding and applied panel surface mixin for uniformity.
- Standardized mini player transitions and background colors.
- Introduced new mixins for panel surfaces and flyout animations.
- Enhanced notice padding and applied consistent spacing variables.
- Updated plugin styles to use new icon sizes and panel surface mixin.
- Improved progress bar styles with consistent surface and shadow properties.
- Refactored selector styles to utilize new surface mixin and flyout animations.
- Streamlined setting panel styles with consistent spacing and hover effects.
- Added new variables for spacing, surface colors, and icon sizes.
- Updated volume panel styles to use new spacing and flyout animations.

feat(cssVar): add new CSS variables for enhanced theming and layout

Refactor styles in ArtPlayer

- Updated transition properties across various LESS files to use the new `--art-ease-standard` variable for consistency.
- Added new CSS variables for mobile padding and border radius.
- Introduced shadow variables for different elevation levels.
- Minor adjustments to ensure proper formatting and consistency in LESS files, including adding missing newlines at the end of files.

refactor: replace art-text-muted mixin with direct font-size in setting.less

Refactor styles for context menu, info panel, and settings

- Updated font sizes to use the new variable `--art-font-size-sm` for consistency across context menus, info panels, and settings.
- Introduced a new mixin `.art-menu-item-base` to standardize menu item styles, including padding and hover effects.
- Adjusted padding and positioning for tooltip elements in the progress bar.
- Added new CSS variables for tip padding and offset to enhance maintainability and readability of styles.
2025-12-14 12:30:20 +08:00
Harvey Zhao a93967d518 fix(thumbnailsMix): streamline loading logic and variable names
- Renamed 'loading' to 'loding' for consistency.
- Removed unnecessary 'isLoad' variable.
- Simplified loading checks in the showThumbnails function.
2025-12-13 23:09:47 +08:00
Harvey Zhao 8cb9cd480c refactor: simplify thumbnail display logic and improve hover effects
- Removed unnecessary hover event handling for thumbnails.
- Updated thumbnail visibility logic to always show when loading.
- Enhanced CSS for progress tip and thumbnails with scaling and opacity transitions.
- Added hover class to manage thumbnail visibility on progress hover.
2025-12-13 23:05:28 +08:00
Harvey Zhao 911c88d95f feat(progress): enhance progress tooltip and hover effects
- Updated the progress tooltip to display the current time or '00:00' when no time is available.
- Improved hover functionality by adding/removing a class on the player element based on the hover state.
- Refactored mousemove event handling to streamline tooltip visibility and highlight display logic.
- Removed unnecessary display property manipulation for the tooltip in CSS.
2025-12-13 22:39:15 +08:00
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 Zhao 0a9aadf543 feat: add link to LLMs resource in README
Implement code changes to enhance functionality and improve performance

chore: add initial empty files for artplayer.d.ts, llm.txt, and build-llm.js

Refactor Artplayer examples for improved readability and consistency

- Updated mobile.js to enhance code formatting and structure.
- Refined mpegts.js for better readability and consistency in function usage.
- Improved multiple.subtitles.js with clearer structure and modern syntax.
- Enhanced setting.test.js for better organization and clarity in settings management.
- Streamlined thumbnail.js for consistent formatting.
- Updated vast.js for improved readability and consistency in plugin usage.
- Refined vtt.thumbnail.js for better code organization.
- Enhanced webtorrent.js for improved readability and consistency in async handling.
- Updated TypeScript definitions for various plugins to maintain consistency in export statements.
- Adjusted package.json linting script to include TypeScript files in the docs/assets/ts directory.
- Removed outdated types.test.js file to clean up the test suite.

refactor: remove outdated documentation files and update translation script

- Deleted i18n.md and option.md documentation files as they are no longer needed.
- Updated trans-docs.js to streamline the translation process and improve error handling.
- Adjusted plugin template package.json for consistency.
- Changed console.log to console.warn in various test files for better logging practices.

feat: add danmaku plugin documentation and i18n support

- Introduced comprehensive documentation for the Danmaku library, including installation, usage examples, and configuration options.
- Added language settings documentation, highlighting the need for manual language imports starting from version 5.1.0.
- Updated basic options documentation with detailed descriptions and examples for player configuration options.

Refactor documentation for clarity and consistency; update translation script to handle large Markdown chunks

refactor: improve documentation clarity and consistency across various components

- Updated property descriptions in layers.md and setting.md for better readability.
- Enhanced language and structure in index.md, danmuku.md, i18n.md, and option.md to ensure uniformity.
- Corrected minor grammatical errors and improved phrasing throughout the documentation.
- Ensured consistent formatting in tables and code snippets for better user experience.

feat: add build script for generating llm.txt and update translation source directories

Refactor build-llm.js to improve concurrency and enhance prompt clarity

- Introduced a MAX_CONCURRENT_REQUESTS constant to manage concurrent API requests.
- Added a runConcurrent function to handle task execution with a limit on concurrent requests.
- Updated the askDeepSeek function to include more informative logging.
- Enhanced prompts for summarizing documentation, TypeScript definitions, and JavaScript examples to improve clarity and maintain formatting.
- Modified the main function to fetch files concurrently and streamline the summarization process.

Increase text chunk size from 5000 to 8000 in summarizeSection function for improved processing of larger files.

fix: update lint script to include .js files in the scripts directory
2025-10-08 12:20:12 +08:00
Harvey Zack b5b52bbf17 Add hidden mask element to loading styles for improved UI handling 2025-09-13 22:03:02 +08:00
Harvey Zack 12d6781bf5 fix: add null check for target in Control and Setting classes
- Added a null check for the target parameter in the check method of the Control class to prevent potential errors when target is undefined.
- Implemented a similar null check in the check method of the Setting class for consistency and error handling.
- Updated FULLSCREEN_WEB_IN_BODY property in Artplayer to true for enabling fullscreen mode in web environments.
2025-09-11 09:59:29 +08:00
Harvey Zack 714c81e6c3 Enhance context menu version link styling for better visibility 2025-09-07 12:17:12 +08:00
Harvey Zack 8d1ebc4393 feat: add danmuku plugin documentation and i18n setup guide
- Created a new documentation file for the danmuku plugin with code examples.
- Added comprehensive language settings documentation, including default languages, importing languages, adding new languages, and modifying existing languages.
- Updated the i18n setup guide with code snippets for better clarity and usability.
2025-09-06 19:01:53 +08:00
Harvey Zack 5b1cebb334 feat: add danmuku plugin documentation and i18n setup guide
- Created a new documentation file for the danmuku plugin with code examples.
- Added comprehensive i18n setup instructions, including default language settings, language imports, and examples for adding and modifying languages.
- Updated the structure and content of the i18n documentation to enhance clarity and usability.
2025-09-06 13:48:25 +08:00
Harvey Zack fd9aeddbed feat: add danmuku plugin and i18n support in React template
- Implemented a new danmuku plugin in the React template for displaying bullet comments.
- Added internationalization (i18n) support with French and Indonesian languages.
- Updated the App component to include the new Player component with options for video playback.
- Enhanced the Player component to initialize Artplayer with plugins and language settings.
- Created separate files for App and Player components to improve code organization.
- Added example usage of language settings and plugins in the Player component.
2025-09-06 13:17:20 +08:00
Harvey Zack 811d83f463 feat: add danmuku plugin documentation and i18n setup guide
- Created a new documentation file for the danmuku plugin with code examples.
- Added comprehensive i18n (internationalization) setup instructions, including default language settings, language imports, and examples for adding and modifying languages.
- Updated the structure of the i18n documentation for better clarity and usability.
2025-09-06 12:38:24 +08:00
Harvey Zack 14451c7221 Remove deprecated language files and update package version to 5.3.0-beta.1
- Deleted Indonesian (id.mjs), Polish (pl.js, pl.mjs), Russian (ru.js, ru.mjs), Turkish (tr.js, tr.mjs), Vietnamese (vi.js, vi.mjs), and Traditional Chinese (zh-tw.js, zh-tw.mjs) language files from the i18n directory.
- Updated package version in package.json from 5.3.0-beta.0 to 5.3.0-beta.1.
- Cleaned up screenfull.js by removing unnecessary code related to native API checks.
2025-09-05 15:37:31 +08:00
Harvey Zack 9bfd535e57 feat: add option to remove video source on destroy
- Introduced a new static property REMOVE_SRC_WHEN_DESTROY in Artplayer to control whether the video source should be removed when the player is destroyed.
- Updated the destroy method in Artplayer to conditionally remove the video source based on the new property.
- Removed the line that sets the video source to an empty string in the Template class's destroy method, as this is now handled in Artplayer.
- Updated TypeScript definitions to include the new REMOVE_SRC_WHEN_DESTROY property.
2025-09-03 17:58:13 +08:00
Harvey Zack 5cc6724f54 refactor: optimize component lifecycle and build process
- React: Removed unnecessary dependencies from useEffect in Artplayer component.
- Vue: Simplified instance emission in Artplayer component by removing nextTick.
- Build script: Added cpy to copy built i18n files to a new directory and set context to browser for Parcel.
2025-08-17 17:25:16 +08:00
Harvey Zack 6344a0bef9 Implement code changes to enhance functionality and improve performance 2025-08-16 21:49:43 +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 596269bf3f Replace pip.svg icon with a new design featuring a more modern look and updated dimensions 2025-08-16 17:38:36 +08:00
Harvey Zack bd071b2d63 feat: enhance autoOrientation plugin for better fullscreen handling
- Refactored rotation logic for web fullscreen to use a dedicated function.
- Added checks to prevent race conditions when applying rotation.
- Improved handling of native fullscreen orientation locking.
- Simplified class management for orientation states.
- Updated state retrieval to use constants for class names.
2025-08-11 23:31:54 +08:00
Harvey Zack 4fa1730242 Refactor SVG icons to remove fill attributes
- Updated arrow-left.svg, arrow-right.svg, check.svg, and loading.svg to remove fill attributes from path elements for better flexibility in styling.
- Modified aspect-ratio.svg and config.svg to maintain consistency in SVG structure by removing unnecessary fill attributes.
- Ensured playback-rate.svg retains its structure while removing fill attributes for improved styling options.
2025-08-03 19:43:28 +08:00
Harvey Zack e947be8a8e feat: add danmuku plugin documentation and i18n setup instructions
- Created a new documentation file for the danmuku plugin with code examples.
- Added comprehensive language settings documentation, including default languages, importing languages, adding new languages, and modifying existing languages.
- Updated the i18n setup examples to reflect the latest changes in language handling.
2025-08-03 18:21:59 +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 05ce97c6fd Refactor event path handling to use getComposedPath utility
- Replaced direct usage of event.composedPath() with a new utility function getComposedPath in Control component.
- Updated includeFromEvent function to utilize getComposedPath for better compatibility.
- Implemented getComposedPath function to ensure consistent event path retrieval across different browsers.
2025-08-03 11:43:01 +08:00
Harvey Zack 012c73c202 refactor: simplify version function export in context menu 2025-06-20 11:08:57 +08:00
Harvey Zack e8a7e050c4 refactor: update version handling and remove placeholder injection
- Simplified version display in context menu and template by directly importing version from package.json.
- Removed static version and environment methods from Artplayer class, replacing them with dynamic imports.
- Eliminated placeholder injection logic from build and dev scripts, streamlining the build process.
- Cleaned up build and dev scripts for better readability and maintainability.
2025-06-20 11:04:29 +08:00
Harvey Zack e2e8e83e63 Refactor code structure for improved readability and maintainability 2025-06-20 10:26:07 +08:00
Harvey Zack 7e7bd8c0ad Refactor version display in context menu and clean up versioning format
- Updated the context menu version function to dynamically append the application version to the link and include a ref parameter in the URL.
- Removed the build version log from the initialization logs in the Artplayer class.
- Cleaned up the version and environment getters to return unquoted strings.
2025-06-20 10:18:39 +08:00
Harvey Zack da94223721 bump version to 5.2.4 2025-06-20 10:00:27 +08:00
Harvey Zack 6c4e9f7e78 fix: enhance user agent detection to support custom user agent 2025-05-17 22:16:08 +08:00
Harvey Zack 2a7e3d5e03 add index.esm.html 2025-04-20 19:35:10 +08:00
Harvey Zack 674c6420e9 Refactor progress event handling in progress.js
- Moved the 'video:progress' event listener to be consistent with the RAF and timeupdate events.
- Ensured 'setBar' for 'loaded' is emitted during both RAF and video:progress events.
- Cleaned up the structure for better readability and maintainability.
2025-04-20 11:21:21 +08:00
Harvey Zack 17ece4c0c8 Add Vietnamese localization for Artplayer 2025-04-20 09:55:38 +08:00
Harvey Zack 36865f1e7e feat: 新增手势配置项,支持移动端手势事件 2025-03-22 11:55:09 +08:00
Harvey Zack c89b9e7871 chore: 更新版本至 5.1.5,修复多个问题并增强移动端支持 2025-01-19 17:34:40 +08:00
Harvey Zack e7c31e55b3 feat: 添加对移动设备的支持并优化滑块事件处理 2025-01-18 16:44:04 +08:00
Harvey Zack 3a052a60e3 chore: 删除不再使用的 TypeScript 声明文件,并添加新的插件声明文件 2024-11-30 10:35:41 +08:00
Harvey Zack dcd6e081d8 Refactor Control class to update control option variables and element references 2024-10-21 16:16:29 +08:00
Harvey Zack cc13b9cc0f Refactor Control class to update control option variables and element references 2024-10-21 14:18:33 +08:00
Harvey Zack 2eb4be2bbe Refactor Control class to update control option variables and element references 2024-10-21 14:13:02 +08:00
Harvey Zack 5dcb3e11c1 Refactor Artplayer class to use arrow functions for getter methods 2024-10-21 11:52:45 +08:00
Harvey Zack 395747f88f Refactor Artplayer class to update video URLs with query parameters 2024-10-21 11:49:14 +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 c82e381aa1 Refactor Artplayer class to remove unnecessary CSS transformations in setting.less 2024-10-21 10:27:26 +08:00
Harvey Zack ed88c73ab2 Refactor Artplayer class to update import path for Component 2024-10-21 00:18:28 +08:00
Harvey Zack 2db49bdede Refactor Artplayer class to update import path for Component 2024-10-20 23:58:07 +08:00
Harvey Zack 477331b0e2 Refactor Artplayer class to remove unnecessary CSS transformations in setting.less 2024-10-20 22:35:14 +08:00