Skip to content

Commit adc86ec

Browse files
harrisonloOcupe
andauthored
Fix start audio component flash issue (#641)
Co-authored-by: Jonas Schell <[email protected]>
1 parent e0daef1 commit adc86ec

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/light-spies-brake.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@livekit/components-react": patch
3+
---
4+
5+
Set the default value for `canPlayAudio` returned by the `useStartAudio` hook to `true` to avoid flashing issues.

packages/react/src/hooks/useStartAudio.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function useStartAudio({ room, props }: UseStartAudioProps) {
3030
() => roomAudioPlaybackAllowedObservable(roomEnsured),
3131
[roomEnsured, roomAudioPlaybackAllowedObservable],
3232
);
33-
const { canPlayAudio } = useObservableState(observable, { canPlayAudio: false });
33+
const { canPlayAudio } = useObservableState(observable, { canPlayAudio: true });
3434

3535
const mergedProps = React.useMemo(
3636
() =>

0 commit comments

Comments
 (0)