mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-29 21:15:19 +00:00
lint
This commit is contained in:
@@ -48,10 +48,10 @@ export function ReactionsAudioRenderer(): ReactNode {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (SoundMap[reactionName]) {
|
if (SoundMap[reactionName]) {
|
||||||
audioEngineRef.current.playSound(reactionName);
|
void audioEngineRef.current.playSound(reactionName);
|
||||||
} else {
|
} else {
|
||||||
// Fallback sounds.
|
// Fallback sounds.
|
||||||
audioEngineRef.current.playSound("generic");
|
void audioEngineRef.current.playSound("generic");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [audioEngineRef, shouldPlay, oldReactions, reactions]);
|
}, [audioEngineRef, shouldPlay, oldReactions, reactions]);
|
||||||
|
|||||||
@@ -27,9 +27,11 @@ const TestComponent: FC = () => {
|
|||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<button onClick={async () => audioCtx.playSound("aSound")}>Valid sound</button>
|
<button onClick={() => void audioCtx.playSound("aSound")}>
|
||||||
|
Valid sound
|
||||||
|
</button>
|
||||||
{/* eslint-disable-next-line @typescript-eslint/no-explicit-any*/}
|
{/* eslint-disable-next-line @typescript-eslint/no-explicit-any*/}
|
||||||
<button onClick={async () => audioCtx.playSound("not-valid" as any)}>
|
<button onClick={() => void audioCtx.playSound("not-valid" as any)}>
|
||||||
Invalid sound
|
Invalid sound
|
||||||
</button>
|
</button>
|
||||||
</>
|
</>
|
||||||
@@ -59,6 +61,7 @@ class MockAudioContext {
|
|||||||
vitest.mocked({
|
vitest.mocked({
|
||||||
connect: (v: unknown) => v,
|
connect: (v: unknown) => v,
|
||||||
start: () => {},
|
start: () => {},
|
||||||
|
addEventListener: (_eventType: string, cb: () => void) => cb(),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
public createGain = vitest.fn().mockReturnValue(this.gain);
|
public createGain = vitest.fn().mockReturnValue(this.gain);
|
||||||
|
|||||||
Reference in New Issue
Block a user