|
@@ -4,7 +4,8 @@ import {
|
4
|
4
|
DOMINANT_SPEAKER_CHANGED,
|
5
|
5
|
PARTICIPANT_JOINED,
|
6
|
6
|
PARTICIPANT_LEFT,
|
7
|
|
- PIN_PARTICIPANT
|
|
7
|
+ PIN_PARTICIPANT,
|
|
8
|
+ getLocalParticipant
|
8
|
9
|
} from '../base/participants';
|
9
|
10
|
import { MiddlewareRegistry } from '../base/redux';
|
10
|
11
|
import {
|
|
@@ -27,7 +28,16 @@ MiddlewareRegistry.register(store => next => action => {
|
27
|
28
|
const result = next(action);
|
28
|
29
|
|
29
|
30
|
switch (action.type) {
|
30
|
|
- case DOMINANT_SPEAKER_CHANGED:
|
|
31
|
+ case DOMINANT_SPEAKER_CHANGED: {
|
|
32
|
+ const localParticipant = getLocalParticipant(store.getState());
|
|
33
|
+
|
|
34
|
+ if (localParticipant && localParticipant.id !== action.participant.id) {
|
|
35
|
+ store.dispatch(selectParticipantInLargeVideo());
|
|
36
|
+ }
|
|
37
|
+
|
|
38
|
+ break;
|
|
39
|
+ }
|
|
40
|
+
|
31
|
41
|
case PARTICIPANT_JOINED:
|
32
|
42
|
case PARTICIPANT_LEFT:
|
33
|
43
|
case PIN_PARTICIPANT:
|