Skip to content

Commit

Permalink
Merge pull request #131 from voximplant/update_ui
Browse files Browse the repository at this point in the history
Fix ui issues with shadow user, update foreground service version
  • Loading branch information
pe1ros authored Jun 10, 2022
2 parents dda7b8b + a30812e commit f7b22a6
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 27 deletions.
4 changes: 2 additions & 2 deletions ConferenceDemo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@react-native-async-storage/async-storage": "1.15.17",
"@react-navigation/native": "6.0.8",
"@react-navigation/native-stack": "6.4.1",
"@voximplant/react-native-foreground-service": "3.0.1",
"@voximplant/react-native-foreground-service": "3.0.2",
"react": "17.0.2",
"react-native": "0.67.2",
"react-native-gesture-handler": "2.2.0",
Expand All @@ -22,7 +22,7 @@
"react-native-screens": "3.10.2",
"react-native-svg": "12.1.1",
"react-native-svg-transformer": "1.0.0",
"react-native-voximplant": "1.29.1",
"react-native-voximplant": "1.32.1",
"react-redux": "7.2.6",
"redux": "4.1.2",
"redux-thunk": "2.4.1"
Expand Down
12 changes: 7 additions & 5 deletions ConferenceDemo/src/Core/Services/ConferenceService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,20 @@ import {useUtils} from '../../Utils/useUtils';
import {RootReducer} from '../Store';
//@ts-ignore
import ForegroundService from './ForegroundService';
import {HardwareService} from './HardwareService';

import {
changeCallState,
videoStreamAdded,
videoStreamRemoved,
endpointAdded,
endpointRemoved,
setError,
resetCallState,
endpointVoiceActivityStarted,
endpointVoiceActivityStopped,
endpointMuted,
manageParticipantStream,
} from '../Store/conference/actions';
import {HardwareService} from './HardwareService';

export const ConferenceService = () => {
const Client = Voximplant.getInstance();
Expand Down Expand Up @@ -162,16 +161,19 @@ export const ConferenceService = () => {
dispatch(changeCallState('Connected'));
});
currentConference.current?.on(Voximplant.CallEvents.Disconnected, () => {
dispatch(changeCallState('Disconnected'));
dispatch(resetCallState());
afterConferenceAction();
currentConference.current = null;
});
currentConference.current?.on(
Voximplant.CallEvents.Failed,
(callEvent: any) => {
dispatch(changeCallState('Failed'));
dispatch(setError(callEvent.reason));
dispatch(
resetCallState({
callState: 'Failed',
error: callEvent.reason,
}),
);
afterConferenceAction();
},
);
Expand Down
17 changes: 0 additions & 17 deletions ConferenceDemo/src/Core/Services/ForegroundService.ios.ts

This file was deleted.

3 changes: 2 additions & 1 deletion ConferenceDemo/src/Core/Store/conference/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ export const endpointRemoved = (payload: IParticipant): IReduxAction => ({
payload,
});

export const resetCallState = (): IReduxAction => ({
export const resetCallState = (payload?: object): IReduxAction => ({
type: conferenceActions.RESET_CALL_STATE,
payload,
});

export const endpointVoiceActivityStarted = (
Expand Down
12 changes: 11 additions & 1 deletion ConferenceDemo/src/Core/Store/conference/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,17 @@ const conferenceReducer = (
return {...state, error: payload};
}
case conferenceActions.RESET_CALL_STATE: {
return {...state, participants: [], isMuted: false, isSendVideo: false};
return {
...state,
participants: [],
isMuted: false,
isSendVideo: false,
callState: 'Disconnected',
selectedAudioDevice: null,
listAudioDevices: [],
error: '',
...payload,
};
}
case conferenceActions.ENDPOINT_VOICE_ACTIVITY_STARTED: {
return {
Expand Down
1 change: 1 addition & 0 deletions ConferenceDemo/src/Screens/Login/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default StyleSheet.create({
width: '58%',
lineHeight: 24,
fontSize: 20,
paddingVertical: 10,
},
passwordInput: {
width: '100%',
Expand Down
2 changes: 1 addition & 1 deletion VoximplantDemo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@react-native-community/masked-view": "0.1.11",
"@react-navigation/native": "5.9.4",
"@react-navigation/stack": "5.14.5",
"@voximplant/react-native-foreground-service": "3.0.1",
"@voximplant/react-native-foreground-service": "3.0.2",
"react": "17.0.2",
"react-native": "0.66.3",
"react-native-callkeep": "4.2.0",
Expand Down

0 comments on commit f7b22a6

Please sign in to comment.