Commit Graph
100 Commits
Author SHA1 Message Date
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 736a6c1973 feat: refactor Artplayer component and add Player component with TypeScript support 2025-09-06 12:31:10 +08:00
Harvey Zack 6be0ea9542 fix: add TypeScript support to Artplayer.vue and update i18n type declarations 2025-09-06 12:12:08 +08:00
Harvey Zack 474383853b Remove unnecessary i18n module declarations and simplify type definitions 2025-09-06 11:41:07 +08:00
Harvey Zack 649963f07c Update artplayer.d.ts 2025-09-05 22:20:44 +08:00
Harvey Zack 013fa21e7c Add internationalization support for multiple languages including Indonesian, Polish, Russian, Turkish, Vietnamese, and Traditional Chinese in Artplayer 2025-09-05 16:14:34 +08:00
Harvey Zack ea903dcf4c Update artplayer.d.ts 2025-09-05 15:57:38 +08:00
Harvey Zack cc7e7576ab feat: add Artplayer version logging to esm.test.js 2025-09-05 15:40:38 +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 2a69147c8b Add Polish, Russian, Turkish, Vietnamese, and Traditional Chinese translations for Artplayer UI 2025-09-03 18:39:44 +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 cb3d391c34 feat: update version number in config and remove outdated links 2025-08-31 12:20:53 +08:00
Harvey Zack 06c00906c2 feat: add danmuku plugin documentation and i18n setup guide
- Created a new documentation file for the danmuku plugin with code examples.
- Added a comprehensive guide for language settings, including default languages, importing languages, adding new languages, and modifying existing languages.
- Updated the i18n documentation to reflect changes in language handling and provide code snippets for implementation.
2025-08-31 12:11:13 +08:00
Harvey Zack ddbcdbd459 feat: update script tag to setup and use shallowRef for Artplayer instance 2025-08-25 10:40:01 +08:00
Harvey Zack 745d2b4848 Refactor code structure for improved readability and maintainability 2025-08-24 12:21:06 +08:00
Harvey Zack cf5057fa89 feat: allow custom properties in Setting and Selector interfaces 2025-08-23 12:12:46 +08:00
Harvey Zack fb8975272c feat: add support for custom properties in Selector interface 2025-08-22 10:00:28 +08:00
Harvey Zack 68b40de93c feat: update version to 1.0.2 and enhance ad event handling in VAST plugin 2025-08-19 09:19:31 +08:00
Harvey Zack eccea444b0 refactor: remove redundant comments and improve code clarity in build scripts 2025-08-17 23:53:26 +08:00
Harvey Zack e8b01c357f 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 of the i18n documentation for clarity and usability.
2025-08-17 23:51:45 +08:00
Harvey Zack 40b66b4b68 feat: enhance document Picture-in-Picture functionality with sleep delay
- Added sleep utility to introduce a delay before emitting resize events after opening and closing the document Picture-in-Picture.
- Updated the close function to be asynchronous for better handling of the sleep delay.
2025-08-17 21:22:29 +08:00
Harvey Zack 9e73b0aec9 Add resize event emission on document Picture-in-Picture open and close
- Emit 'resize' event after adding the document Picture-in-Picture class to the player.
- Emit 'resize' event after removing the document Picture-in-Picture class from the player.
2025-08-17 21:15:20 +08:00
Harvey Zack 79358663eb fix: improve indentation and formatting for style element creation in plugin 2025-08-17 18:43:57 +08:00
Harvey Zack 043947c9af feat: update .npmignore files to include src and package-lock.json; remove .npmrc files 2025-08-17 18:42:02 +08:00
Harvey Zack 1b856ae681 feat: add danmuku plugin documentation and i18n setup guide
- Created a new documentation file for the danmuku plugin with interactive code examples.
- Added comprehensive language settings documentation, including default languages, import instructions, and examples for adding and modifying languages.
- Updated the i18n documentation to reflect changes in language handling and provide clearer examples for users.
2025-08-17 18:33:36 +08:00
Harvey Zack 48b78d0ad7 Delete test.js 2025-08-17 18:31:34 +08:00
Harvey Zack e7633ed49d fix: update window export syntax for plugin; ensure compatibility with global scope
feat: add example usage for artplayer-plugin-test in test.js
2025-08-17 18:30:23 +08:00
Harvey Zack abbecff472 refactor: update TypeScript definitions for Artplayer plugin; change export syntax and improve interface structure 2025-08-17 18:28:43 +08:00
Harvey Zack 50320bad5d feat: add module and exports fields in package.json; improve style handling in index.js 2025-08-17 18:25:52 +08:00
Harvey Zack 241b4f3ee3 chore: update .npmignore files to include yarn.lock and package-lock.json 2025-08-17 18:13:14 +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 0eed9c114b feat: update project structure and add React template with Artplayer integration 2025-08-17 14:55:06 +08:00
Harvey Zack 4b55b97e9e update vue template 2025-08-17 14:32:17 +08:00
Harvey Zack 0c0bcecb9e Add internationalization support and build process for multiple languages
- Implemented a build script to compile i18n files and copy them to the docs directory.
- Added compiled i18n files for Arabic, Czech, Spanish, Persian, French, Indonesian, Polish, Russian, Turkish, Vietnamese, and Traditional Chinese.
- Created an HTML file to demonstrate the usage of Artplayer with i18n support, including language options and a sample video.
2025-08-17 13:18:08 +08:00
Harvey Zack 09aab497ac Update esm.html 2025-08-17 12:35:05 +08:00
Harvey Zack 41040e5ac1 feat: add danmuku plugin documentation and i18n setup guide
- Created a new documentation file for the danmuku plugin with code examples for usage.
- Added comprehensive language settings documentation, including default languages, importing languages, adding new languages, and modifying existing languages.
- Updated the i18n setup guide to reflect changes in language handling and provide code snippets for implementation.
2025-08-17 12:22:55 +08:00
Harvey Zack c911928166 feat: add danmuku plugin documentation and i18n setup
- Created a new documentation file for the danmuku plugin with interactive code execution.
- Added comprehensive i18n setup instructions, including default language settings, language imports, and examples for adding and modifying languages.
- Introduced a test file to verify the integration of the danmuku plugin.
2025-08-17 12:09:50 +08:00
Harvey Zack 012dde8da4 feat: 更新类型定义,简化导入路径 2025-08-17 10:55:33 +08:00
Harvey Zack 8b32f050a0 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 to reflect changes in language handling and provide code snippets for implementation.
2025-08-17 10:46:04 +08:00
Harvey Zack ea34eda07b 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, import methods, and how to add or modify languages.
- Updated the i18n setup guide to reflect changes in language handling and provide code snippets for implementation.
2025-08-17 10:30:12 +08:00
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 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
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
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
Harvey Zack 3715a36cde fix: correct spelling of "height" in icon HTML attributes across documentation 2025-06-20 09:56:18 +08:00
Harvey Zhao 68d00e0166 docs(en): fix typos and improve wording (#980) 2025-06-20 09:53:34 +08:00
Harvey Zack c81b1ec83b Update CHANGELOG_CN.md 2025-06-15 18:35:02 +08:00
Harvey Zack bf5a186375 fix: update config method to allow initialization flag
- Modified the config method to accept an initialization flag, allowing for configuration during the initial setup without triggering unnecessary updates.
- Updated the call to config in the constructor to pass the new initialization flag.
2025-06-15 18:15:48 +08:00
Harvey Zhao 20b62ad3e3 refactor(types): improve definitions (#971) 2025-06-13 20:38:14 +08:00
Harvey Zhao 1941da46d9 fix: correct typos in player modules (#970) 2025-06-13 20:31:54 +08:00
Harvey Zhao 078b595819 fix: correct typos in player modules (#969) 2025-06-13 20:31:27 +08:00
Harvey Zhao 169c6a318a docs: fix autoPlayback typo (#967) 2025-06-12 21:24:58 +08:00
Harvey Zhao 77eaba8de9 fix: correct siblings helper name (#966) 2025-06-12 21:17:56 +08:00
Harvey Zhao db58d759b5 Update README.md 2025-06-08 15:17:51 +08:00
Harvey Zack 1ae4d17372 Remove artplayer-proxy-webav package and its related files including package.json, index.js, and type definitions. 2025-05-31 17:08:31 +08:00