We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01611f5 commit 66df197Copy full SHA for 66df197
.changeset/olive-olives-flow.md
@@ -0,0 +1,5 @@
1
+---
2
+"@livekit/components-react": patch
3
4
+
5
+Fix `useTrackRef` for certain cases.
packages/react/src/hooks/useTrackMutedIndicator.ts
@@ -42,7 +42,7 @@ export function useTrackMutedIndicator(
42
options: UseTrackMutedIndicatorOptions = {},
43
): TrackMutedIndicatorReturnType {
44
let ref = useMaybeTrackRefContext();
45
- const p = useMaybeParticipantContext() ?? options.participant;
+ const p = useMaybeParticipantContext() ?? options.participant ?? ref?.participant;
46
47
if (typeof trackRefOrSource === 'string') {
48
if (!p) {
0 commit comments