|
@@ -9,6 +9,7 @@ import {
|
9
|
9
|
getLocalParticipant
|
10
|
10
|
} from '../base/participants';
|
11
|
11
|
import { MiddlewareRegistry } from '../base/redux';
|
|
12
|
+import { isTestModeEnabled } from '../base/testing';
|
12
|
13
|
import {
|
13
|
14
|
getTrackByJitsiTrack,
|
14
|
15
|
TRACK_ADDED,
|
|
@@ -17,6 +18,7 @@ import {
|
17
|
18
|
} from '../base/tracks';
|
18
|
19
|
|
19
|
20
|
import { selectParticipant, selectParticipantInLargeVideo } from './actions';
|
|
21
|
+import logger from './logger';
|
20
|
22
|
|
21
|
23
|
import './subscriber';
|
22
|
24
|
|
|
@@ -32,7 +34,12 @@ MiddlewareRegistry.register(store => next => action => {
|
32
|
34
|
|
33
|
35
|
switch (action.type) {
|
34
|
36
|
case DOMINANT_SPEAKER_CHANGED: {
|
35
|
|
- const localParticipant = getLocalParticipant(store.getState());
|
|
37
|
+ const state = store.getState();
|
|
38
|
+ const localParticipant = getLocalParticipant(state);
|
|
39
|
+
|
|
40
|
+ if (isTestModeEnabled(state)) {
|
|
41
|
+ logger.info(`Dominant speaker changed event for: ${action.participant.id}`);
|
|
42
|
+ }
|
36
|
43
|
|
37
|
44
|
if (localParticipant && localParticipant.id !== action.participant.id) {
|
38
|
45
|
store.dispatch(selectParticipantInLargeVideo());
|