extensions/mmt/src/main/java/com/nextgenbroadcast/mmt/exoplayer2/ext/MMTMediaPeriod.java
private boolean configureRetry(ExtractingLoadable loadable, int currentExtractedSampleCount) {
        if (length != C.LENGTH_UNSET
                || (seekMap != null && seekMap.getDurationUs() != C.TIME_UNSET)) {
            // We're playing an on-demand stream. Resume the current loadable, which will
            // request data starting from the point it left off.
            extractedSamplesCountAtStartOfLoad = currentExtractedSampleCount;
            return true;
        } else if (prepared && !suppressRead()) {
            // We're playing a stream of unknown length and duration. Assume it's live, and therefore that
            // the data at the uri is a continuously shifting window of the latest available media. For
            // this case there's no way to continue loading from where a previous load finished, so it's
            // necessary to load from the start whenever commencing a new load. Deferring the retry until
            // we run out of buffered data makes for a much better user experience. See:
            // https://github.com/google/ExoPlayer/issues/1606.
            // Note that the suppressRead() check means only a single deferred retry can occur without
            // progress being made. Any subsequent failures without progress will go through the else
            // block below.
            pendingDeferredRetry = true;
            return false;
        } else {
            // This is the same case as above, except in this case there's no value in deferring the retry
            // because there's no buffered data to be read. This case also covers an on-demand stream with
            // unknown length that has yet to be prepared. This case cannot be disambiguated from the live
            // stream case, so we have no option but to load from the start.
            notifyDiscontinuity = prepared;
            lastSeekPositionUs = 0;
            extractedSamplesCountAtStartOfLoad = 0;
            for (SampleQueue sampleQueue : sampleQueues) {
                sampleQueue.reset();
            }
            loadable.setLoadPosition(0, 0);
            return true;
        }
    }
/**
     * Called to configure a retry when a load error occurs.
     *
     * @param loadable                    The current loadable for which the error was encountered.
     * @param currentExtractedSampleCount The current number of samples that have been extracted into
     *                                    the sample queues.
     * @return Whether the loader should retry with the current loadable. False indicates a deferred
     * retry.
     */
Called to configure a retry when a load error occurs.
@param loadable                    The current loadable for which the error was encountered.
@param currentExtractedSampleCount The current number of samples that have been extracted into
the sample queues.
@return Whether the loader should retry with the current loadable. False indicates a deferred
retry.
Called to configure a retry when a load error occurs . @param loadable The current loadable for which the error was encountered . @param currentExtractedSampleCount The current number of samples that have been extracted into the sample queues . @return Whether the loader should retry with the current loadable . False indicates a deferred retry .
private boolean configureRetry(ExtractingLoadable loadable, int currentExtractedSampleCount) {
        if (length != C.LENGTH_UNSET
                || (seekMap != null && seekMap.getDurationUs() != C.TIME_UNSET)) {
            extractedSamplesCountAtStartOfLoad = currentExtractedSampleCount;
            return true;
        } else if (prepared && !suppressRead()) {
            pendingDeferredRetry = true;
            return false;
        } else {
            notifyDiscontinuity = prepared;
            lastSeekPositionUs = 0;
            extractedSamplesCountAtStartOfLoad = 0;
            for (SampleQueue sampleQueue : sampleQueues) {
                sampleQueue.reset();
            }
            loadable.setLoadPosition(0, 0);
            return true;
        }
    }
private boolean configureRetry ( ExtractingLoadable loadable , int currentExtractedSampleCount ) { if ( length != C . LENGTH_UNSET || ( seekMap != null && seekMap . getDurationUs ( ) != C . TIME_UNSET ) ) { extractedSamplesCountAtStartOfLoad = currentExtractedSampleCount ; return true ; } else if ( prepared && ! suppressRead ( ) ) { pendingDeferredRetry = true ; return false ; } else { notifyDiscontinuity = prepared ; lastSeekPositionUs = 0 ; extractedSamplesCountAtStartOfLoad = 0 ; for ( SampleQueue sampleQueue : sampleQueues ) { sampleQueue . reset ( ) ; } loadable . setLoadPosition ( 0 , 0 ) ; return true ; } }
Called to configure a retry when a load error occurs.
Called to configure a retry when a load error occurs .
// We're playing an on-demand stream. Resume the current loadable, which will // request data starting from the point it left off. // We're playing a stream of unknown length and duration. Assume it's live, and therefore that // the data at the uri is a continuously shifting window of the latest available media. For // this case there's no way to continue loading from where a previous load finished, so it's // necessary to load from the start whenever commencing a new load. Deferring the retry until // we run out of buffered data makes for a much better user experience. See: // https://github.com/google/ExoPlayer/issues/1606. // Note that the suppressRead() check means only a single deferred retry can occur without // progress being made. Any subsequent failures without progress will go through the else // block below. // This is the same case as above, except in this case there's no value in deferring the retry // because there's no buffered data to be read. This case also covers an on-demand stream with // unknown length that has yet to be prepared. This case cannot be disambiguated from the live // stream case, so we have no option but to load from the start.