4

I am using React Native and am using https://github.com/lwansbrough/react-native-camera to capture a video. On saving the video I get an absolute path to the storage on my device. I want to convert it into a URI to display it.

{path:"file:///storage/emulated/0/DCIM/VID_21324217_242411222.mp4"}

I have already tried doing this

<Video
  source={{ uri: this.state.videoSource.path}}
  ....

But it doesn't work what am I missing? how do I convert this absolute path to an URI so I can display it in the video player?

blaziken105
  • 501
  • 3
  • 10
  • 25

1 Answers1

1

As stated here try to remove the file:// part of the path since it seems to be a bug on react-native-video which, although was fixed, IDK which version of this you're using or which version is patched.

Eldelshell
  • 6,683
  • 7
  • 44
  • 63
  • Well it did play the video, but the video displayed was zoomed in to one corner which was playing, this is weird considering the fact that when I use the picker to get the video, it plays normally showing everything that was recorded. Any idea what could be happening here? – blaziken105 Feb 19 '17 at 10:52
  • This seems like another issue maybe related to the video or some styiling. – Eldelshell Feb 20 '17 at 10:23