'What is the difference between storing videos for mobile app on streaming services like Youtube/Vimeo vs storing on cloud storage like Firebase/AWS?

I am making a React app that will display some Images/Videos to the users. To store videos, I chose Vimeo and use ReactPlayer to display the video - I simply pass the Vimeo URL to my ReactPlayer. While researching, I also came across storing videos on cloud storage like AWS or Firestore. From what I understand, I cannot directly stream videos from firebase (by giving the URL), the app needs to download the video first and then play it.

What happens in the case of Vimeo or youtube? Isn't the video being downloaded there too? What is the difference between the two approaches?

Also, what do you recommend for storing videos as well as images externally and displaying them in the app.



Solution 1:[1]

  1. For Youtube embedded URL's - Using ReactPlayer you can play the Youtube URL within React. This works for me below.

    <ReactPlayer url={"https://www.youtube.com/watch?v=ysz5S6PUM-U"} width='100%' height='100%' controls />

  2. Firebase - Downloading the url (https://firebasestorage.googleapis.com/v0/b/...) from firebase storage and playing it within a video tag or ReactPlayer works fine. The problem is that it doesn't work on mobile (iPhone's). For mobile that is where I read to that one must download the video. I'm researching for a solution. Firebase v9 docs state getStream() may be a method to use. https://firebase.google.com/docs/storage/web/download-files#web-version-9_2

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 willie80