|
@@ -4,7 +4,8 @@ import {
|
4
|
4
|
CONFERENCE_FOCUSED,
|
5
|
5
|
CONFERENCE_JOINED,
|
6
|
6
|
CONFERENCE_LEFT,
|
7
|
|
- CONFERENCE_WILL_JOIN
|
|
7
|
+ CONFERENCE_WILL_JOIN,
|
|
8
|
+ ENDPOINT_MESSAGE_RECEIVED
|
8
|
9
|
} from '../../base/conference/actionTypes';
|
9
|
10
|
import { SET_AUDIO_MUTED, SET_VIDEO_MUTED } from '../../base/media/actionTypes';
|
10
|
11
|
import { PARTICIPANT_JOINED, PARTICIPANT_LEFT } from '../../base/participants/actionTypes';
|
|
@@ -29,34 +30,43 @@ const externalAPIEnabled = isExternalAPIAvailable();
|
29
|
30
|
|
30
|
31
|
switch (type) {
|
31
|
32
|
case SET_AUDIO_MUTED:
|
32
|
|
- rnSdkHandlers?.onAudioMutedChanged && rnSdkHandlers?.onAudioMutedChanged(action.muted);
|
|
33
|
+ rnSdkHandlers?.onAudioMutedChanged?.(action.muted);
|
33
|
34
|
break;
|
34
|
35
|
case SET_VIDEO_MUTED:
|
35
|
|
- rnSdkHandlers?.onVideoMutedChanged && rnSdkHandlers?.onVideoMutedChanged(Boolean(action.muted));
|
|
36
|
+ rnSdkHandlers?.onVideoMutedChanged?.(Boolean(action.muted));
|
36
|
37
|
break;
|
37
|
38
|
case CONFERENCE_BLURRED:
|
38
|
|
- rnSdkHandlers?.onConferenceBlurred && rnSdkHandlers?.onConferenceBlurred();
|
|
39
|
+ rnSdkHandlers?.onConferenceBlurred?.();
|
39
|
40
|
break;
|
40
|
41
|
case CONFERENCE_FOCUSED:
|
41
|
|
- rnSdkHandlers?.onConferenceFocused && rnSdkHandlers?.onConferenceFocused();
|
|
42
|
+ rnSdkHandlers?.onConferenceFocused?.();
|
42
|
43
|
break;
|
43
|
44
|
case CONFERENCE_JOINED:
|
44
|
|
- rnSdkHandlers?.onConferenceJoined && rnSdkHandlers?.onConferenceJoined();
|
|
45
|
+ rnSdkHandlers?.onConferenceJoined?.();
|
45
|
46
|
break;
|
46
|
47
|
case CONFERENCE_LEFT:
|
47
|
48
|
// Props are torn down at this point, perhaps need to leave this one out
|
48
|
49
|
break;
|
49
|
50
|
case CONFERENCE_WILL_JOIN:
|
50
|
|
- rnSdkHandlers?.onConferenceWillJoin && rnSdkHandlers?.onConferenceWillJoin();
|
|
51
|
+ rnSdkHandlers?.onConferenceWillJoin?.();
|
51
|
52
|
break;
|
52
|
53
|
case ENTER_PICTURE_IN_PICTURE:
|
53
|
|
- rnSdkHandlers?.onEnterPictureInPicture && rnSdkHandlers?.onEnterPictureInPicture();
|
|
54
|
+ rnSdkHandlers?.onEnterPictureInPicture?.();
|
54
|
55
|
break;
|
|
56
|
+ case ENDPOINT_MESSAGE_RECEIVED: {
|
|
57
|
+ const { data, participant } = action;
|
|
58
|
+
|
|
59
|
+ rnSdkHandlers?.onEndpointMessageReceived?.({
|
|
60
|
+ data,
|
|
61
|
+ participant
|
|
62
|
+ });
|
|
63
|
+ break;
|
|
64
|
+ }
|
55
|
65
|
case PARTICIPANT_JOINED: {
|
56
|
66
|
const { participant } = action;
|
57
|
67
|
const participantInfo = participantToParticipantInfo(participant);
|
58
|
68
|
|
59
|
|
- rnSdkHandlers?.onParticipantJoined && rnSdkHandlers?.onParticipantJoined(participantInfo);
|
|
69
|
+ rnSdkHandlers?.onParticipantJoined?.(participantInfo);
|
60
|
70
|
break;
|
61
|
71
|
}
|
62
|
72
|
case PARTICIPANT_LEFT: {
|
|
@@ -64,11 +74,11 @@ const externalAPIEnabled = isExternalAPIAvailable();
|
64
|
74
|
|
65
|
75
|
const { id } = participant ?? {};
|
66
|
76
|
|
67
|
|
- rnSdkHandlers?.onParticipantLeft && rnSdkHandlers?.onParticipantLeft({ id });
|
|
77
|
+ rnSdkHandlers?.onParticipantLeft?.({ id });
|
68
|
78
|
break;
|
69
|
79
|
}
|
70
|
80
|
case READY_TO_CLOSE:
|
71
|
|
- rnSdkHandlers?.onReadyToClose && rnSdkHandlers?.onReadyToClose();
|
|
81
|
+ rnSdkHandlers?.onReadyToClose?.();
|
72
|
82
|
break;
|
73
|
83
|
}
|
74
|
84
|
|