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 am using Exoplayer 2.16.1 in my application. I am trying to control number of segment calls during download for offline playback.
I am trying to control the number of segment API calls in case of HTTP error using custom LoadErrorHandlingPolicy.
This is the high level flow.
val errorHandlingPolicy = CustomDownloadErrorHandlingPolicy(maxRetryCount)
val factory = DashMediaSource.Factory(dataSourceFactory)
val mediaSource = factory
.setLoadErrorHandlingPolicy(errorHandlingPolicy)
.createMediaSource(mediaItem)
val downloadHelper = DownloadHelper(
mediaItem,
mediaSource,
DefaultTrackSelector.Parameters.DEFAULT_WITHOUT_CONTEXT,
DownloadHelper.getRendererCapabilities(DefaultRenderersFactory(context))
downloadHelper.prepare(this@DownloadPrepareHelper)
I observed that if there is some HTTP error for manifest request, the overridden method of my CustomDownloadErrorHandlingPolicy object is called. (getMinimumLoadableRetryCount(), getRetryDelayMsFor() etc.)
But if there is some error for Segment requests, the callbacks are not getting called. The Exoplayer is trying ~4 times and then throwing error.
With this I am not able to set the right retry count.
Is there a way to set the LoadErrorHandlingPolicy for segments? Or is it a bug in Exoplayer?
The text was updated successfully, but these errors were encountered:
tonihei
changed the title
Why LoadErrorHandlingPolicy is not applied for Downloads/Offline media segment requests?
Use LoadErrorHandlingPolicy for Downloads/Offline media segment requests
Jan 24, 2025
I am using Exoplayer 2.16.1 in my application. I am trying to control number of segment calls during download for offline playback.
I am trying to control the number of segment API calls in case of HTTP error using custom
LoadErrorHandlingPolicy
.This is the high level flow.
I observed that if there is some HTTP error for manifest request, the overridden method of my CustomDownloadErrorHandlingPolicy object is called. (
getMinimumLoadableRetryCount()
,getRetryDelayMsFor()
etc.)But if there is some error for Segment requests, the callbacks are not getting called. The Exoplayer is trying ~4 times and then throwing error.
With this I am not able to set the right retry count.
Is there a way to set the LoadErrorHandlingPolicy for segments? Or is it a bug in Exoplayer?
The text was updated successfully, but these errors were encountered: