-1

Current behavior


Every time when I put the source on my code, from firebase, doesn't play any video. But, when I put some other link like this one: 'https://www.w3schools.com/tags/movie.mp4', it's work fine. I can load and show images normally from firebase, but I have some issues with videos. Does someone know how to help me?

### Platform


Android and react-native-video (https://github.com/react-native-community/react-native-video)

Code


<View style={pageGrey}>
    <Video 
        source={{ uri: 'https://www.w3schools.com/tags/movie.mp4' }}
        style={styles.backgroundVideo}
        rate={1} volume={1} muted={true}
        repeat={true}
        resizeMode='cover' key="video1" 
     />
</View>
Priyanka
  • 169
  • 3
  • 10
Bob Farias
  • 65
  • 6
  • print log of the URL that you load in `Video` component as a source from firebase – Rutvik Bhatt Jan 25 '19 at 11:34
  • Can you open the video link in browser? – Nikolay Tomitov Jan 25 '19 at 13:27
  • @NikolayTomitov Yes, I can. Take a look: https://firebasestorage.googleapis.com/v0/b/digitalmagazine-86e0d.appspot.com/o/Emma_video2.mp4?alt=media&token=63c08006-af08-494c-8249-0ce627d04e98 – Bob Farias Jan 25 '19 at 19:12
  • @RutvikBhatt here: https://ibb.co/VJtjfbr – Bob Farias Jan 25 '19 at 19:31
  • I think the problem might be with the video. Because I upload this video 'https://www.w3schools.com/tags/movie.mp4' on my storage and put your uri in my project, and works <3 – Bob Farias Jan 25 '19 at 21:58
  • @BobFarias Did you ever get a solution for this? I'm running into the issue with iOS. Remote videos work fine, it's only when they're coming from Firebase they don't work. – Ian Feb 07 '19 at 19:52
  • Hello @Ian. Yeah, I can make it. The problem was in the dimension of the video. I update the dimensions of my vertical video for 1080px wide by 1920px tall. After that, I can show the video normally. Try to see this question. Put some video on firebase that u know can be shown by react native. After that, see if the problem it is with firebase or the video u want to upload. – Bob Farias Feb 08 '19 at 20:52

1 Answers1

0

Firebase does not allow video streaming from web url's. Take a look at this answer.

https://stackoverflow.com/a/62302119/16204496

  • 1
    When you come across a question that was already posted on SO, flag it as so instead of posting the link as answer – Vega Jun 12 '21 at 15:51