2201 Commits
Author SHA1 Message Date
Harvey Zhao bb82f899ff Merge pull request #1061 from Mister-Hope/feat/dashjs-v5
feat(artplayer-plugin-dash-control)!: support dash.js v5
2026-09-10 17:19:00 +08:00
Harvey Zhao 59d3c9f50c fix(dash-control): select stable representation IDs 2026-09-10 17:17:54 +08:00
Harvey Zhao 37cbb6f600 Merge pull request #1058 from acaliskol/fix/unhandled-play-rejection
fix: silence unhandled play() rejections from internal callers
2026-09-10 17:06:52 +08:00
Harvey Zhao 72cf3551e2 fix: align promise helper types and test playback rejections 2026-09-10 17:03:07 +08:00
Mr.Hope cb69e4ad66 feat(artplayer-plugin-dash-control)!: support dash.js v5
- replace removed v4 APIs with their v5 equivalents:
  getRepresentationsByType / getCurrentRepresentationForType /
  setRepresentationForTypeByIndex
- bump dash.js CDN references from 4.5.2 to 5.2.1 (modern/umd build)
- rebuild dist, docs/compiled and docs/uncompiled artifacts
- regenerate vitepress docs
2026-09-10 15:58:17 +08:00
Harvey Zhao 42c4ca735d Update version.js 2026-08-31 16:59:25 +08:00
Anıl Çalışkol 0f47e11d63 fix: silence unhandled play() rejections from internal callers
`art.play()` is an async wrapper around the native `video.play()` promise, which
rejects when a pending play request is interrupted (`pause()`, `load()`, a new
`src`, or the element being removed) and when autoplay is blocked.

Every internal caller fires it from an event handler and cannot await it, so the
rejection escapes as a global `unhandledrejection`. Error trackers report it as
an uncaught crash even though the player recovers on its own — for example
destroying the player right after mount, which is routine when the video sits in
a modal the user can close quickly.

Add a `silencePromise` util (the same approach video.js uses) and apply it to the
non-awaited internal call sites: mask, play control, mini player, loop restart,
autoPlayback jump, hotkey and click toggles.

`switchMix` is fixed too, for a second symptom: `await art.play()` inside the
async `video:canplay` handler both leaked the rejection and left the `switchUrl`
promise pending forever, since the throw never reached the enclosing executor's
`reject`. It now settles.

The public API is unchanged: `art.play()` and `art.toggle()` still return the
original promise, so applications that call them keep their own rejection to
handle. Only the internal, non-awaited copy is silenced.
2026-08-30 16:31:40 +03:00
wuhua111 0b9c31a8cf fix(types): correct notice.show getter return type (#1055)
The notice.show getter was declared as boolean while the setter accepts string, Error or false. TypeScript uses the getter return type when checking property assignment, causing TS2322 when assigning a string to notice.show.
2026-08-28 17:52:07 +08:00
Harvey Zhao 014b21566c feat: expose Artplayer globally in the browser environment
- Added assignment of Artplayer to the window object in both dist and src files to allow global access.
2026-07-13 12:34:21 +08:00
Meta42 4c7d0aa9fa fix: audio pump starvation on large files with audio (#1041)
Root causes fixed:
1. Remove starvation check that suspends AudioContext — it freezes the
   video clock and causes playback to stall permanently
2. Add backpressure (1s BUFFER_AHEAD) to prevent audio pump from decoding
   unbounded buffers, starving the video decoder
3. Add setTimeout(0) yield between batches so video rAF callbacks can run
4. Batch audio buffer reads (16 per iteration) to reduce IPC overhead
5. Fix latestScheduledEndTime time-domain: use media-time (same domain as
   currentTime) instead of AudioContext-time, so backpressure check works
   correctly after seeking

Without these fixes, playing a large file (9+ GB) with audio causes:
- Audio pump decodes hundreds of buffers in 1 second (195s of audio decoded
  in 1s wall clock)
- Main thread blocked by 177 IPC calls/sec from audio iterator
- Video frames never render (rAF starved)
- After seek: backpressure never triggers due to time-domain mismatch,
  causing persistent stutter and eventual silence
2026-06-07 09:18:04 +08:00
Harvey Zhao 26841c5b1c feat: enable fullscreenWeb option in Artplayer configuration
feat: add danmuku plugin and i18n setup documentation

- Introduced a new danmuku plugin with multiple run code options in the documentation.
- Added language settings documentation for i18n, including default languages, import instructions, and examples for adding and modifying languages.
- Implemented input handling for media sources in the artplayer-proxy-mediabunny package, supporting various formats including HLS.
- Created m3u8 control functionalities for managing audio and video quality settings in the player.

Update mediabunny.js
2026-05-04 13:22:32 +08:00
Harvey Zhao 23c8f46878 feat: add bun installation command to documentation 2026-04-04 10:35:07 +08:00
Harvey Zhao 7e0b84ba7c fix: adjust percentage calculation for current time in setCurrentTime function 2026-04-01 12:49:43 +08:00
Harvey Zhao 6aa6f9ad53 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 (i18n) including default languages, importing languages, adding new languages, and modifying existing languages.
- Included code snippets for initializing the Artplayer with different language settings.

feat: implement safe area insets for improved video rotation handling

feat: add console log for safe area insets in autoOrientation plugin

feat: enhance mobile meta tags for better web app support
2026-04-01 12:24:38 +08:00
Harvey Zhao 6c79148da5 feat: add jassub worker scripts and WASM files for subtitle processing 2026-03-16 21:25:51 +08:00
Harvey Zhao 65e51751cd feat: add danmuku plugin and i18n setup documentation
- Created a new documentation file for the danmuku plugin with code examples.
- Added a new documentation file for language settings (i18n) with detailed instructions on language imports, default languages, and how to add or modify languages.
- Included code snippets for initializing the Artplayer with different language settings.
2026-03-12 22:23:44 +08:00
Harvey Zhao 740ac4cb24 Refactor styles in ArtPlayer components for improved readability and consistency
- Consolidated loading styles in loading.less for better structure.
- Updated mask styles in mask.less to enhance clarity.
- Refined mini popup styles in mini.less, adding transition effects.
- Improved mixins in mixins.less for consistent styling across components.
- Adjusted mobile styles in mobile.less for better responsiveness.
- Enhanced notice styles in notice.less for improved visibility.
- Streamlined plugin styles in plugins.less for better organization.
- Simplified poster styles in poster.less for clarity.
- Refined progress styles in progress.less, enhancing hover effects.
- Updated selector styles in selector.less for better interaction.
- Improved settings styles in setting.less for better usability.
- Enhanced subtitle styles in subtitle.less for better visibility.
- Updated variable definitions in variables.less for consistency.
- Refined video styles in video.less for improved layout.
- Enhanced volume control styles in volume.less for better user experience.
- Optimized rate limiting logic in build-llm.js and trans-docs.js for better performance.
2026-03-08 15:03:43 +08:00
Harvey Zhao b11f0eb99a refactor: update cursor styles and progress variable
- Removed cursor pointer from .art-mask-show in mask.less for better UX.
- Added cursor pointer to .art-progress in progress.less to indicate interactivity.
- Adjusted hover effect for .art-control-progress-inner in progress.less to enhance visual feedback.
- Increased --art-progress-top-gap variable from 8px to 10px in variables.less for improved layout.
- Removed cursor pointer from .art-video in video.less to streamline styling.
2026-03-08 14:53:29 +08:00
Harvey Zhao 89a28e91fe refactor: update progress control to use $progress element for event handling 2026-03-08 14:38:37 +08:00
Harvey Zhao 92f09a4290 Refactor documentation for clarity and consistency
- Updated descriptions and terminology across various component documentation files for improved clarity.
- Changed headings and section titles for better readability and consistency.
- Enhanced the language and structure of the documentation to provide clearer guidance on usage and configuration.
- Removed the `fix-docs.js` script as its functionality has been integrated into the translation process.
- Improved the translation script to handle Markdown code block issues and added retry logic for API calls.
2026-03-08 13:15:13 +08:00
Harvey Zhao 562cfe18db refactor: remove .parcel-cache from .npmignore files across multiple plugins 2026-03-07 21:42:20 +08:00
Harvey Zhao 39a1fb1abd feat: add danmuku plugin documentation and i18n setup guide
- Created a new documentation file for the danmuku plugin, including code snippets for usage.
- Added a new i18n setup guide, detailing language settings, default languages, language imports, and how to add or modify languages.
- Included example code for initializing the Artplayer with different languages and importing language files.
2026-03-07 21:25:27 +08:00
Harvey Zhao bd43b6638d feat: add danmuku plugin documentation and i18n setup guide
- Created a new documentation file for the danmuku plugin with code examples for usage.
- Added a new i18n setup guide, detailing language settings, default languages, and how to import and modify languages.
- Included code snippets for initializing the Artplayer with different languages and examples for adding new languages.
2026-03-07 21:16:49 +08:00
Harvey Zhao dc850dd2d2 Refactor code structure for improved readability and maintainability 2026-03-07 21:07:48 +08:00
Harvey Zhao 1c75731ca9 feat: introduce ArtplayerToolIframe for iframe control
- Removed the old ArtplayerPluginIframe implementation.
- Added ArtplayerToolIframe class with methods for iframe communication.
- Implemented postMessage and onMessage methods for message handling.
- Created a new TypeScript definition file for ArtplayerToolIframe.
- Updated documentation links to point to the new iframe tool.
- Added npm ignore file and README for the new package.
- Included compiled and uncompiled versions of the new iframe tool.
- Updated package.json with relevant metadata and exports.
2026-03-07 20:58:02 +08:00
Harvey Zhao 1dc8e9a4ff refactor: update global name handling in build scripts
- Replaced `toPascalCase` with `getGlobalName` in build and dev scripts to standardize global variable naming for packages.
- Added `toCamelCase` and `getGlobalName` utility functions in `utils.js` to handle naming conventions based on package type.
2026-03-07 20:41:11 +08:00
Harvey Zhao 1e60637b74 refactor: remove global window assignment for Artplayer and template export
- Removed the assignment of Artplayer to the global window object in index.js of the artplayer package.
- Eliminated the window export for the template plugin in index.js, streamlining the code and reducing global scope pollution.
2026-03-07 20:24:29 +08:00
Harvey Zhao 7bfee6c6dc feat: add build:test script and improve documentation code blocks
- Added a new script `build:test` to generate test cases from documentation code examples.
- Enhanced documentation files by ensuring proper code block formatting and adding missing closing backticks.
- Updated various markdown files to include new code blocks and fixed formatting issues.
2026-03-07 15:52:56 +08:00
Harvey Zhao 699bf09577 feat: update changelog with Parcel to Vite refactor
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 (i18n) including default languages, importing languages, adding new languages, and modifying existing languages.
- Included code snippets for initializing the Artplayer with different language settings.

Add internationalization support for multiple languages in Artplayer

- Introduced Arabic (ar), Czech (cs), Spanish (es), Persian (fa), French (fr), Indonesian (id), Polish (pl), Russian (ru), Turkish (tr), Vietnamese (vi), and Traditional Chinese (zh-tw) translations.
- Created corresponding JavaScript and ES module files for each language containing translated strings for player controls and settings.
- Added a new documentation file for language settings in the project.

feat: add initial implementation of start option page with interactive code execution buttons

feat: add danmuku plugin documentation and i18n setup guide

- Created a new documentation file for the danmuku plugin, providing code examples for usage.
- Added a comprehensive guide for language settings, including default languages, importing languages, adding new languages, and modifying existing languages.
- Included code snippets for initializing the Artplayer with different language settings and importing language files.

refactor: update danmuku worker implementation and remove unused i18n files

- Changed the way the Danmuku class creates a Web Worker by using a worker loader instead of creating a blob.
- Removed Arabic, Czech, Spanish, Persian, French, Indonesian, Polish, Russian, Turkish, Vietnamese, and Traditional Chinese i18n files as they are no longer needed.
- Updated the Vite build configuration to disable banners for inline workers and added a plugin to remove worker banners from generated code.

feat: add danmuku plugin and i18n setup documentation

- Created a new documentation file for the danmuku plugin, providing code examples for usage.
- Added a new documentation file for language settings (i18n), detailing how to set default languages, import languages, and add new languages.
- Included code snippets for initializing the Artplayer with different language settings and examples for modifying existing languages.

feat: add danmuku plugin and i18n setup documentation

- Created a new documentation file for the danmuku plugin with code examples.
- Added a new documentation file for language settings (i18n) including import instructions and examples for setting default and custom languages.
- Updated the i18n documentation to include details on adding and modifying languages.

feat: add danmuku plugin and i18n setup documentation

- Created a new JavaScript file for the danmuku plugin documentation with multiple code execution buttons.
- Added a new JavaScript file for i18n (internationalization) setup documentation, including instructions for language settings, importing languages, and modifying language options.
- Included examples for setting default languages and adding new languages in the i18n documentation.

Refactor code structure for improved readability and maintainability
2026-03-07 15:21:34 +08:00
Harvey Zhao ddb78cf850 Refactor code structure for improved readability and maintainability 2026-03-05 14:00:27 +08:00
Harvey Zhao 3ae89ab349 Revert "feat: enhance Danmuku plugin with batch processing for top calculations"
This reverts commit 1841f754dc.
2026-03-05 13:58:53 +08:00
Harvey Zhao bad7892660 feat(contextmenu): enhance version link with referrer URL for better tracking 2026-03-02 17:39:47 +08:00
Harvey Zhao 1841f754dc feat: enhance Danmuku plugin with batch processing for top calculations
- Implemented a callback pool in the Web Worker to handle concurrent requests without overwriting onmessage.
- Modified postMessage to generate unique IDs for messages and store corresponding callbacks.
- Improved state management by using in-place deletion for removing danmu from state pools.
- Optimized the rendering loop to batch calculate the top positions of danmu elements, reducing DOM reads and improving performance.
- Added a new function getDanmuTopBatch in the worker to handle batch requests for top calculations.
2026-02-19 12:48:32 +08:00
Harvey Zhao 0bdc59e446 chore: remove unused assets and sponsor page 2026-02-13 09:54:24 +08:00
Harvey Zhao cfaaea6a5c 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 (i18n) including default languages, importing languages, adding new languages, and modifying existing languages.
- Included code snippets for initializing the Artplayer with different language configurations.
2026-02-12 16:55:43 +08:00
Harvey Zhao 687a34c6b3 Refactor canvas size calculation into a separate function and initialize canvas dimensions
- Moved the canvas size calculation logic into a dedicated function `calcCanvasSize`.
- Called `calcCanvasSize` to set the initial width and height of the canvas.
- Removed duplicate `calcCanvasSize` function definition from the code.
2026-02-11 23:03:24 +08:00
Harvey Zhao 14807e2633 feat: update artplayerPluginWebsr to support async upscale initialization
- Changed the return function to be async for handling asynchronous operations.
- Updated the call to startRealtimeUpscale to await its completion, allowing for proper handling of the upscale process with the specified network size option.
2026-02-11 23:00:36 +08:00
Harvey Zhao 210eb94b75 feat: add Upscaler class for image and video upscaling with Web Workers
- Implemented methods for initializing the upscaling process, loading weights, and processing images and videos.
- Added support for real-time video upscaling using OffscreenCanvas and Web Workers.
- Included utility functions for loading image and video metadata, handling blob responses, and managing network configurations.
- Introduced methods for downloading upscaled content and managing GPU capabilities.
- Added error handling and progress tracking for the upscaling process.
2026-02-11 22:54:13 +08:00
Harvey Zhao 7dffd99cfd Refactor code structure for improved readability and maintainability
Remove debugging border from the websr plugin's styling

Enhance canvas sizing logic in artplayer-plugin-websr

- Updated canvas positioning to center it within the player.
- Introduced a new function to calculate canvas size based on the video aspect ratio.
- Adjusted canvas dimensions during initialization and on resize events to maintain aspect ratio.
- Ensured canvas styles are updated to reflect the calculated dimensions.

feat: add comparison mode to artplayer-plugin-websr

- Updated README.md to reflect new comparison feature and simplified content.
- Modified package.json to remove unnecessary keywords.
- Enhanced index.js to implement comparison functionality, allowing users to compare original and upscaled video.
- Added new methods for enabling, disabling, and toggling comparison mode, as well as setting and getting the comparison position.
- Updated TypeScript definitions to include new comparison options and methods.
2026-02-10 23:02:31 +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 441909f8ac Refactor hint.less to integrate tooltip styles and improve organization
- Merged tooltip styling sections into a cohesive structure.
- Added comments for clarity on tooltip components and their functionalities.
- Ensured consistent formatting and indentation throughout the file.
- Preserved original functionality while enhancing readability and maintainability.
2026-01-12 18:57:50 +08:00
Harvey Zhao 486231f04b feat: update version to 1.1.0 and enhance VAST plugin with new event handling and configuration options 2026-01-04 23:31:30 +08:00
Harvey Zhao 23a20d5d6d feat: enhance audio track plugin with waiting and playing event handling 2026-01-04 17:29:05 +08:00
Harvey Zhao ca34b47180 Remove artplayer-plugin-liquid-glass plugin
- Deleted the plugin files including JavaScript, CSS, README, and type definitions.
- Removed references to the plugin from the documentation.
- Cleaned up the package structure by removing the .npmignore and package.json files related to the plugin.
2026-01-04 16:54:07 +08:00
Harvey Zhao c655f073ae 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 instructions, and examples for adding and modifying languages.
- Updated the i18n documentation to reflect changes in language handling and provide clear examples for users.
2026-01-04 15:59:52 +08:00
Harvey Zhao c88aa97c0a fix: update plugin names for consistency in config.js 2026-01-04 15:44:37 +08:00
Harvey Zhao 24352e01c4 fix: correct capitalization in plugin links for consistency 2026-01-03 22:01:49 +08:00
Harvey Zhao fb7eddf433 Update config.js 2026-01-03 19:35:58 +08:00
Harvey Zhao b69d020c5a feat: add artplayer-plugin-jassub for enhanced video subtitle rendering 2026-01-03 19:01:40 +08:00
Harvey Zhao 0d032f685b Merge branch 'artplayer-plugin-jassub' 2026-01-03 18:58:13 +08:00