-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathApp.js
42 lines (39 loc) · 909 Bytes
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import { StatusBar } from 'expo-status-bar';
import React from 'react';
const { VideoEditorModule } = NativeModules;
import { StyleSheet,
Text,
Button,
View,
Platform,
Alert,
NativeModules
} from 'react-native';
export default function App() {
return (
<View style={styles.container}>
<Text>Sample integration of Banuba Video Editor</Text>
<Button
title="Open Video Editor"
onPress={() => {
if (Platform.OS === 'android') {
NativeModules.ActivityStarter.navigateToVideoEditor()
} else {
VideoEditorModule.openVideoEditor();
}
}
}
/>
<StatusBar style="auto" />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
marginVertical: 16,
alignItems: 'center',
justifyContent: 'center',
}
});