How to stop flutter video player from buffering when video reaches a certain percentaje?
Asked Answered
H

0

6

I'm using the video_player plugin in flutter combined with Firebase and I just realized that a video could consume my whole Firebase bandwith If I let it play for a few seconds. So I think (correct me if I'm wrong please!) that the best idea is to stop buffering when it reaches a certain amount, for example the 5% of the video or the first 5 seconds of the video, but if someone has a super fast download speed they can get the whole video in the first 3 seconds, so that would consume the limit no matter what.

Is there a way to do this? To know when the amount buffered is enough to play like 5 seconds and then stop the buffering? Maybe with another plugin?

EDIT 1: Or does video_player just streams data as it comes, not prebuffering? if this is the case then with just closing the video player is enough to limit the amount of data retrieved, right?

Thanks in advance for any idea about this!

Homing answered 27/2, 2021 at 16:9 Comment(2)
Did you find any solution to this problem?Lesbos
Nop, I didn't. The thing I ended up doing was to just play the first 3 seconds of the video in a small preview windowHoming

© 2022 - 2024 — McMap. All rights reserved.