Skip to content

Commit

Permalink
fix(MeetingsSdkAdapter): obtain remote sharing stream for a user who …
Browse files Browse the repository at this point in the history
…joins after sharing is started
  • Loading branch information
karinasigartau0798 authored and cipak committed Dec 9, 2021
1 parent df52493 commit 06d5db5
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/MeetingsSDKAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,15 +401,27 @@ export default class MeetingsSDKAdapter extends MeetingsAdapter {
this.meetings[ID] = {...meeting, localShare: {stream}};
break;
case MEDIA_TYPE_REMOTE_SHARE:
this.meetings[ID] = {...meeting, remoteShareStream: stream};
this.meetings[ID] = {
...meeting,
remoteShareStream: stream,
remoteShare: meeting.remoteSharing ? stream : null,
};
break;
case EVENT_REMOTE_SHARE_START:
// Only activate the remote stream when get get the start notification
this.meetings[ID] = {...meeting, remoteShare: meeting.remoteShareStream};
this.meetings[ID] = {
...meeting,
remoteShare: meeting.remoteShareStream || null,
remoteSharing: true,
};
break;
case EVENT_REMOTE_SHARE_STOP:
// Remove remote share on stop event
this.meetings[ID] = {...meeting, remoteShare: null};
this.meetings[ID] = {
...meeting,
remoteShare: null,
remoteSharing: false,
};
break;
default:
break;
Expand Down

0 comments on commit 06d5db5

Please sign in to comment.