mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 14:41:20 -08:00
fix(asr): [PKG-ASR-07] apply native playback volume only once
This commit is contained in:
1 parent
93208e59e1
commit
3e3bed2b93
19 files changed
+2780
-44
No files matched your search
@@ -34,6 +34,13 @@ continues through its playback gain to the destination. A source switch reuses t
|
||||
direct source and replaces the recorder; a captured-stream fallback is closed and
|
||||
reacquired because captured tracks can end on source changes.
|
||||
|
||||
The playback gain stays at unity. Native media-element source output already
|
||||
reflects the video's volume and mute; applying the same volume again would turn
|
||||
50% volume into 25% output amplitude. PCM also follows the main video's volume
|
||||
and becomes silent when that element is muted. Native analyser tests cover the
|
||||
linear output ratio, mute, stop and resume on Chromium/Firefox; they do not measure
|
||||
physical speakers or establish Safari/device support.
|
||||
|
||||
`stop()` returns `Promise<void>` and releases ASR work. An already displayed
|
||||
subtitle retains its original auto-hide deadline; obsolete callbacks cannot add timers.
|
||||
It retains playback subscriptions and allows explicit append or a later play.
|
||||
@@ -85,6 +92,9 @@ From the repository root:
|
||||
- `yarn test:browser test/browser/asr-audio.spec.js`: local AAC, actual Worklet,
|
||||
published/current core, pause/resume, source switch, stop/restart and destroy.
|
||||
Set `ARTPLAYER_ASR_ARTIFACT` to an actual main/legacy file to test that artifact.
|
||||
- `yarn test:browser test/browser/asr-playback.spec.js`: frozen 2.1 output
|
||||
attenuation versus candidate linear volume, mute and stop/resume. A native
|
||||
unity analyser measures the gain-to-destination route with local audio.
|
||||
- `yarn typecheck`: includes the package strict/noUncheckedIndexedAccess project.
|
||||
- `yarn test:asr-types-package`: packs and installs core/ASR outside the workspace,
|
||||
checks frozen 2.0/2.1 consumers and candidate declarations in strict compiler
|
||||
|
||||
Reference in new issue
Block a user