正在查看: Chaupal v3.2 应用的 b.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Chaupal v3.2 应用的 b.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package hd;
import android.content.Context;
import android.net.Uri;
import com.google.android.gms.cast.MediaInfo;
import com.google.android.gms.cast.MediaMetadata;
import com.google.android.gms.cast.MediaQueueItem;
import com.google.android.gms.cast.framework.CastSession;
import com.google.android.gms.cast.framework.media.RemoteMediaClient;
import com.google.android.gms.common.images.WebImage;
import com.yupptv.ott.MainActivity;
import com.yupptv.ottsdk.model.ContentPage;
import java.util.ArrayList;
import org.json.JSONException;
import org.json.JSONObject;
public class b {
public static b a;
public static Context b;
public static MediaInfo a(String str, String str2, String str3, String str4, int i, String str5, Object obj, String str6, String str7, String str8, String str9, String str10, JSONObject jSONObject) {
String str11;
String str12;
Object obj2;
JSONObject jSONObject2 = new JSONObject();
String str13 = "";
if (com.yupptv.ott.a.F) {
str11 = "";
str12 = str11;
} else {
str11 = str7;
str12 = str8;
}
if (str5 != null && str5.isEmpty()) {
str5.equalsIgnoreCase(e.a);
}
try {
String b2 = b(str6);
if (b2.trim().length() > 0) {
jSONObject2.put("type", b2);
try {
if (b2.equalsIgnoreCase("movie")) {
jSONObject2.put("data", new JSONObject(new com.google.gson.d().r(obj)));
Object obj3 = b;
if (obj3 != null && (obj3 instanceof MainActivity)) {
((MainActivity) obj3).n4(new JSONObject(new com.google.gson.d().r(obj)));
}
} else if ((obj instanceof ContentPage) && (obj2 = b) != null && (obj2 instanceof MainActivity)) {
((MainActivity) obj2).n4(new JSONObject(new com.google.gson.d().r(obj)));
}
} catch (Exception unused) {
}
} else {
jSONObject2.put("type", "none");
}
if (str6 != null && str6.trim().length() > 0) {
jSONObject2.put("metaDataId", str6);
}
jSONObject2.put("previewDuration", i);
if ((str11 != null && str11.trim().length() > 0) || str12.trim().length() > 0) {
jSONObject2.put("licenseUrl", str11);
} else if (str5 != null && str5.trim().length() > 0) {
jSONObject2.put("licenseUrl", str5);
}
if (str9 != null || str10 != null) {
JSONObject jSONObject3 = new JSONObject();
if (com.yupptv.ott.a.p) {
jSONObject3.put("customData", jSONObject);
Object obj4 = b;
if (((MainActivity) obj4) != null && ((MainActivity) obj4).C2() != null) {
str13 = ((MainActivity) b).C2();
}
jSONObject2.put("pollKey", str13);
jSONObject2.put("analytics_id", e0.Q(b.getApplicationContext()));
}
if (str9 != null) {
jSONObject3.put("sessionid", str9);
}
if (str10 != null) {
jSONObject3.put("token", str10);
}
jSONObject2.put("metadata", jSONObject3);
}
} catch (JSONException unused2) {
}
MediaMetadata mediaMetadata = new MediaMetadata(1);
if (str3 == null || str3.trim().length() <= 0) {
mediaMetadata.putString("com.google.android.gms.cast.metadata.TITLE", "not available");
} else {
mediaMetadata.putString("com.google.android.gms.cast.metadata.TITLE", str3);
}
if (str4 != null && str4.trim().length() > 0) {
mediaMetadata.putString("com.google.android.gms.cast.metadata.SUBTITLE", str4);
}
mediaMetadata.putString("com.google.android.gms.cast.metadata.STUDIO", "OTT");
if (str2 == null || str2.trim().length() <= 0) {
mediaMetadata.addImage(new WebImage(Uri.parse("http://ottapps.revlet.net/apps/androiddevices/default_poster.png")));
mediaMetadata.addImage(new WebImage(Uri.parse("http://ottapps.revlet.net/apps/androiddevices/default_poster.png")));
} else {
Uri parse = Uri.parse(str2);
mediaMetadata.addImage(new WebImage(parse));
mediaMetadata.addImage(new WebImage(parse));
}
return (str11 == null || str11.isEmpty()) ? (str12 == null || str12.length() <= 0) ? (str == null || !str.contains(".mpd")) ? new MediaInfo.Builder(str).setStreamType(1).setContentType("application/x-mpegurl").setCustomData(jSONObject2).setMetadata(mediaMetadata).build() : new MediaInfo.Builder(str).setStreamType(1).setContentType("application/dash+xml").setCustomData(jSONObject2).setMetadata(mediaMetadata).build() : new MediaInfo.Builder(str12).setStreamType(1).setContentType("application/x-mpegurl").setCustomData(jSONObject2).setMetadata(mediaMetadata).build() : new MediaInfo.Builder(str12).setStreamType(1).setContentType("application/dash+xml").setCustomData(jSONObject2).setMetadata(mediaMetadata).build();
}
public static String b(String str) {
if (str != null && !str.equalsIgnoreCase("")) {
if (str.contains("live")) {
return "live";
}
if (str.contains("movie")) {
return "movie";
}
}
return "none";
}
public static Object c(MediaInfo mediaInfo) throws JSONException {
if (mediaInfo == null) {
throw new JSONException("Media info is null");
}
JSONObject customData = mediaInfo.getCustomData();
if (customData == null || !customData.has("data")) {
return null;
}
return customData.getString("data");
}
public static String d(MediaInfo mediaInfo) throws JSONException {
if (mediaInfo == null) {
throw new JSONException("Media info is null");
}
JSONObject customData = mediaInfo.getCustomData();
return (customData == null || !customData.has("metaDataId")) ? "none" : customData.getString("metaDataId");
}
public static b e(Context context) {
if (a == null) {
b = context;
a = new b();
}
return a;
}
public static String f(Object obj) {
return "OTTTV";
}
public static String g(Object obj) {
return "OTTTV";
}
public static void h(CastSession castSession, String str, String str2, long j, String str3, String str4, int i, String str5, Object obj, String str6, String str7, String str8, String str9, String str10, JSONObject jSONObject) {
h.b("TAG", "loadRemoteMedia : enter");
if (castSession == null) {
return;
}
a0.y(b).C("chromecast_stopped", Boolean.FALSE);
RemoteMediaClient remoteMediaClient = castSession.getRemoteMediaClient();
if (remoteMediaClient == null) {
return;
}
remoteMediaClient.load(a(str, str2, str3, str4, i, str5, obj, str6, str7, str8, str9, str10, jSONObject), true, j);
}
public static void i(CastSession castSession, ArrayList<String> arrayList, String str, long j, String str2, String str3, int i, int i2, String str4, Object obj, String str5, String str6, String str7, String str8, String str9, JSONObject jSONObject) {
h.b("TAG", "playingUrl : " + arrayList);
if (castSession == null) {
return;
}
a0.y(b).C("chromecast_stopped", Boolean.FALSE);
RemoteMediaClient remoteMediaClient = castSession.getRemoteMediaClient();
if (remoteMediaClient == null) {
return;
}
MediaQueueItem[] mediaQueueItemArr = new MediaQueueItem[arrayList.size()];
for (int i3 = i; i3 < arrayList.size(); i3++) {
try {
mediaQueueItemArr[i3] = new MediaQueueItem.Builder(a(arrayList.get(i3), str, str2, str3, i2, str4, obj, str5, str6, str7, str8, str9, jSONObject)).build();
} catch (Exception unused) {
}
}
remoteMediaClient.queueLoad(mediaQueueItemArr, i, 0, j, (JSONObject) null);
}
public static void j(CastSession castSession) {
RemoteMediaClient remoteMediaClient;
if (castSession == null || (remoteMediaClient = castSession.getRemoteMediaClient()) == null) {
return;
}
remoteMediaClient.stop();
a0.y(b).C("chromecast_stopped", Boolean.TRUE);
}
}