Demo entry 6864235

StMediaSourceLoadErrorHandlingPolicy

   

Submitted by anonymous on Aug 13, 2019 at 12:51
Language: Kotlin. Code size: 489 Bytes.

class StMediaSourceLoadErrorHandlingPolicy : DefaultLoadErrorHandlingPolicy() {

    override fun getRetryDelayMsFor(dataType: Int, loadDurationMs: Long, exception: IOException?, errorCount: Int): Long {
        return if (exception is FileDataSource.FileDataSourceException || exception is HttpDataSource.HttpDataSourceException) {
            C.TIME_UNSET
        } else {
            super.getRetryDelayMsFor(dataType, loadDurationMs, exception, errorCount)
        }
    }
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).