added: documentations on lifecycles for FailedMediaSource and LoadedMediaSource.

fixed: onPlaybackSynchronize to rewind when not playing, which was incorrectly removed in previous commit.
fixed: sonar and checkstyle issues.
This commit is contained in:
karyogamy
2022-03-19 22:40:32 -04:00
parent 69646e5b5d
commit b81eb35f3d
8 changed files with 122 additions and 63 deletions
@@ -1,6 +1,5 @@
package org.schabi.newpipe.player.mediaitem;
import org.schabi.newpipe.extractor.stream.StreamInfo;
import org.schabi.newpipe.extractor.stream.StreamType;
import org.schabi.newpipe.util.Constants;
@@ -74,16 +73,6 @@ public final class PlaceholderTag implements MediaItemTag {
return StreamType.NONE;
}
@Override
public Optional<StreamInfo> getMaybeStreamInfo() {
return Optional.empty();
}
@Override
public Optional<Quality> getMaybeQuality() {
return Optional.empty();
}
@Override
public <T> Optional<T> getMaybeExtras(@NonNull final Class<T> type) {
return Optional.ofNullable(extras).map(type::cast);