This commit is contained in:
legop3
2026-02-21 17:22:38 -05:00
parent 657189e979
commit 32ec8e1aa3
3 changed files with 10 additions and 33 deletions
-23
View File
@@ -318,27 +318,6 @@ export default function VideoTile({
logAudio,
]);
useEffect(() => {
if (!audioSessionInfo?.url || !autoLevelEnabled || autoLevelMode !== 'compressor') {
return undefined;
}
const unlock = () => {
if (audioContextRef.current?.state === 'running') return;
logAudio('unlock/gesture');
forceUnlockCompressorAudio();
};
window.addEventListener('pointerdown', unlock, { passive: true, capture: true });
window.addEventListener('touchstart', unlock, { passive: true, capture: true });
window.addEventListener('click', unlock, { passive: true, capture: true });
window.addEventListener('keydown', unlock);
return () => {
window.removeEventListener('pointerdown', unlock);
window.removeEventListener('touchstart', unlock);
window.removeEventListener('click', unlock);
window.removeEventListener('keydown', unlock);
};
}, [audioSessionInfo?.url, autoLevelEnabled, autoLevelMode, forceUnlockCompressorAudio, logAudio]);
useEffect(() => {
if (!audioSessionInfo?.url || !autoLevelEnabled || autoLevelMode !== 'compressor') {
return undefined;
@@ -580,7 +559,6 @@ export default function VideoTile({
});
if (nextStatus === 'playing') {
resumeAudioContext();
forceUnlockCompressorAudio();
const target = audioRef.current;
if (target) {
target.muted = false;
@@ -617,7 +595,6 @@ export default function VideoTile({
audioRestartToken,
scheduleAudioRestart,
resumeAudioContext,
forceUnlockCompressorAudio,
logAudio,
]);