Skip to content

Commit 2844c44

Browse files
authored
Merge pull request #9669 from daily-co/pre-1036
PRE-1036 Improvements from a memoization review
2 parents e1a6c49 + 05e0a42 commit 2844c44

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/hooks/useMediaTrack.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { DailyParticipant, DailyTrackState } from '@daily-co/daily-js';
22

3+
import { isTrackOff } from '../utils/isTrackOff';
34
import { useParticipantProperty } from './useParticipantProperty';
45

56
type MediaType = keyof DailyParticipant['tracks'];
@@ -32,6 +33,6 @@ export const useMediaTrack = (
3233

3334
return {
3435
...trackState,
35-
isOff: trackState.state === 'blocked' || trackState.state === 'off',
36+
isOff: isTrackOff(trackState.state),
3637
};
3738
};

0 commit comments

Comments
 (0)