AhmadAltomy / expo-editor-media-picker

Expo editor image picker
0 stars 0 forks source link

expo-editor-media-picker

Expo media image,video picker with editor for React native

Installation

npm install expo-editor-media-picker

# for ios
cd ios && pod install

Usage

import * as ExpoEditorMediaPicker from 'expo-editor-media-picker';
import {Button, StyleSheet,  View} from 'react-native';

export default function App() {
  const openPicker = async () => {
    try {
    const result = await ExpoEditorMediaPicker.launchPickerAsync({
      maximumSelectedCount: 1,
    });
      console.log(result);
    }
    catch (e) {
      console.log(e);
    }
  }
  return (
    <View style={styles.container}>
      <Button title={'Open Picker'} onPress={openPicker} />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
});

API

launchPickerAsync(options: MediaPickerOptions): Promise<MediaPickerResult>

options

License

MIT

License: MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Author