1

Is there a way to pull a video file from Firebase Storage without pulling the whole thing at once? Like youtube does it loads only the pieces the user watches then some. I do not want to load a w hole 50mb file and make the user wait for it just for them to move on.

What can I do in flutter using Firebase Storage?

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Zach Gonzalez
  • 792
  • 7
  • 16

1 Answers1

2

Check out this question here: Firebase Storage Video Streaming

To achieve exactly what you're looking for you would have to upload your video in many different chunks and download them one by one.

And according to this answer on that post you can start streaming before the video is fully loaded, but it will still attempt to download the entire file.

While it is possible to achieve what you're trying to do with Firebase, this isn't really what cloud storage is meant for. If you want to achieve YouTube style loading as you go you should look into a dedicated video streaming service such as ziggeo

Another option, depending on your needs, would be to upload your videos to YouTube and stream them directly from your app.

Hydra
  • 950
  • 4
  • 7
  • Thank you this is more is what I am looking for. Will the youtube Api let me upload videos under one account as unlisted and play them? – Zach Gonzalez Sep 20 '21 at 00:20
  • @ZachGonzalez you could upload your videos to a single youtube account via your backend server that contains your API credentials and then save the URL to your database. To learn more about the YouTube API limitations check this out https://developers.google.com/youtube/v3/getting-started – Hydra Sep 20 '21 at 00:59