Commit Graph
3297 Commits
Author SHA1 Message Date
Harvey Zhao a0286c4e95 test(packages): ENG-07 verify installed tarball contracts and browsers 2026-09-10 23:04:19 +08:00
Harvey Zhao 12b047f9a6 test(chapter): PKG-CHAPTER-02 cover behavior and optional factory types 2026-09-10 22:43:01 +08:00
Harvey Zhao 701749520b docs(chapter): PKG-CHAPTER-01 freeze published behavior contracts 2026-09-10 22:28:24 +08:00
Harvey Zhao 7318d33822 test(browser): ENG-05 add real playback projects and artifact mapping 2026-09-10 22:25:13 +08:00
Harvey Zhao 458bc3215d test: ENG-03 share behavior fixtures across source and releases 2026-09-10 21:55:27 +08:00
Harvey Zhao b53461da1c build: ENG-06 support TS entries and preserve AMD globals 2026-09-10 21:47:10 +08:00
Harvey Zhao 771482426f build(types): ENG-04 add strict projects and legacy compiler checks 2026-09-10 21:21:39 +08:00
Harvey Zhao 09902b8b8c docs(refactor): BASE-08 map package consumer and device validation 2026-09-10 21:11:39 +08:00
Harvey Zhao ed293231dc docs(refactor): BASE-07 track compatibility risks and third-party provenance 2026-09-10 21:07:56 +08:00
Harvey Zhao e01f39ffa0 test(BASE-06): capture performance and teardown resource baselines 2026-09-10 20:48:44 +08:00
Harvey Zhao c7a375e146 test(BASE-05): capture published distribution and type consumers 2026-09-10 20:34:04 +08:00
Harvey Zhao 2b7054d8a5 test(BASE-04): freeze published DOM input and demo baselines 2026-09-10 20:16:58 +08:00
Harvey Zhao 9489392905 test(refactor): [BASE-03] capture media and lifecycle behavior 2026-09-10 19:55:55 +08:00
Harvey Zhao b382ec08f7 test(refactor): [BASE-02] freeze real-browser public API contracts 2026-09-10 19:35:55 +08:00
Harvey Zhao 833cc11674 ci(workspace): [ENG-02] add read-only checks and isolated Pages workflow 2026-09-10 19:22:24 +08:00
Harvey Zhao 9a6cfe5c6b build(workspace): [ENG-PM-01] use pinned Yarn with frozen installs 2026-09-10 19:09:26 +08:00
Harvey Zhao 9d1d5fda3d docs(refactor): [DOC-13] allow in-app browser fallback 2026-09-10 18:58:19 +08:00
Harvey Zhao 3781e6bda1 build(workspace): [ENG-01] pin reproducible Node and npm toolchain 2026-09-10 18:52:58 +08:00
Harvey Zhao 3c759f14c2 test(refactor): [BASE-HARNESS-01] add isolated published API fixture 2026-09-10 18:44:08 +08:00
Harvey Zhao 1d705b3056 test(refactor): [BASE-01] freeze published core and chapter baselines 2026-09-10 18:36:02 +08:00
Harvey Zhao 7a5354e356 docs(refactor): [DOC-12] close execution and release planning gaps 2026-09-10 18:30:08 +08:00
Harvey Zhao 9b9739ab61 docs(refactor): [DOC-11] require next major versions for all packages 2026-09-10 18:25:53 +08:00
Harvey Zhao a9197f59b1 docs(refactor): [DOC-10] plan GitHub CI and release automation 2026-09-10 18:23:31 +08:00
Harvey Zhao 21fd40ec07 docs(refactor): [DOC-09] map existing browser test pages 2026-09-10 18:20:16 +08:00
Harvey Zhao 3af9becff9 docs(refactor): [DOC-08] require browser evidence and release reviews 2026-09-10 18:16:28 +08:00
Harvey Zhao 1fa0a57831 docs(refactor): [DOC-07] improve sequencing and release gates 2026-09-10 18:08:40 +08:00
Harvey Zhao d7b348f3a6 docs(refactor): [DOC-06] authorize dependencies and project scripts 2026-09-10 17:58:40 +08:00
Harvey Zhao 570600d2f6 docs(refactor): [DOC-05] establish refactor docs and per-task commits 2026-09-10 17:56:31 +08:00
糖猫猫andrionzhao 40fcda6a37 feat: batch video upscaling with folder upload, directory save, and result comparison (#1051)
* feat: support batch video upscaling with folder upload and directory save

- Add multi-file selection and entire folder upload (webkitdirectory)
- Support drag & drop of both files and folders via FileSystemEntry API
- Add save directory picker using File System Access API (showDirectoryPicker)
- Process videos sequentially with per-file progress and status tracking
- Add right-side result list with click-to-compare functionality
- Add per-video duration and total batch duration display
- Add retry button for failed items with error detail display
- Remove auto-play on comparison viewer load
- Fix worker error handling: handle "error" command to reject stale promises
- Fix event listener accumulation in video comparison (AbortController)
- Fix XSS risk by escaping HTML in all innerHTML injections
- Fix URL revocation timing in download to prevent large file truncation
- Extract writeToSaveDirectory and truncateName helpers to reduce duplication
- Add Usage Guide panel explaining single/multiple/folder upload options

Files changed:
  docs/upscaler/index.html  (+1110/-181)
  docs/upscaler/upscaler.js (+110)

* fix: prevent auto-play and resource consumption during upscaling

- Set preload="metadata" on preview and comparison video elements
- Explicitly pause preview video after setting src in showVideoPreview
- Remove preview video seek sync from batch processing progress callbacks
  (was causing continuous decode during upscaling, wasting GPU resources)
- Remove preview video seek sync from retry progress callback
- All videos now require manual play; no background resource usage

* fix: improve upscaled video quality with higher bitrate and codec support

- Raise base bitrate from 2.5 Mbps (25e5) to 8 Mbps (8e6) for standard and
  firefox processors, preventing quality loss when source videos have high
  bitrates (e.g. 720p @ 16.7 Mbps was producing 1440p @ 10 Mbps, smaller
  than the original file)
- Double the bitrate for mediabunny processor (X.n1 * 2) to account for the
  4x pixel increase from 2x upscaling
- Add H.264 Level 5.1 (avc1.640033) and Level 5.2 (avc1.640034) codecs to
  the fallback lists, since Level 4.0 (avc1.640028, ~24.6 Mbps) cannot
  support the higher bitrates for 1440p+ outputs
- Add latencyMode: "quality" to VideoEncoder configs for both standard and
  firefox processors, prioritizing encoding quality over latency (suitable
  for offline processing)

* feat: add video data comparison panel for original vs upscaled metrics

- Add a comparison data table below the file info bar showing 6 metrics:
  Resolution, File Size, Duration, Est. Bitrate, Pixels, Process Time
- Display per-metric change percentage with color-coded indicators:
  green (↑) for improvements, red (↓) for regressions, gray for neutral
- Estimated bitrate calculated from file size × 8 / video duration
- Table renders after both original and upscaled video metadata loads
- Auto-hide panel on reset

* fix: make video data comparison panel full-width and responsive

- Move comparison data table from inside the left column to the full-width
  area below the left/right layout, so it is no longer constrained by the
  comparison viewer column width
- Remove table-fixed colgroup and overflow-x-auto that caused horizontal
  scrolling on smaller screens
- Table now uses w-full auto-layout, displaying all 4 columns (Metric,
  Original, Upscaled, Change) without requiring horizontal scrolling

---------

Co-authored-by: rionzhao <rionzhao@tencent.com>
2026-09-10 17:19:38 +08:00
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 02d1ded7b8 Update CNAME 2026-07-13 12:37:59 +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 fc90d4a0df Merge branch 'master' of https://github.com/zhw2590582/ArtPlayer 2026-05-04 13:23: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 d6c1e5d25b Update mediabunny.js 2026-05-04 13:16:56 +08:00
Harvey Zhao 63c8966ed7 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.
2026-05-04 13:11:27 +08:00
Harvey Zhao 23c8f46878 feat: add bun installation command to documentation 2026-04-04 10:35:07 +08:00
Harvey Zhao 4b75df286a feat: add CLAUDE.md for project guidance and documentation structure 2026-04-03 23:27:55 +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 4501ec2907 feat: update version to 5.4.0 and add play/pause functionality for comparison videos 2026-03-17 17:27:37 +08:00
Harvey Zhao 6c79148da5 feat: add jassub worker scripts and WASM files for subtitle processing 2026-03-16 21:25:51 +08:00