rn: fixes the bug on shared video not stopping when the user leaves the conferences
This commit is contained in:
parent
59750ba1f1
commit
5811e0476c
|
@ -28,6 +28,7 @@ MiddlewareRegistry.register(store => next => action => {
|
||||||
const conference = getCurrentConference(state);
|
const conference = getCurrentConference(state);
|
||||||
const localParticipantId = getLocalParticipant(state)?.id;
|
const localParticipantId = getLocalParticipant(state)?.id;
|
||||||
const { videoId, status, ownerId, time } = action;
|
const { videoId, status, ownerId, time } = action;
|
||||||
|
const { ownerId: stateOwnerId, videoId: stateVideoId } = state['features/youtube-player'];
|
||||||
|
|
||||||
switch (action.type) {
|
switch (action.type) {
|
||||||
case TOGGLE_SHARED_VIDEO:
|
case TOGGLE_SHARED_VIDEO:
|
||||||
|
@ -37,8 +38,9 @@ MiddlewareRegistry.register(store => next => action => {
|
||||||
dispatch(setSharedVideoStatus('', 'stop', 0, ''));
|
dispatch(setSharedVideoStatus('', 'stop', 0, ''));
|
||||||
break;
|
break;
|
||||||
case PARTICIPANT_LEFT:
|
case PARTICIPANT_LEFT:
|
||||||
if (action.participant.id === action.ownerId) {
|
if (action.participant.id === stateOwnerId) {
|
||||||
dispatch(setSharedVideoStatus('', 'stop', 0, ''));
|
dispatch(setSharedVideoStatus('', 'stop', 0, ''));
|
||||||
|
dispatch(participantLeft(stateVideoId, conference));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SET_SHARED_VIDEO_STATUS:
|
case SET_SHARED_VIDEO_STATUS:
|
||||||
|
|
Loading…
Reference in New Issue