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

Issue with HLS Buffer in TrackPlayer - Playback Starting at Advanced #2348

Open
oraylan opened this issue Jul 29, 2024 · 2 comments
Open

Issue with HLS Buffer in TrackPlayer - Playback Starting at Advanced #2348

oraylan opened this issue Jul 29, 2024 · 2 comments
Labels

Comments

@oraylan
Copy link

oraylan commented Jul 29, 2024

Describe the Bug
Hello everyone,

I hope you all are doing well.

I'm seeking technical assistance regarding a challenge I've encountered while working on the implementation of TrackPlayer for streaming HLS (HTTP Live Streaming) from a radio station.

The main issue lies in managing the stream's buffer. Ideally, HLS maintains a buffer of around 50 seconds to ensure continuous and stable content playback. However, when using TrackPlayer, I notice that the buffer behavior differs from what is expected. Instead of starting playback from the first segment in the HLS playlist, it seems like the player begins at a midpoint. This reduces the effective delay to about 30 seconds, in contrast to the typical 50-second delay aimed to ensure transmission stability.

Note that in fact, the HLS server is configured to provide 50 seconds of buffer. That is, in m3u8, there are segments required for this purpose.

I've explored various settings available in the TrackPlayer setup, trying to adjust this behavior, but unfortunately, I have not observed any significant change. The player continues to start playback from a point far ahead in the segment playlist, not respecting the buffer structure I'm trying to establish.

Additionally, in an example of HLS.js for web, there is an option:

hlsInstance = new Hls({ startPosition: 0, });

This ensures that HLS does not start at a "random" point in the live stream, but rather at the beginning.

Please excuse me if the terminology I'm using is not the most accurate. I'm attempting to describe the problem as technically as possible, but I might have difficulties using the exact terms.

I appreciate in advance any guidance or suggestions you might offer to help resolve this challenge.

The HLS streaming I'm using is: https://hls.hunter.fm/rock/192.m3u8.

Environment Info:
Track Player 4.0.1
Android and iOS.

@oraylan oraylan added the Bug label Jul 29, 2024
@oraylan
Copy link
Author

oraylan commented Sep 9, 2024

Any help with this? :(

@lovegaoshi
Copy link
Contributor

iiwy id use googles exoplayer example https:/android/uamp and whatever apples equivalent is, try ur url and see if behavior is the same. if not then return to this lib. otherwise u have to harass google or apple instrad of here.

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

No branches or pull requests

2 participants