Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buffer limit #83

Open
arthurgeron-work opened this issue Aug 2, 2022 · 4 comments
Open

Buffer limit #83

arthurgeron-work opened this issue Aug 2, 2022 · 4 comments
Labels
question Further information is requested

Comments

@arthurgeron-work
Copy link

I'm using this lib on react-native, it renders a feed (Youtube Shorts like) and I'd like to limite the bandwidth non-focused videos use, currently that's impossible because I can't set/limit the buffer size on the current params.
It'd be great to have this feature.

@maxstoller
Copy link
Contributor

maxstoller commented Aug 11, 2022

@maxstoller maxstoller added the question Further information is requested label Aug 11, 2022
@hirbod
Copy link
Contributor

hirbod commented Sep 26, 2022

@maxstoller could you please elaborate a little more about initialBufferDuration? I really couldn't measure anything when I played with values between 1-5. Should I set a value of 0 for non-focused players?

@maxstoller
Copy link
Contributor

Hi @hirbod,

The initialBufferDuration API controls how much video the player buffers before it starts playback.

Lower Value: Playback will start faster, but the viewer may experience more rebuffering due to the small buffer.
Higher Value: It will take longer for playback to start, but the viewer may experience less rebuffering due to the larger buffer.

I really couldn't measure anything when I played with values between 1-5.

You may not notice a difference on a fast connection.

Should I set a value of 0 for non-focused players?

The minimum is 100ms.

Can you share more info about your use case and goal?

@hirbod
Copy link
Contributor

hirbod commented Sep 26, 2022

@maxstoller thanks for the explanation. I created a TikTok/Instagram like reel. I have 3 videos pre-rendered (FlashList) and I want to prevent consuming too much bandwidth before the video is visible. I wasn't really sure what to pick. It's important for me that playback starts super fast without having to pre buffer too much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants