整点视频 v3.3.0版本的 MD5 值为:cba0457dc37421eed445b30f92de25d3
以下内容为反编译后的 o.java 源代码,内容仅作参考
package com.sigmob.sdk.mraid;
import android.content.Context;
import android.view.View;
import android.widget.FrameLayout;
import com.baidu.mobads.sdk.api.IAdInterListener;
import com.czhj.sdk.common.utils.Dips;
import com.czhj.sdk.logger.SigmobLog;
import com.sigmob.sdk.mraid.j;
import org.json.JSONObject;
public class o extends j implements j.a {
public static final int c = 0;
public static final int d = 1;
public static final int e = 2;
public static final int f = 3;
public static final int g = 4;
public static final int h = 0;
public static final int i = 1;
public static final int j = 2;
public static final int k = 4;
public static final int l = 8;
private m m;
private Context n;
private a o;
static class AnonymousClass2 {
static final int[] a;
static {
int[] iArr = new int[com.sigmob.sdk.videoplayer.e.values().length];
a = iArr;
try {
iArr[com.sigmob.sdk.videoplayer.e.STATE_PREPARED.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
a[com.sigmob.sdk.videoplayer.e.STATE_ERROR.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
a[com.sigmob.sdk.videoplayer.e.STATE_PAUSE.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
a[com.sigmob.sdk.videoplayer.e.STATE_PLAYING.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
a[com.sigmob.sdk.videoplayer.e.STATE_AUTO_COMPLETE.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
a[com.sigmob.sdk.videoplayer.e.STATE_PREPARING.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
a[com.sigmob.sdk.videoplayer.e.STATE_BUFFERING_START.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
try {
a[com.sigmob.sdk.videoplayer.e.STATE_BUFFERING_END.ordinal()] = 8;
} catch (NoSuchFieldError unused8) {
}
try {
a[com.sigmob.sdk.videoplayer.e.STATE_STOP.ordinal()] = 9;
} catch (NoSuchFieldError unused9) {
}
}
}
public interface a {
void a(String str, int i);
void a(String str, int i, String str2);
void a(String str, long j);
void a(String str, long j, int i, int i2);
void a(String str, long j, long j2);
void b(String str, int i);
}
public o(String str) {
super(str);
}
@Override
public void a(Context context, JSONObject jSONObject) {
m mVar = new m(context);
this.m = mVar;
mVar.setVideoPlayerStatusListener(new com.sigmob.sdk.videoplayer.l() {
@Override
public void a(long j2, long j3) {
if (o.this.o != null) {
o.this.o.a(o.this.a, j2, j3);
}
}
@Override
public void a(com.sigmob.sdk.videoplayer.e eVar) {
a aVar;
String str;
SigmobLog.d("VIDEO_PLAYER_STATE change: " + eVar);
int i2 = 1;
switch (AnonymousClass2.a[eVar.ordinal()]) {
case 1:
if (o.this.o != null) {
o.this.o.a(o.this.a, o.this.m.getDuration(), o.this.m.getVideoWidth(), o.this.m.getVideoHeight());
}
if (o.this.o != null) {
o.this.o.b(o.this.a, 2);
}
if (o.this.o != null) {
o.this.o.b(o.this.a, 4);
return;
}
return;
case 2:
if (o.this.o != null) {
o.this.o.a(o.this.a, o.this.m.getErrorCode(), o.this.m.getErrorMessage());
return;
}
return;
case 3:
if (o.this.o != null) {
o.this.o.a(o.this.a, 2);
return;
}
return;
case 4:
if (o.this.o != null) {
o.this.o.a(o.this.a, 1);
return;
}
return;
case 5:
if (o.this.o != null) {
a aVar2 = o.this.o;
o oVar = o.this;
aVar2.a(oVar.a, oVar.m.getDuration(), o.this.m.getDuration());
a aVar3 = o.this.o;
o oVar2 = o.this;
aVar3.a(oVar2.a, oVar2.m.getDuration());
return;
}
return;
case 6:
if (o.this.o != null) {
aVar = o.this.o;
str = o.this.a;
break;
} else {
return;
}
case 7:
if (o.this.o != null) {
o.this.m.j();
aVar = o.this.o;
str = o.this.a;
i2 = 8;
break;
} else {
return;
}
case 8:
if (o.this.o != null) {
o.this.m.d();
o.this.o.b(o.this.a, 2);
return;
}
return;
case 9:
if (o.this.o != null) {
o.this.o.a(o.this.a, 4);
return;
}
return;
default:
return;
}
aVar.b(str, i2);
}
});
}
public void a(a aVar) {
this.o = aVar;
}
@Override
public void a(JSONObject jSONObject) {
if (this.m != null) {
String optString = jSONObject.optString("URL");
if (jSONObject.optBoolean("proxy", false) && optString != null && optString.startsWith("http") && !optString.startsWith("http://127.0.0.1")) {
optString = com.sigmob.sdk.base.common.g.c().a(optString);
}
this.m.setUp(optString);
this.m.n();
}
}
@Override
public View b() {
return this.m;
}
@Override
public void b(JSONObject jSONObject) {
m mVar = this.m;
if (mVar != null) {
mVar.d();
}
}
@Override
public void c() {
m mVar = this.m;
if (mVar != null) {
com.sigmob.sdk.base.utils.d.a(mVar);
this.m.removeAllViews();
this.m.r();
this.m = null;
}
}
@Override
public void c(JSONObject jSONObject) {
m mVar = this.m;
if (mVar != null) {
mVar.a(0);
this.m.d();
}
}
@Override
public void d(JSONObject jSONObject) {
m mVar = this.m;
if (mVar != null) {
mVar.j();
}
}
@Override
public void e(JSONObject jSONObject) {
m mVar = this.m;
if (mVar != null) {
mVar.i();
}
}
@Override
public void f(JSONObject jSONObject) {
if (this.m != null) {
this.m.setMute(jSONObject.optBoolean("muted", false));
}
}
@Override
public void g(JSONObject jSONObject) {
if (this.m != null) {
this.m.a(((int) jSONObject.optDouble("seekTime", 0.0d)) * 1000);
}
}
@Override
public void h(JSONObject jSONObject) {
if (this.m != null) {
JSONObject optJSONObject = jSONObject.optJSONObject("frame");
int optDouble = (int) optJSONObject.optDouble("x", 0.0d);
int optDouble2 = (int) optJSONObject.optDouble("y", 0.0d);
int optDouble3 = (int) optJSONObject.optDouble(IAdInterListener.AdReqParam.WIDTH, -1.0d);
int optDouble4 = (int) optJSONObject.optDouble(IAdInterListener.AdReqParam.HEIGHT, -1.0d);
if (optDouble3 > 0) {
optDouble3 = Dips.dipsToIntPixels(optDouble3, com.sigmob.sdk.b.e());
}
if (optDouble4 > 0) {
optDouble4 = Dips.dipsToIntPixels(optDouble4, com.sigmob.sdk.b.e());
}
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(optDouble3, optDouble4);
this.m.setX(Dips.dipsToIntPixels(optDouble, com.sigmob.sdk.b.e()));
this.m.setY(Dips.dipsToIntPixels(optDouble2, com.sigmob.sdk.b.e()));
this.m.setLayoutParams(layoutParams);
this.m.requestLayout();
}
}
}