Skip to content

Commit

Permalink
[ConferenceDemo]: update Voximplant React Native SDK to 1.36.0 and us…
Browse files Browse the repository at this point in the history
…e orientation event listener on android
  • Loading branch information
YuliaGrigorieva committed Jan 24, 2023
1 parent 54bfeed commit 02a553f
Show file tree
Hide file tree
Showing 5 changed files with 6,464 additions and 6,972 deletions.
10 changes: 10 additions & 0 deletions ConferenceDemo/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ buildscript {

allprojects {
repositories {
exclusiveContent {
filter {
includeGroup "com.facebook.react"
}
forRepository {
maven {
url "$rootDir/../node_modules/react-native/android"
}
}
}
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
Expand Down
2 changes: 1 addition & 1 deletion ConferenceDemo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.32.1",
"react-native-voximplant": "1.36.0",
"react-redux": "7.2.6",
"redux": "4.1.2",
"redux-thunk": "2.4.1"
Expand Down
5 changes: 5 additions & 0 deletions ConferenceDemo/src/Core/Services/HardwareService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ export const HardwareService = () => {
AudioDeviceManager.off();
};

const useOrientationListenerForCamera = () => {
CameraManager.useOrientationEventListener(true);
}

return {
CameraManager,
cameraType,
Expand All @@ -61,5 +65,6 @@ export const HardwareService = () => {
getActiveDevice,
subscribeDeviceChangedEvent,
unsubscribeFromDeviceChangedEvent,
useOrientationListenerForCamera,
};
};
2 changes: 2 additions & 0 deletions ConferenceDemo/src/Screens/Conference/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const ConferenceScreen = ({route}: IScreenProps<'Conference'>) => {
getAudioDevices,
getActiveDevice,
subscribeDeviceChangedEvent,
useOrientationListenerForCamera,
unsubscribeFromDeviceChangedEvent,
} = HardwareService();

Expand All @@ -60,6 +61,7 @@ const ConferenceScreen = ({route}: IScreenProps<'Conference'>) => {
getAudioDevices();
getActiveDevice();
subscribeDeviceChangedEvent();
useOrientationListenerForCamera();
startConference(conference, isSendVideo);
return () => unsubscribeFromDeviceChangedEvent();
}, []);
Expand Down
Loading

0 comments on commit 02a553f

Please sign in to comment.