I want to show video from device video gallery. I get response from react-native-image-picker that include path and content. When I use the content for display video with react-native-video component shows nothing.
I tried these codes
RN-image-picker response here.
Video component in render
1 static uri
<Video
source={{ uri: "content://media/external/video/media/23" }}
repeat={true}
style={styles.video}
resizeMode="cover"
/>
2 static uri
<Video
source={{ uri: "content://media/external/video/media/23" }}
repeat={true}
style={styles.video}
resizeMode="cover"
/>
3
openGallery = () => {
ImagePicker.launchImageLibrary(options, response => {
if (response.didCancel) {
//console.warn("User cancelled image picker");
} else if (response.error) {
//console.warn("ImagePicker Error: ", response.error);
} else {
this.setState({
uri: response.uri,
});
}
});
};
<Video
source={{ uri: this.state.uri }}
repeat={true}
style={styles.video}
resizeMode="cover"
/>
I have one video on device
Video component shows nothing.
react-native : 0.59.10
react-native-video : ^4.4.4
react-native-image-picker: ^0.27.2