mirror of
https://github.com/revanced/revanced-integrations.git
synced 2024-11-27 22:36:51 +01:00
fix(YouTube): Fix video playback by switching to ReVanced GmsCore vendor (#589)
This commit is contained in:
parent
96a1e4680d
commit
6e947e24c2
@ -1,20 +1,18 @@
|
|||||||
package app.revanced.integrations.youtube.patches;
|
package app.revanced.integrations.youtube.patches;
|
||||||
|
|
||||||
import static app.revanced.integrations.shared.StringRef.str;
|
|
||||||
|
|
||||||
import android.app.SearchManager;
|
import android.app.SearchManager;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
|
|
||||||
import androidx.annotation.RequiresApi;
|
import androidx.annotation.RequiresApi;
|
||||||
|
import app.revanced.integrations.shared.Logger;
|
||||||
|
import app.revanced.integrations.shared.Utils;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import app.revanced.integrations.shared.Logger;
|
import static app.revanced.integrations.shared.StringRef.str;
|
||||||
import app.revanced.integrations.shared.Utils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @noinspection unused
|
* @noinspection unused
|
||||||
@ -61,9 +59,8 @@ public class GmsCoreSupport {
|
|||||||
|
|
||||||
private static String getGmsCoreDownloadLink() {
|
private static String getGmsCoreDownloadLink() {
|
||||||
final var vendor = getGmsCoreVendor();
|
final var vendor = getGmsCoreVendor();
|
||||||
|
//noinspection SwitchStatementWithTooFewBranches
|
||||||
switch (vendor) {
|
switch (vendor) {
|
||||||
case "com.mgoogle":
|
|
||||||
return "https://github.com/TeamVanced/VancedMicroG/releases/latest";
|
|
||||||
case "app.revanced":
|
case "app.revanced":
|
||||||
return "https://github.com/revanced/gmscore/releases/latest";
|
return "https://github.com/revanced/gmscore/releases/latest";
|
||||||
default:
|
default:
|
||||||
|
@ -1,26 +1,25 @@
|
|||||||
package app.revanced.integrations.youtube.patches.spoof;
|
package app.revanced.integrations.youtube.patches.spoof;
|
||||||
|
|
||||||
import static app.revanced.integrations.youtube.patches.spoof.requests.StoryboardRendererRequester.getStoryboardRenderer;
|
|
||||||
import static app.revanced.integrations.shared.Utils.containsAny;
|
|
||||||
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
import app.revanced.integrations.shared.Logger;
|
||||||
|
import app.revanced.integrations.shared.Utils;
|
||||||
|
import app.revanced.integrations.youtube.patches.VideoInformation;
|
||||||
|
import app.revanced.integrations.youtube.settings.Settings;
|
||||||
|
import app.revanced.integrations.youtube.shared.PlayerType;
|
||||||
|
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.concurrent.Future;
|
import java.util.concurrent.Future;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.TimeoutException;
|
import java.util.concurrent.TimeoutException;
|
||||||
|
|
||||||
import app.revanced.integrations.youtube.patches.VideoInformation;
|
import static app.revanced.integrations.shared.Utils.containsAny;
|
||||||
import app.revanced.integrations.youtube.settings.Settings;
|
import static app.revanced.integrations.youtube.patches.spoof.requests.StoryboardRendererRequester.getStoryboardRenderer;
|
||||||
import app.revanced.integrations.youtube.shared.PlayerType;
|
|
||||||
import app.revanced.integrations.shared.Logger;
|
|
||||||
import app.revanced.integrations.shared.Utils;
|
|
||||||
|
|
||||||
/** @noinspection unused*/
|
/** @noinspection unused*/
|
||||||
|
@Deprecated
|
||||||
public class SpoofSignaturePatch {
|
public class SpoofSignaturePatch {
|
||||||
/**
|
/**
|
||||||
* Parameter (also used by
|
* Parameter (also used by
|
||||||
|
@ -4,6 +4,7 @@ import androidx.annotation.Nullable;
|
|||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public final class StoryboardRenderer {
|
public final class StoryboardRenderer {
|
||||||
@Nullable
|
@Nullable
|
||||||
private final String spec;
|
private final String spec;
|
||||||
|
@ -10,6 +10,7 @@ import org.json.JSONObject;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
final class PlayerRoutes {
|
final class PlayerRoutes {
|
||||||
private static final String YT_API_URL = "https://www.youtube.com/youtubei/v1/";
|
private static final String YT_API_URL = "https://www.youtube.com/youtubei/v1/";
|
||||||
static final Route.CompiledRoute GET_STORYBOARD_SPEC_RENDERER = new Route(
|
static final Route.CompiledRoute GET_STORYBOARD_SPEC_RENDERER = new Route(
|
||||||
|
@ -19,6 +19,7 @@ import java.util.Objects;
|
|||||||
import static app.revanced.integrations.shared.StringRef.str;
|
import static app.revanced.integrations.shared.StringRef.str;
|
||||||
import static app.revanced.integrations.youtube.patches.spoof.requests.PlayerRoutes.*;
|
import static app.revanced.integrations.youtube.patches.spoof.requests.PlayerRoutes.*;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public class StoryboardRendererRequester {
|
public class StoryboardRendererRequester {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user