@@ -4,7 +4,7 @@ import { participantTracksObservable } from '@livekit/components-core';
44import { useObservableState } from './internal' ;
55import type { Track } from 'livekit-client' ;
66import { useMaybeParticipantContext } from '../context' ;
7- import { useRemoteParticipants } from './useRemoteParticipants ' ;
7+ import { useParticipants } from './useParticipants ' ;
88
99/**
1010 * `useParticipantTracks` is a custom React that allows you to get tracks of a specific participant only, by specifiying the participant's identity.
@@ -16,14 +16,14 @@ export function useParticipantTracks(
1616 participantIdentity ?: string ,
1717) : TrackReference [ ] {
1818 const participantContext = useMaybeParticipantContext ( ) ;
19- const remoteParticipants = useRemoteParticipants ( { updateOnlyOn : [ ] } ) ;
19+ const participants = useParticipants ( { updateOnlyOn : [ ] } ) ;
2020
2121 const p = React . useMemo ( ( ) => {
2222 if ( participantIdentity ) {
23- return remoteParticipants . find ( ( p ) => p . identity === participantIdentity ) ;
23+ return participants . find ( ( p ) => p . identity === participantIdentity ) ;
2424 }
2525 return participantContext ;
26- } , [ participantIdentity , remoteParticipants , participantContext ] ) ;
26+ } , [ participantIdentity , participants , participantContext ] ) ;
2727
2828 const observable = React . useMemo ( ( ) => {
2929 if ( ! p ) {
0 commit comments