From 248030bd43a44f29cfc5efd511ebff2d855d1647 Mon Sep 17 00:00:00 2001 From: lukasIO Date: Tue, 19 Sep 2023 14:27:12 +0200 Subject: [PATCH 1/2] Initialize canPlayAudio with room state --- packages/react/src/hooks/useStartAudio.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/react/src/hooks/useStartAudio.ts b/packages/react/src/hooks/useStartAudio.ts index cd3d5f301..e6f408261 100644 --- a/packages/react/src/hooks/useStartAudio.ts +++ b/packages/react/src/hooks/useStartAudio.ts @@ -30,7 +30,9 @@ export function useStartAudio({ room, props }: UseStartAudioProps) { () => roomAudioPlaybackAllowedObservable(roomEnsured), [roomEnsured, roomAudioPlaybackAllowedObservable], ); - const { canPlayAudio } = useObservableState(observable, { canPlayAudio: true }); + const { canPlayAudio } = useObservableState(observable, { + canPlayAudio: roomEnsured.canPlaybackAudio, + }); const mergedProps = React.useMemo( () => From 22e34261b0ea5df2b0f6a2f7f621e4ba8f4a0cc7 Mon Sep 17 00:00:00 2001 From: lukasIO Date: Tue, 19 Sep 2023 14:27:38 +0200 Subject: [PATCH 2/2] Create fair-actors-push.md --- .changeset/fair-actors-push.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/fair-actors-push.md diff --git a/.changeset/fair-actors-push.md b/.changeset/fair-actors-push.md new file mode 100644 index 000000000..8585ff901 --- /dev/null +++ b/.changeset/fair-actors-push.md @@ -0,0 +1,5 @@ +--- +"@livekit/components-react": patch +--- + +Initialize canPlayAudio with room state