@stream-io/video-react-sdk 0.4.4 → 0.4.6

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.
package/dist/index.es.js CHANGED
@@ -28,15 +28,13 @@ const ParticipantsAudio = (props) => {
28
28
  return (jsx(Fragment, { children: participants.map((participant) => {
29
29
  if (participant.isLocalParticipant)
30
30
  return null;
31
- const hasAudio = participant.publishedTracks.includes(SfuModels.TrackType.AUDIO);
32
- const hasScreenShareAudio = participant.publishedTracks.includes(SfuModels.TrackType.SCREEN_SHARE_AUDIO);
33
- if (hasAudio && participant.audioStream) {
34
- return (createElement(Audio, { ...audioProps, trackType: "audioTrack", participant: participant, key: participant.sessionId }));
35
- }
36
- if (hasScreenShareAudio && participant.screenShareAudioStream) {
37
- return (createElement(Audio, { ...audioProps, trackType: "screenShareAudioTrack", participant: participant, key: participant.sessionId }));
38
- }
39
- return null;
31
+ const { publishedTracks, audioStream, screenShareAudioStream, sessionId, } = participant;
32
+ const hasAudio = publishedTracks.includes(SfuModels.TrackType.AUDIO);
33
+ const audioTrackElement = hasAudio && audioStream && (createElement(Audio, { ...audioProps, trackType: "audioTrack", participant: participant, key: `${sessionId}-audio` }));
34
+ const hasScreenShareAudio = publishedTracks.includes(SfuModels.TrackType.SCREEN_SHARE_AUDIO);
35
+ const screenShareAudioTrackElement = hasScreenShareAudio &&
36
+ screenShareAudioStream && (createElement(Audio, { ...audioProps, trackType: "screenShareAudioTrack", participant: participant, key: `${sessionId}-screen-share-audio` }));
37
+ return (jsxs(Fragment, { children: [audioTrackElement, screenShareAudioTrackElement] }));
40
38
  }) }));
41
39
  };
42
40
 
@@ -2116,7 +2114,7 @@ const VerticalScrollButtons = ({ scrollWrapper, }) => {
2116
2114
  };
2117
2115
  const hasScreenShare = (p) => !!p?.publishedTracks.includes(SfuModels.TrackType.SCREEN_SHARE);
2118
2116
 
2119
- const [major, minor, patch] = ("0.4.4" ).split('.');
2117
+ const [major, minor, patch] = ("0.4.6" ).split('.');
2120
2118
  setSdkInfo({
2121
2119
  type: SfuModels.SdkType.REACT,
2122
2120
  major,