Reputation: 207
I drag and dropped my samplevideos folder into emulator then the file was available at Files/Downloads in emulator.
I was trying to access one of the video file from samplevideos file into my react native code
<Video source={{uri:"file:///Files:/Downloads/samplevideos/1.mp4"}}
volume={50}
resizeMode="cover"
style={styles.videoStyle}
/>
Upvotes: 0
Views: 243
Reputation: 13926
You can use rn-fetch-blob
dirs
- This constant is a hash map containing commonly used folders:
Usage
const dirs = RNFetchBlob.fs.dirs
const filePath = `${dirs.DownloadDir}/samplevideos/1.mp4`
<Video source={{uri: filePath }}
volume={50}
resizeMode="cover"
style={styles.videoStyle}
/>
Upvotes: 1