As many other people we are often the victim of misconfigured CDNs, overloaded CDNs or problems with origin. Its for this reason we like to track when segments fail (or even manifest) to download and include information such as response headers, status codes, uris. This is possible for an online streaming session (MediaSourceEventListener / AnalyticsListener) but not during download for an offline playback session.
Proposed solution
Add:
com.google.android.exoplayer2.offline.DownloadManager#addDownloadAnalyticsListener
public interface DownloadAnalyticsListener {
default void onLoadError(DownloadManager downloadManager, Download download, int windowIndex, MediaSource.MediaPeriodId mediaPeriodId, MediaSourceEventListener.LoadEventInfo loadEventInfo, MediaSourceEventListener.MediaLoadData mediaLoadData, IOException error, boolean wasCanceled) { }
default void onLoadStarted(DownloadManager downloadManager, Download download, int windowIndex, MediaSource.MediaPeriodId mediaPeriodId, MediaSourceEventListener.LoadEventInfo loadEventInfo, MediaSourceEventListener.MediaLoadData mediaLoadData) { }
default void onLoadCompleted(DownloadManager downloadManager, Download download, int windowIndex, MediaSource.MediaPeriodId mediaPeriodId, MediaSourceEventListener.LoadEventInfo loadEventInfo, MediaSourceEventListener.MediaLoadData mediaLoadData) { }
}
Alternatives considered
We have considered using an OKHttpDatasourceFactory with TransferListener to mitigate this need.
As many other people we are often the victim of misconfigured CDNs, overloaded CDNs or problems with origin. Its for this reason we like to track when segments fail (or even manifest) to download and include information such as response headers, status codes, uris. This is possible for an online streaming session (MediaSourceEventListener / AnalyticsListener) but not during download for an offline playback session.
Proposed solution
Add:
com.google.android.exoplayer2.offline.DownloadManager#addDownloadAnalyticsListenerAlternatives considered
We have considered using an OKHttpDatasourceFactory with TransferListener to mitigate this need.