Is it possibile to customize buffering?
0Franky opened this issue · 6 comments
Hi @alexmercerind,
as the title suggests, I wanted to know if it is possible to perform a custom buffering.
In particular I need to be able to perform a sequential fetching in different qualities from my CDN.
I must therefore do a fetch to a different url (qualities) keeping the buffering already performed and passing as parameters the starting bytes and ending bytes to be buffered over.
The desired behavior is like loading an m3u playlist made up of several "controllable" .ts files.
I wanted to ask if this exists or it is possible to create a loading function like Media.stream
Thanks again for your contribution!
Hey @0Franky, How did you achieve buffering in the first place? I am having a hard time figuring it out.
Hi @rishirizz,
thanks for your helping.
I try to explain me better.
Currently I'm using this to connect to the server and start streaming:
_vlcController.open(Media.network(url_480p));
This work well if I have a single quality (e.g. 480p or 1080p).
In my case I need to switch quality (and so the url) based on network performance.
I could initialize again the videoplayer controller and seek to the current position, but in this case I'd make a sort of lag to the user.
What I want is to switch quality urls in just one single stream.
I hope it's more clear and thanks again.
So, are using the controller in the initState
and keep listening to the changes made?
What do you mean with "changes"?
I'm not currently making any changes.
I choose a quality and it stays fixed unless the user changes it.
I'm trying to do the above, that is to dynamically change the quality without however lost what I've buffered so far.
Yes, got it. Thanks :D
My idea was to read byte chunks via the Dio plug-in with an http request.
So I am able to make the necessary requests to my server, avoiding a server overload (I avoid the whole upload of my video from start to finish, but short parts at a time, according to the desired quality).
In this case I don't know how to get vlc to read a byte stream created by me.