player: embed fixes

This commit is contained in:
Yuriy Liskov
2025-06-02 01:40:16 +03:00
parent 0d40668257
commit ff4aec3f77
2 changed files with 5 additions and 3 deletions

View File

@@ -765,11 +765,11 @@ public class VideoLoaderController extends BasePlayerController {
}
private boolean acceptDashVideo(MediaItemFormatInfo formatInfo) {
if ((getPlayerData().isLegacyCodecsForced() || isEmbedPlayer()) && formatInfo.containsUrlFormats()) {
if (getPlayerData().isLegacyCodecsForced() && formatInfo.containsUrlFormats()) {
return false;
}
if ((getPlayerTweaksData().isHlsStreamsForced() || isEmbedPlayer()) && formatInfo.isLive() && formatInfo.containsHlsUrl()) {
if (getPlayerTweaksData().isHlsStreamsForced() && formatInfo.isLive() && formatInfo.containsHlsUrl()) {
return false;
}
@@ -792,7 +792,7 @@ public class VideoLoaderController extends BasePlayerController {
}
private boolean acceptDashLive(MediaItemFormatInfo formatInfo) {
if ((getPlayerTweaksData().isHlsStreamsForced() || isEmbedPlayer()) && formatInfo.isLive() && formatInfo.containsHlsUrl()) {
if (getPlayerTweaksData().isHlsStreamsForced() && formatInfo.isLive() && formatInfo.containsHlsUrl()) {
return false;
}

View File

@@ -5,6 +5,7 @@ import android.app.Activity;
import android.content.Context;
import com.liskovsoft.mediaserviceinterfaces.data.MediaItemMetadata;
import com.liskovsoft.smartyoutubetv2.common.app.models.data.Playlist;
import com.liskovsoft.smartyoutubetv2.common.app.models.data.Video;
import com.liskovsoft.smartyoutubetv2.common.app.models.playback.BasePlayerController;
import com.liskovsoft.smartyoutubetv2.common.app.models.playback.controllers.AutoFrameRateController;
@@ -211,6 +212,7 @@ public class PlaybackPresenter extends BasePresenter<PlaybackView> implements Pl
// E.g. when the user pressed back on the Channel content screen
if (view != null && view.getVideo() != null && isNewVideoExpired()) {
mVideo = new WeakReference<>(view.getVideo());
Playlist.instance().add(view.getVideo()); // don't show queue
}
}