From 06d5db541f95b68a0f5d83e360c9bf0c892ac2f4 Mon Sep 17 00:00:00 2001 From: Karina Sigartau Date: Thu, 9 Dec 2021 15:21:05 +0200 Subject: [PATCH] fix(MeetingsSdkAdapter): obtain remote sharing stream for a user who joins after sharing is started --- src/MeetingsSDKAdapter.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/MeetingsSDKAdapter.js b/src/MeetingsSDKAdapter.js index 66bed044..bdcadd24 100644 --- a/src/MeetingsSDKAdapter.js +++ b/src/MeetingsSDKAdapter.js @@ -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;