mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 01:21:20 -04:00
ploo
This commit is contained in:
@@ -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,
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user