diff --git a/src/components/stream-player.tsx b/src/components/stream-player.tsx index de5738a..92f2b7f 100644 --- a/src/components/stream-player.tsx +++ b/src/components/stream-player.tsx @@ -37,10 +37,9 @@ interface Props { export default function StreamPlayerWrapper({ streamerIdentity }: Props) { const connectionState = useConnectionState(); const participant = useRemoteParticipant(streamerIdentity); - const tracks = useTracks([ - Track.Source.Camera, - Track.Source.Microphone, - ]).filter((track) => track.participant.identity === streamerIdentity); + const tracks = useTracks(Object.values(Track.Source)).filter( + (track) => track.participant.identity === streamerIdentity + ); if (connectionState !== ConnectionState.Connected || !participant) { return ( @@ -74,8 +73,7 @@ export const StreamPlayer = ({ participant }: { participant: Participant }) => { const videoEl = useRef(null); const playerEl = useRef(null); - // useTracks([Track.Source.Camera, Track.Source.Microphone]) - useTracks([Track.Source.Camera]) + useTracks(Object.values(Track.Source)) .filter((track) => track.participant.identity === participant.identity) .forEach((track) => { if (videoEl.current) {