Kredit Buddy v1.0.3版本的 MD5 值为:f4b596abe8f2517a065859e5f8fec243
以下内容为反编译后的 IFramePlayerOptions.java 源代码,内容仅作参考
package com.pierfrancescosoffritti.androidyoutubeplayer.core.player.options;
import kotlin.Metadata;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;
import org.json.JSONException;
import org.json.JSONObject;
@Metadata
public final class IFramePlayerOptions {
public static final Companion Companion = new Companion(null);
@NotNull
private static final IFramePlayerOptions f0default = new Builder().build();
private final JSONObject playerOptions;
@Metadata
public static final class Builder {
private static final String AUTO_PLAY = "autoplay";
private static final String CC_LANG_PREF = "cc_lang_pref";
private static final String CC_LOAD_POLICY = "cc_load_policy";
private static final String CONTROLS = "controls";
public static final Companion Companion = new Companion(null);
private static final String ENABLE_JS_API = "enablejsapi";
private static final String FS = "fs";
private static final String IV_LOAD_POLICY = "iv_load_policy";
private static final String MODEST_BRANDING = "modestbranding";
@NotNull
public static final String ORIGIN = "origin";
private static final String REL = "rel";
private static final String SHOW_INFO = "showinfo";
private final JSONObject builderOptions = new JSONObject();
@Metadata
public static final class Companion {
private Companion() {
}
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
}
public Builder() {
addInt(AUTO_PLAY, 0);
addInt(CONTROLS, 0);
addInt(ENABLE_JS_API, 1);
addInt(FS, 0);
addString(ORIGIN, "https://www.youtube.com");
addInt(REL, 0);
addInt(SHOW_INFO, 0);
addInt(IV_LOAD_POLICY, 3);
addInt(MODEST_BRANDING, 1);
addInt(CC_LOAD_POLICY, 0);
}
private final void addInt(String str, int i2) {
try {
this.builderOptions.put(str, i2);
} catch (JSONException unused) {
throw new RuntimeException("Illegal JSON value " + str + ": " + i2);
}
}
private final void addString(String str, String str2) {
try {
this.builderOptions.put(str, str2);
} catch (JSONException unused) {
throw new RuntimeException("Illegal JSON value " + str + ": " + str2);
}
}
@NotNull
public final IFramePlayerOptions build() {
return new IFramePlayerOptions(this.builderOptions, null);
}
@NotNull
public final Builder ccLoadPolicy(int i2) {
addInt(CC_LOAD_POLICY, i2);
return this;
}
@NotNull
public final Builder controls(int i2) {
addInt(CONTROLS, i2);
return this;
}
@NotNull
public final Builder ivLoadPolicy(int i2) {
addInt(IV_LOAD_POLICY, i2);
return this;
}
@NotNull
public final Builder langPref(@NotNull String languageCode) {
Intrinsics.g(languageCode, "languageCode");
addString(CC_LANG_PREF, languageCode);
return this;
}
@NotNull
public final Builder origin(@NotNull String origin) {
Intrinsics.g(origin, "origin");
addString(ORIGIN, origin);
return this;
}
@NotNull
public final Builder rel(int i2) {
addInt(REL, i2);
return this;
}
}
@Metadata
public static final class Companion {
private Companion() {
}
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
@NotNull
public final IFramePlayerOptions getDefault() {
return IFramePlayerOptions.f0default;
}
}
private IFramePlayerOptions(JSONObject jSONObject) {
this.playerOptions = jSONObject;
}
@NotNull
public final String getOrigin$core_release() {
String string = this.playerOptions.getString(Builder.ORIGIN);
Intrinsics.b(string, "playerOptions.getString(Builder.ORIGIN)");
return string;
}
@NotNull
public String toString() {
String jSONObject = this.playerOptions.toString();
Intrinsics.b(jSONObject, "playerOptions.toString()");
return jSONObject;
}
public IFramePlayerOptions(JSONObject jSONObject, DefaultConstructorMarker defaultConstructorMarker) {
this(jSONObject);
}
}