fix(core): separate author and user audio gain (#3328)

This commit is contained in:
Miguel Ángel
2026-08-18 10:59:12 -04:00
committed by GitHub
parent afafca4b96
commit 995c9e346e
6 changed files with 93 additions and 7 deletions
+5 -3
View File
@@ -2031,8 +2031,10 @@ export function initSandboxRuntimeModular(): void {
userMuted: state.bridgeMuted,
userVolume: state.bridgeVolume,
forceSync,
onElementVolume: (el, volume) => webAudio.setElementVolume(el, volume),
onElementVolume: (el, _effectiveVolume, authorVolume) =>
webAudio.setElementVolume(el, authorVolume),
isWebAudioOwned: (el) => webAudio.ownsElement(el),
isWebAudioRouted: (el) => webAudio.routesElement(el),
onAutoplayBlocked: () => {
if (state.mediaAutoplayBlockedPosted) return;
state.mediaAutoplayBlockedPosted = true;
@@ -3047,7 +3049,7 @@ export function initSandboxRuntimeModular(): void {
compStart,
mediaStart,
clock.now(),
vol * state.bridgeVolume,
vol,
gen,
state.playbackRate,
)
@@ -3071,7 +3073,7 @@ export function initSandboxRuntimeModular(): void {
compStart,
mediaStart,
clock.now(),
vol * state.bridgeVolume,
vol,
gen,
state.playbackRate,
clipDuration,