Skip to content

Commit f7b22a6

Browse files
authored
Merge pull request #131 from voximplant/update_ui
Fix ui issues with shadow user, update foreground service version
2 parents dda7b8b + a30812e commit f7b22a6

8 files changed

Lines changed: 24 additions & 27 deletions

File tree

ConferenceDemo/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"@react-native-async-storage/async-storage": "1.15.17",
1414
"@react-navigation/native": "6.0.8",
1515
"@react-navigation/native-stack": "6.4.1",
16-
"@voximplant/react-native-foreground-service": "3.0.1",
16+
"@voximplant/react-native-foreground-service": "3.0.2",
1717
"react": "17.0.2",
1818
"react-native": "0.67.2",
1919
"react-native-gesture-handler": "2.2.0",
@@ -22,7 +22,7 @@
2222
"react-native-screens": "3.10.2",
2323
"react-native-svg": "12.1.1",
2424
"react-native-svg-transformer": "1.0.0",
25-
"react-native-voximplant": "1.29.1",
25+
"react-native-voximplant": "1.32.1",
2626
"react-redux": "7.2.6",
2727
"redux": "4.1.2",
2828
"redux-thunk": "2.4.1"

ConferenceDemo/src/Core/Services/ConferenceService.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,20 @@ import {useUtils} from '../../Utils/useUtils';
1212
import {RootReducer} from '../Store';
1313
//@ts-ignore
1414
import ForegroundService from './ForegroundService';
15+
import {HardwareService} from './HardwareService';
1516

1617
import {
1718
changeCallState,
1819
videoStreamAdded,
1920
videoStreamRemoved,
2021
endpointAdded,
2122
endpointRemoved,
22-
setError,
2323
resetCallState,
2424
endpointVoiceActivityStarted,
2525
endpointVoiceActivityStopped,
2626
endpointMuted,
2727
manageParticipantStream,
2828
} from '../Store/conference/actions';
29-
import {HardwareService} from './HardwareService';
3029

3130
export const ConferenceService = () => {
3231
const Client = Voximplant.getInstance();
@@ -162,16 +161,19 @@ export const ConferenceService = () => {
162161
dispatch(changeCallState('Connected'));
163162
});
164163
currentConference.current?.on(Voximplant.CallEvents.Disconnected, () => {
165-
dispatch(changeCallState('Disconnected'));
166164
dispatch(resetCallState());
167165
afterConferenceAction();
168166
currentConference.current = null;
169167
});
170168
currentConference.current?.on(
171169
Voximplant.CallEvents.Failed,
172170
(callEvent: any) => {
173-
dispatch(changeCallState('Failed'));
174-
dispatch(setError(callEvent.reason));
171+
dispatch(
172+
resetCallState({
173+
callState: 'Failed',
174+
error: callEvent.reason,
175+
}),
176+
);
175177
afterConferenceAction();
176178
},
177179
);

ConferenceDemo/src/Core/Services/ForegroundService.ios.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.

ConferenceDemo/src/Core/Services/ForegroundService.android.ts renamed to ConferenceDemo/src/Core/Services/ForegroundService.ts

File renamed without changes.

ConferenceDemo/src/Core/Store/conference/actions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ export const endpointRemoved = (payload: IParticipant): IReduxAction => ({
4747
payload,
4848
});
4949

50-
export const resetCallState = (): IReduxAction => ({
50+
export const resetCallState = (payload?: object): IReduxAction => ({
5151
type: conferenceActions.RESET_CALL_STATE,
52+
payload,
5253
});
5354

5455
export const endpointVoiceActivityStarted = (

ConferenceDemo/src/Core/Store/conference/reducer.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,17 @@ const conferenceReducer = (
7575
return {...state, error: payload};
7676
}
7777
case conferenceActions.RESET_CALL_STATE: {
78-
return {...state, participants: [], isMuted: false, isSendVideo: false};
78+
return {
79+
...state,
80+
participants: [],
81+
isMuted: false,
82+
isSendVideo: false,
83+
callState: 'Disconnected',
84+
selectedAudioDevice: null,
85+
listAudioDevices: [],
86+
error: '',
87+
...payload,
88+
};
7989
}
8090
case conferenceActions.ENDPOINT_VOICE_ACTIVITY_STARTED: {
8191
return {

ConferenceDemo/src/Screens/Login/styles.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export default StyleSheet.create({
2121
width: '58%',
2222
lineHeight: 24,
2323
fontSize: 20,
24+
paddingVertical: 10,
2425
},
2526
passwordInput: {
2627
width: '100%',

VoximplantDemo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"@react-native-community/masked-view": "0.1.11",
1515
"@react-navigation/native": "5.9.4",
1616
"@react-navigation/stack": "5.14.5",
17-
"@voximplant/react-native-foreground-service": "3.0.1",
17+
"@voximplant/react-native-foreground-service": "3.0.2",
1818
"react": "17.0.2",
1919
"react-native": "0.66.3",
2020
"react-native-callkeep": "4.2.0",

0 commit comments

Comments
 (0)