You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using ExoPlayer for audio only, HLS streams. As such, we can buffer quite a bit of audio which we want to continue playing even if the network drops or the device is put into airplane mode. In general that works fine, but there are a couple of no-network scenarios I'm trying to handle:
Play through buffer
Attempt to seek
My approach so far has been to register listeners with DefaultLoadControl and HlsSampleSource and to move my player into something similar to a buffering state when a load error is encountered. This solves the specific use cases I mentioned, but it doesn't give me very granular understanding of why loading failed.
I realize that to some extent these are business / presentation layer concerns, but I'm wondering if there are recommended ways to address them in the context of ExoPlayer? For example, are there any ways to pause and resume loading? Is there a way to get a 'low buffer' warning before the loader kicks in?
Any insights are greatly appreciated.
The text was updated successfully, but these errors were encountered:
I'm a little confused. Are you basically saying that you don't want playback to fail, ever, even if there's no network? Specifically, you'd rather the player enter an indefinite buffering state until network is restored?
That is essentially how I have it coded right now, but it's clearly not ideal. Focusing just on the scenario of playing out the buffer with no network: is there a way you would recommend monitoring the buffers so that we can stop playback if they drop below a critical level and we don't have a network to load more?
You could probably stop the player from failing by passing a large value as minLoadableRetryCount to the HlsChunkSource constructor. You don't need to do anything special to have the player enter a buffering state when the buffer runs out; it'll do this automatically. So I think passing a large minLoadableRetryCount is all you'd need to do to achieve what you want.
I'm using ExoPlayer for audio only, HLS streams. As such, we can buffer quite a bit of audio which we want to continue playing even if the network drops or the device is put into airplane mode. In general that works fine, but there are a couple of no-network scenarios I'm trying to handle:
My approach so far has been to register listeners with DefaultLoadControl and HlsSampleSource and to move my player into something similar to a buffering state when a load error is encountered. This solves the specific use cases I mentioned, but it doesn't give me very granular understanding of why loading failed.
I realize that to some extent these are business / presentation layer concerns, but I'm wondering if there are recommended ways to address them in the context of ExoPlayer? For example, are there any ways to pause and resume loading? Is there a way to get a 'low buffer' warning before the loader kicks in?
Any insights are greatly appreciated.
The text was updated successfully, but these errors were encountered: