@selfcommunity/react-ui 0.11.0-alpha.42 → 0.11.0-alpha.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -68,7 +68,9 @@ function VideoConference(inProps) {
68
68
  { source: livekit_client_1.Track.Source.Camera, withPlaceholder: true },
69
69
  { source: livekit_client_1.Track.Source.ScreenShare, withPlaceholder: false }
70
70
  ], { updateOnlyOn: [livekit_client_1.RoomEvent.ActiveSpeakersChanged], onlySubscribed: false });
71
- const tracksNoParticipants = (0, react_1.useMemo)(() => tracks.filter((t) => t.participant.name === scUserContext.user.username || t.participant.name === speakerFocused.username || t.source === 'screen_share'), [tracks, scUserContext.user]);
71
+ const tracksNoParticipants = (0, react_1.useMemo)(() => tracks.filter((t) => t.participant.name === scUserContext.user.username ||
72
+ (speakerFocused && t.participant.name === speakerFocused.username) ||
73
+ t.source === 'screen_share'), [tracks, scUserContext.user]);
72
74
  const handleBlur = React.useCallback((event) => {
73
75
  var _a, _b;
74
76
  if (event.target) {
@@ -65,7 +65,9 @@ export function VideoConference(inProps) {
65
65
  { source: Track.Source.Camera, withPlaceholder: true },
66
66
  { source: Track.Source.ScreenShare, withPlaceholder: false }
67
67
  ], { updateOnlyOn: [RoomEvent.ActiveSpeakersChanged], onlySubscribed: false });
68
- const tracksNoParticipants = useMemo(() => tracks.filter((t) => t.participant.name === scUserContext.user.username || t.participant.name === speakerFocused.username || t.source === 'screen_share'), [tracks, scUserContext.user]);
68
+ const tracksNoParticipants = useMemo(() => tracks.filter((t) => t.participant.name === scUserContext.user.username ||
69
+ (speakerFocused && t.participant.name === speakerFocused.username) ||
70
+ t.source === 'screen_share'), [tracks, scUserContext.user]);
69
71
  const handleBlur = React.useCallback((event) => {
70
72
  var _a, _b;
71
73
  if (event.target) {