Commit Graph
3223 Commits
Author SHA1 Message Date
Harvey Zack 6344a0bef9 Implement code changes to enhance functionality and improve performance 2025-08-16 21:49:43 +08:00
Harvey Zhao ada6afca69 Update README.md 2025-08-16 21:34:31 +08:00
Harvey Zack 52b38a48b2 Implement code changes to enhance functionality and improve performance 2025-08-16 21:28:49 +08:00
Harvey Zack 34fe45fa2d feat: update build:all script to include documentation build 2025-08-16 21:18:52 +08:00
Harvey Zack fa0961a9f9 refactor: update event handling in plugins and core
- Changed event handling from `art.proxy` to `art.on` for visibility change and pointer events in the ads and danmuku plugins to improve consistency and maintainability.
- Bumped version of the danmuku plugin from 5.1.8 to 5.1.9.
- Added pointer events to the global event initialization in the core to ensure proper event handling across the application.
2025-08-16 21:17:29 +08:00
Harvey Zack e834246641 feat: enforce browser environment for Artplayer initialization
- Added a check in the Artplayer constructor to throw an error if instantiated outside a browser environment.
- Updated the isBrowser utility to ensure both window and document are defined.
- Removed unused user agent checks for WeChat, IE, and Android from compatibility utilities.
- Updated TypeScript definitions to reflect the removal of unused properties.
- Added a basic test case for Artplayer initialization in SSR context.
2025-08-16 21:11:30 +08:00
Harvey Zack 3a2dcdb226 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 structure of the i18n documentation to improve clarity and usability.
2025-08-16 20:51:26 +08:00
Harvey Zack 3cfc1c031c Remove outdated language files for Czech, Spanish, Persian, French, Indonesian, Polish, Russian, Turkish, Vietnamese, and Traditional Chinese from the Artplayer i18n package. 2025-08-16 20:48:55 +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 abd64e11f2 refactor: update references from $container to $player in Document Picture-in-Picture plugin 2025-08-16 18:05:32 +08:00
Harvey Zack 84c118855d fix: 更新 Document Picture-in-Picture 占位符样式类名以提高可读性 2025-08-16 17:56:50 +08:00
Harvey Zack 1f142ced9f feat: 添加 Document Picture-in-Picture 插件样式支持 2025-08-16 17:52:48 +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 657dd7e77c refactor: improve document Picture-in-Picture support checks and update type definitions
- Renamed variable `dpipOK` to `isSupported` for clarity in checking Document Picture-in-Picture support.
- Updated the `open` function to use the new `isSupported` variable.
- Removed redundant checks in the `close` function related to Document Picture-in-Picture support.
- Added `isSupported` and `isActive` properties to the plugin's result interface in TypeScript definitions.
- Cleaned up the code for better readability and maintainability.
2025-08-16 17:00:01 +08:00
Harvey Zack a7d77f4f70 chore: remove Document Picture-in-Picture plugin files from the repository 2025-08-16 16:45:09 +08:00
Harvey Zack 571a4c8e1d fix: update description in README and package.json for clarity 2025-08-16 16:43:05 +08:00
Harvey Zack 7d4175efbc feat: add Document Picture-in-Picture plugin for ArtPlayer
- Implemented the core functionality of the Document Picture-in-Picture plugin.
- Created main plugin file `artplayer-plugin-document-pip.js` with support for opening and closing the PIP window.
- Added legacy support in `artplayer-plugin-document-pip.legacy.js`.
- Defined plugin options in `package.json` and included necessary metadata.
- Developed the main logic in `src/index.js`, including style copying and event handling.
- Created TypeScript definitions in `types/artplayer-plugin-document-pip.d.ts` for better type safety.
2025-08-16 16:39:58 +08:00
Harvey Zack c23520a4a6 feat: add Picture-in-Picture plugin for ArtPlayer
- Introduced `artplayer-plugin-pip` to enable Picture-in-Picture functionality.
- Updated `artplayer.d.ts` to export new types related to the plugin.
- Added example usage of the plugin in `pip.js`.
- Created TypeScript definitions for the plugin in `artplayer-plugin-pip.d.ts`.
- Implemented the plugin logic in `index.js` with necessary styles and event handling.
- Updated documentation to include the new plugin and its usage.
- Added README and package.json for the new plugin.
2025-08-16 15:55:21 +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 f1fcbd75fe chore: Update change log, add removal of svg default fill color value and direct import optimization of Option 5.2.5 2025-08-03 19:48:34 +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
卡色 8460959a7f fix: cssVar can't be overwrite icon color (#945) 2025-08-03 19:35:20 +08:00
Harvey Zack d9c84d2dbc refactor: update type exports and improve type usage in tests 2025-08-03 18:57:40 +08:00
Harvey Zack 8a87de6df3 refactor: update export syntax to default for ASR and VAST plugins 2025-08-03 18:49:06 +08:00
Harvey Zack 6f3363014f refactor: update export syntax to default for ASR and VAST plugins 2025-08-03 18:47:09 +08:00
Harvey Zack fa755b5f61 refactor: update import statements to use node built-in modules
chore: update lerna configuration formatting

chore: bump version in package.json to 6.0.0

fix: modify build scripts for improved readability and consistency

feat: enhance translation scripts with better error handling and progress tracking

chore: improve plugin creation script for better user experience

style: format svgo configuration for consistency
2025-08-03 18:34:30 +08:00
Harvey Zack 3540cd0cce style:统一代码风格,移除多余分号 2025-08-03 18:23:42 +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 9d966bf696 refactor: update export syntax to default for multiple plugins and adjust package.json formatting 2025-08-03 17:19:12 +08:00
Harvey Zack f3c0a9a77d feat(danmuku): add unique identifier for danmuku items
- Introduced a new dataset attribute `data-id` to DOM elements for unique identification of danmuku items.
- Updated validation to include an optional `id` field for danmuku objects.
- Changed the property `$id` to `$index` for better clarity on its purpose as an index rather than a unique identifier.
- Ensured the `data-id` attribute is set for visibility control during hover interactions.
2025-08-03 14:32:26 +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 532dd67cfd Merge branch 'master' of https://github.com/zhw2590582/ArtPlayer 2025-08-03 12:06:26 +08:00
Harvey Zack 46ad399b2f fix: add missing newline at end of multiple package.json files and README.md 2025-08-03 11:54:36 +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 Zhao 603151af84 Update README.md 2025-08-02 17:21:18 +08:00
Harvey Zack 412b8e7fa7 Update CHANGELOG_CN.md 2025-08-01 15:37:24 +08:00
Harvey Zack 8d912c6c99 chore: bump version to 5.2.5 and remove unused exports from package.json 2025-08-01 15:32:32 +08:00
Harvey Zack ea392e0d60 feat: update version to 5.1.7 and add custom userAgent documentation 2025-08-01 09:57:50 +08:00
Harvey Zack 5337f9b075 feat: add danmuku plugin documentation and i18n setup guide
- Created a new documentation file for the danmuku plugin, detailing its usage and providing code examples.
- Added a comprehensive guide for language settings (i18n), including instructions for importing languages, setting default languages, and modifying language options.
- Included code snippets for initializing the Artplayer with different languages and examples for adding new languages.
2025-08-01 09:34:07 +08:00
Harvey Zack c1fe0e2b03 Delete sitemap.xml 2025-07-06 15:02:25 +08:00
Harvey Zack 11b59da2cf Create sitemap.xml 2025-07-06 14:57:56 +08:00
Harvey Zack 9932551352 Create googlebcdef0d1e9238554.html 2025-07-06 14:45:47 +08:00
Harvey Zack 84bc5a85bc Refactor code structure for improved readability and maintainability 2025-07-05 16:04:21 +08:00
dependabot[bot] 6d640062c9 chore(deps): bump svgo from 3.3.2 to 4.0.0 (#984)
Bumps [svgo](https://github.com/svg/svgo) from 3.3.2 to 4.0.0.
- [Release notes](https://github.com/svg/svgo/releases)
- [Commits](https://github.com/svg/svgo/compare/v3.3.2...v4.0.0)

---
updated-dependencies:
- dependency-name: svgo
  dependency-version: 4.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-24 09:06:22 +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 Zhao 1374d530a4 fix mini position restore and typo (#981) 2025-06-20 10:19:28 +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