- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
616 lines
26 KiB
Java
616 lines
26 KiB
Java
package com.fyber.inneractive.sdk.player;
|
|
|
|
import android.app.Application;
|
|
import android.graphics.Bitmap;
|
|
import android.text.TextUtils;
|
|
import android.view.View;
|
|
import com.fyber.inneractive.sdk.config.IAConfigManager;
|
|
import com.fyber.inneractive.sdk.config.e0;
|
|
import com.fyber.inneractive.sdk.config.enums.UnitDisplayType;
|
|
import com.fyber.inneractive.sdk.config.f0;
|
|
import com.fyber.inneractive.sdk.config.global.features.r;
|
|
import com.fyber.inneractive.sdk.external.ImpressionData;
|
|
import com.fyber.inneractive.sdk.external.InneractiveAdRequest;
|
|
import com.fyber.inneractive.sdk.external.InneractiveVideoError;
|
|
import com.fyber.inneractive.sdk.flow.g0;
|
|
import com.fyber.inneractive.sdk.flow.m;
|
|
import com.fyber.inneractive.sdk.flow.o;
|
|
import com.fyber.inneractive.sdk.model.vast.d;
|
|
import com.fyber.inneractive.sdk.model.vast.q;
|
|
import com.fyber.inneractive.sdk.model.vast.v;
|
|
import com.fyber.inneractive.sdk.network.j0;
|
|
import com.fyber.inneractive.sdk.network.s;
|
|
import com.fyber.inneractive.sdk.player.a;
|
|
import com.fyber.inneractive.sdk.player.c;
|
|
import com.fyber.inneractive.sdk.player.controller.i;
|
|
import com.fyber.inneractive.sdk.player.enums.VideoClickOrigin;
|
|
import com.fyber.inneractive.sdk.player.h;
|
|
import com.fyber.inneractive.sdk.util.IAlog;
|
|
import com.fyber.inneractive.sdk.util.z;
|
|
import com.iab.omid.library.fyber.adsession.media.Position;
|
|
import com.iab.omid.library.fyber.adsession.media.VastProperties;
|
|
import com.ironsource.gi;
|
|
import com.ironsource.mediationsdk.utils.IronSourceConstants;
|
|
import java.util.ArrayList;
|
|
import java.util.Collections;
|
|
import java.util.HashMap;
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.PriorityQueue;
|
|
import java.util.concurrent.TimeUnit;
|
|
import org.json.JSONObject;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class e extends com.fyber.inneractive.sdk.player.c implements a.InterfaceC0079a {
|
|
public static final a C = new a();
|
|
public boolean A;
|
|
public final com.fyber.inneractive.sdk.player.ui.remote.g B;
|
|
public final com.fyber.inneractive.sdk.model.vast.b v;
|
|
public com.fyber.inneractive.sdk.player.enums.a w;
|
|
public boolean x;
|
|
public f0 y;
|
|
public m z;
|
|
|
|
public class a extends HashMap<String, c> {
|
|
|
|
/* renamed from: com.fyber.inneractive.sdk.player.e$a$a, reason: collision with other inner class name */
|
|
public class C0082a implements c {
|
|
@Override // com.fyber.inneractive.sdk.player.e.c
|
|
public final String a(i iVar, VideoClickOrigin videoClickOrigin) {
|
|
return videoClickOrigin.name().toLowerCase();
|
|
}
|
|
}
|
|
|
|
public class b implements c {
|
|
@Override // com.fyber.inneractive.sdk.player.e.c
|
|
public final String a(i iVar, VideoClickOrigin videoClickOrigin) {
|
|
return iVar != null ? z.a(iVar.c()) : "00:00:00.000";
|
|
}
|
|
}
|
|
|
|
public a() {
|
|
put("[CLICKAREA]", new C0082a());
|
|
put("[ADPLAYHEAD]", new b());
|
|
}
|
|
}
|
|
|
|
public static /* synthetic */ class b {
|
|
public static final /* synthetic */ int[] a;
|
|
public static final /* synthetic */ int[] b;
|
|
public static final /* synthetic */ int[] c;
|
|
|
|
static {
|
|
int[] iArr = new int[com.fyber.inneractive.sdk.player.enums.a.values().length];
|
|
c = iArr;
|
|
try {
|
|
iArr[com.fyber.inneractive.sdk.player.enums.a.Uninitialized.ordinal()] = 1;
|
|
} catch (NoSuchFieldError unused) {
|
|
}
|
|
try {
|
|
c[com.fyber.inneractive.sdk.player.enums.a.Started.ordinal()] = 2;
|
|
} catch (NoSuchFieldError unused2) {
|
|
}
|
|
try {
|
|
c[com.fyber.inneractive.sdk.player.enums.a.FirstQuarter.ordinal()] = 3;
|
|
} catch (NoSuchFieldError unused3) {
|
|
}
|
|
try {
|
|
c[com.fyber.inneractive.sdk.player.enums.a.MidPoint.ordinal()] = 4;
|
|
} catch (NoSuchFieldError unused4) {
|
|
}
|
|
try {
|
|
c[com.fyber.inneractive.sdk.player.enums.a.ThirdPQuarter.ordinal()] = 5;
|
|
} catch (NoSuchFieldError unused5) {
|
|
}
|
|
try {
|
|
c[com.fyber.inneractive.sdk.player.enums.a.Completed.ordinal()] = 6;
|
|
} catch (NoSuchFieldError unused6) {
|
|
}
|
|
int[] iArr2 = new int[com.fyber.inneractive.sdk.player.enums.b.values().length];
|
|
b = iArr2;
|
|
try {
|
|
iArr2[com.fyber.inneractive.sdk.player.enums.b.Prepared.ordinal()] = 1;
|
|
} catch (NoSuchFieldError unused7) {
|
|
}
|
|
try {
|
|
b[com.fyber.inneractive.sdk.player.enums.b.Playing.ordinal()] = 2;
|
|
} catch (NoSuchFieldError unused8) {
|
|
}
|
|
try {
|
|
b[com.fyber.inneractive.sdk.player.enums.b.Completed.ordinal()] = 3;
|
|
} catch (NoSuchFieldError unused9) {
|
|
}
|
|
int[] iArr3 = new int[com.fyber.inneractive.sdk.model.vast.h.values().length];
|
|
a = iArr3;
|
|
try {
|
|
iArr3[com.fyber.inneractive.sdk.model.vast.h.Default_End_Card.ordinal()] = 1;
|
|
} catch (NoSuchFieldError unused10) {
|
|
}
|
|
try {
|
|
a[com.fyber.inneractive.sdk.model.vast.h.FMP_End_Card.ordinal()] = 2;
|
|
} catch (NoSuchFieldError unused11) {
|
|
}
|
|
}
|
|
}
|
|
|
|
public interface c {
|
|
String a(i iVar, VideoClickOrigin videoClickOrigin);
|
|
}
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
public e(Application application, com.fyber.inneractive.sdk.response.g gVar, f0 f0Var, InneractiveAdRequest inneractiveAdRequest, g0 g0Var, com.fyber.inneractive.sdk.measurement.a aVar) {
|
|
super(application, g0Var == null ? null : g0Var.b());
|
|
if (f0Var != null) {
|
|
((e0) f0Var).b().getClass();
|
|
}
|
|
this.w = com.fyber.inneractive.sdk.player.enums.a.Uninitialized;
|
|
this.A = false;
|
|
if (gVar == null || gVar.d() == null) {
|
|
throw new IllegalArgumentException("IAVastMediaPlayerFlowManager ctor - vastData can't be null");
|
|
}
|
|
this.g = aVar;
|
|
this.e = g0Var;
|
|
this.v = gVar.d();
|
|
this.f = inneractiveAdRequest;
|
|
m mVar = new m(application, gVar, inneractiveAdRequest, this.e.b(), a(gVar, f0Var));
|
|
this.z = mVar;
|
|
mVar.c();
|
|
if (IAlog.a <= 3) {
|
|
IAlog.e("IAVastMediaPlayerFlowManager:ctor - got media files: ", new Object[0]);
|
|
for (int i = 0; i < this.v.b(); i++) {
|
|
q qVar = (q) this.v.c().get(i);
|
|
if (qVar != null) {
|
|
IAlog.a("IAVastMediaPlayerFlowManager(%d): %s", Integer.valueOf(i), qVar.a());
|
|
}
|
|
}
|
|
}
|
|
if (f0Var != null) {
|
|
a(f0Var);
|
|
e0 e0Var = (e0) f0Var;
|
|
if (e0Var.a() != null) {
|
|
a(e0Var.a().b().booleanValue());
|
|
}
|
|
}
|
|
if (g0Var == null || g0Var.b() == null) {
|
|
this.s = IAConfigManager.c().a().a(10, 0, gVar.a() == UnitDisplayType.INTERSTITIAL ? "prebuffer_interstitial" : "prebuffer_rewarded");
|
|
} else {
|
|
this.s = ((r) g0Var.b().a(r.class)).a(gVar.a());
|
|
}
|
|
if (d()) {
|
|
this.B = new com.fyber.inneractive.sdk.player.ui.remote.g(application, g0Var, this.v.a());
|
|
}
|
|
}
|
|
|
|
public final com.fyber.inneractive.sdk.flow.vast.b a(com.fyber.inneractive.sdk.response.g gVar, f0 f0Var) {
|
|
UnitDisplayType unitDisplayType = gVar.n;
|
|
InneractiveAdRequest inneractiveAdRequest = this.f;
|
|
return new com.fyber.inneractive.sdk.flow.vast.b(unitDisplayType, inneractiveAdRequest == null || inneractiveAdRequest.getAllowFullscreen(), gVar.e, gVar.f, f0Var);
|
|
}
|
|
|
|
public final void a(f0 f0Var) {
|
|
this.y = f0Var;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.i.e
|
|
public final void e() {
|
|
}
|
|
|
|
public final void b(int i) {
|
|
com.fyber.inneractive.sdk.model.vast.b bVar = this.v;
|
|
if (bVar == null || bVar.n.isEmpty()) {
|
|
return;
|
|
}
|
|
while (this.v.n.size() > 0 && i >= ((com.fyber.inneractive.sdk.model.vast.d) this.v.n.get(0)).c) {
|
|
com.fyber.inneractive.sdk.model.vast.d dVar = (com.fyber.inneractive.sdk.model.vast.d) this.v.n.get(0);
|
|
String str = dVar.a;
|
|
if (!TextUtils.isEmpty(str)) {
|
|
IAlog.a("IAVastMediaPlayerFlowManager: Firing event for type: progress", new Object[0]);
|
|
j0.b(str);
|
|
}
|
|
this.v.n.remove(dVar);
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.c
|
|
public final View c() {
|
|
PriorityQueue<com.fyber.inneractive.sdk.flow.vast.a> priorityQueue;
|
|
com.fyber.inneractive.sdk.flow.vast.a peek;
|
|
m mVar = this.z;
|
|
if (mVar == null || (priorityQueue = mVar.l) == null || priorityQueue.size() <= 0 || (peek = this.z.l.peek()) == null || !peek.a) {
|
|
return null;
|
|
}
|
|
if (peek instanceof com.fyber.inneractive.sdk.flow.vast.e) {
|
|
this.z.n = ((com.fyber.inneractive.sdk.flow.vast.e) peek).g;
|
|
}
|
|
return peek.b;
|
|
}
|
|
|
|
public final boolean d() {
|
|
com.fyber.inneractive.sdk.model.vast.b bVar = this.v;
|
|
return bVar != null && (TextUtils.isEmpty(bVar.o) ^ true);
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.i.e
|
|
public final void a(com.fyber.inneractive.sdk.player.enums.b bVar) {
|
|
boolean z;
|
|
s.a aVar;
|
|
String str;
|
|
int i;
|
|
int i2;
|
|
T t;
|
|
T t2;
|
|
T t3;
|
|
f0 f0Var;
|
|
VastProperties createVastPropertiesForNonSkippableMedia;
|
|
IAlog.a("IAMediaPlayerFlowManager: onPlayerStateChanged with - %s", bVar);
|
|
f fVar = this.i;
|
|
if (fVar != null && bVar != com.fyber.inneractive.sdk.player.enums.b.Prepared) {
|
|
fVar.a(bVar);
|
|
} else if (bVar == com.fyber.inneractive.sdk.player.enums.b.Prepared && fVar != null) {
|
|
fVar.d = true;
|
|
}
|
|
int i3 = c.b.a[bVar.ordinal()];
|
|
if (i3 == 1) {
|
|
IAlog.a("IAMediaPlayerFlowManager: onPlayerPrepared called", new Object[0]);
|
|
if (this.o) {
|
|
IAlog.a("IMediaPlayerFlowManager: onPlayerPrepared is called, but object is already destroyed?? ignore", new Object[0]);
|
|
} else {
|
|
if (this.b.a() && this.b.e() != null) {
|
|
Bitmap e = this.b.e();
|
|
IAlog.a("IAMediaPlayerFlowManager: saving snapshot %s", e);
|
|
this.k = e;
|
|
}
|
|
this.n = true;
|
|
if (this.h != null && this.e != null && (f0Var = this.y) != null) {
|
|
int intValue = ((e0) f0Var).f.h.value().intValue();
|
|
boolean a2 = com.fyber.inneractive.sdk.player.c.a(this.b.d(), ((com.fyber.inneractive.sdk.response.g) this.e.b).w, this.y);
|
|
boolean booleanValue = ((e0) this.y).f.a.booleanValue();
|
|
com.fyber.inneractive.sdk.measurement.d dVar = this.h;
|
|
if (!a2) {
|
|
intValue = 0;
|
|
}
|
|
if (dVar.b != null) {
|
|
try {
|
|
if (a2) {
|
|
createVastPropertiesForNonSkippableMedia = VastProperties.createVastPropertiesForSkippableMedia(intValue, booleanValue, Position.STANDALONE);
|
|
} else {
|
|
createVastPropertiesForNonSkippableMedia = VastProperties.createVastPropertiesForNonSkippableMedia(booleanValue, Position.STANDALONE);
|
|
}
|
|
dVar.b.loaded(createVastPropertiesForNonSkippableMedia);
|
|
} catch (Throwable th) {
|
|
dVar.a(th);
|
|
}
|
|
}
|
|
}
|
|
if (this.r != null) {
|
|
g0 g0Var = this.e;
|
|
if (g0Var == null || (t3 = g0Var.b) == 0) {
|
|
z = false;
|
|
} else {
|
|
z = com.fyber.inneractive.sdk.player.c.a(this.b.d(), t3.w, this.y);
|
|
t3.r.setVideo(new ImpressionData.Video(z, (int) TimeUnit.MILLISECONDS.toSeconds(this.b.d())));
|
|
}
|
|
try {
|
|
g0 g0Var2 = this.e;
|
|
com.fyber.inneractive.sdk.response.g gVar = g0Var2 != null ? (com.fyber.inneractive.sdk.response.g) g0Var2.b : null;
|
|
com.fyber.inneractive.sdk.network.r rVar = com.fyber.inneractive.sdk.network.r.EVENT_READY_ON_CLIENT;
|
|
InneractiveAdRequest inneractiveAdRequest = this.f;
|
|
g0 g0Var3 = this.e;
|
|
s.a aVar2 = new s.a(rVar, inneractiveAdRequest, gVar, g0Var3 == null ? null : g0Var3.c.c());
|
|
if (this.t == null || gVar == null) {
|
|
aVar = aVar2;
|
|
} else {
|
|
IAlog.a("Video content loader: Vast load took: " + (System.currentTimeMillis() - gVar.K) + " msec", new Object[0]);
|
|
g0 g0Var4 = this.e;
|
|
if (g0Var4 == null || (t2 = g0Var4.b) == 0 || ((com.fyber.inneractive.sdk.response.g) t2).L == null) {
|
|
str = "";
|
|
i = 0;
|
|
i2 = 0;
|
|
} else {
|
|
i = ((com.fyber.inneractive.sdk.response.g) t2).L.j;
|
|
i2 = ((com.fyber.inneractive.sdk.response.g) t2).L.k;
|
|
str = ((com.fyber.inneractive.sdk.response.g) t2).L.a;
|
|
}
|
|
String str2 = "0";
|
|
if (g0Var4 != null && (t = g0Var4.b) != 0 && !TextUtils.isEmpty(((com.fyber.inneractive.sdk.response.g) t).C)) {
|
|
str2 = ((com.fyber.inneractive.sdk.response.g) this.e.b).C;
|
|
}
|
|
s.b bVar2 = new s.b();
|
|
bVar2.a(Integer.valueOf(this.b.d() / 1000), IronSourceConstants.EVENTS_DURATION).a(this.t.g, "url").a(this.t.e, "bitrate").a(TextUtils.isEmpty(this.t.d) ? "na" : this.t.d, "mime").a(this.t.a, gi.h).a(Long.valueOf(System.currentTimeMillis() - gVar.K), "load_time").a(Integer.valueOf(this.q), "media_file_index").a(this.b.f(), "player").a(Boolean.valueOf(z), "is_video_skippable").a(Integer.valueOf(i), "supported_media_files").a(Integer.valueOf(i2), "total_media_files").a(str, "vast_version");
|
|
if (str2 != null && str2.equals("1")) {
|
|
bVar2.a(str2, "hide_endcard");
|
|
}
|
|
aVar = aVar2;
|
|
aVar.f.put(bVar2.a);
|
|
}
|
|
aVar.a((String) null);
|
|
} catch (Exception unused) {
|
|
}
|
|
h hVar = (h) this.r;
|
|
if (!hVar.g) {
|
|
hVar.g = true;
|
|
h.b bVar3 = hVar.d;
|
|
if (bVar3 != null) {
|
|
((o) bVar3).f();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else if (i3 == 2) {
|
|
IAlog.a("IAMediaPlayerFlowManager: onPlayerBuffering", new Object[0]);
|
|
} else if (i3 == 3) {
|
|
this.b.c();
|
|
}
|
|
int i4 = b.b[bVar.ordinal()];
|
|
if (i4 != 1) {
|
|
if (i4 == 2) {
|
|
if (this.w.equals(com.fyber.inneractive.sdk.player.enums.a.Completed)) {
|
|
a(com.fyber.inneractive.sdk.player.enums.a.Restarted);
|
|
return;
|
|
}
|
|
return;
|
|
} else {
|
|
if (i4 != 3) {
|
|
return;
|
|
}
|
|
b(this.b.d());
|
|
a(com.fyber.inneractive.sdk.player.enums.a.Completed);
|
|
return;
|
|
}
|
|
}
|
|
com.fyber.inneractive.sdk.model.vast.b bVar4 = this.v;
|
|
if (bVar4 == null || bVar4.n.size() == 0) {
|
|
return;
|
|
}
|
|
int d = this.b.d();
|
|
Iterator it = this.v.n.iterator();
|
|
while (it.hasNext()) {
|
|
com.fyber.inneractive.sdk.model.vast.d dVar2 = (com.fyber.inneractive.sdk.model.vast.d) it.next();
|
|
int i5 = -1;
|
|
if (dVar2.c == -1) {
|
|
if (!TextUtils.isEmpty(dVar2.b)) {
|
|
String str3 = dVar2.b;
|
|
i5 = Integer.parseInt(str3.substring(0, str3.length() - 1));
|
|
}
|
|
dVar2.c = (i5 * d) / 100;
|
|
}
|
|
}
|
|
Collections.sort(this.v.n, new d.a());
|
|
}
|
|
|
|
public final void b(InneractiveVideoError inneractiveVideoError, JSONObject jSONObject) {
|
|
try {
|
|
if (this.t != null && inneractiveVideoError.getPlayerError() != InneractiveVideoError.Error.ERROR_FAILED_PLAYING_ALL_MEDIA_FILES) {
|
|
jSONObject.put("url", this.t.g);
|
|
jSONObject.put("bitrate", this.t.e);
|
|
jSONObject.put("mime", this.t.d);
|
|
jSONObject.put(gi.h, this.t.a);
|
|
}
|
|
i iVar = this.b;
|
|
jSONObject.put("player", iVar != null ? iVar.f() : "");
|
|
if (inneractiveVideoError.getCause() != null) {
|
|
jSONObject.put("exception", inneractiveVideoError.getCause().getClass().getName());
|
|
jSONObject.put("message", inneractiveVideoError.getCause().getMessage() == null ? "empty" : inneractiveVideoError.getCause().getMessage());
|
|
}
|
|
} catch (Exception unused) {
|
|
IAlog.a("onReportError: Failed creating Json object from media file!", new Object[0]);
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.i.d
|
|
public final void a(int i) {
|
|
int d = this.b.d();
|
|
b(i);
|
|
int i2 = b.c[this.w.ordinal()];
|
|
if (i2 == 1) {
|
|
if (this.b.e != com.fyber.inneractive.sdk.player.enums.b.Buffering) {
|
|
a(com.fyber.inneractive.sdk.player.enums.a.Started);
|
|
com.fyber.inneractive.sdk.measurement.d dVar = this.h;
|
|
if (dVar != null) {
|
|
if (dVar.b != null && !dVar.e) {
|
|
IAlog.a("%s impression", "OMVideo");
|
|
dVar.e = true;
|
|
try {
|
|
dVar.b.impressionOccurred();
|
|
} catch (Throwable th) {
|
|
dVar.a(th);
|
|
}
|
|
}
|
|
com.fyber.inneractive.sdk.measurement.d dVar2 = this.h;
|
|
long d2 = this.b.d();
|
|
float f = this.b.i() ? 0.0f : 1.0f;
|
|
if (dVar2.c == null || dVar2.d) {
|
|
return;
|
|
}
|
|
dVar2.d = true;
|
|
IAlog.a("%s start", "OMVideo");
|
|
try {
|
|
dVar2.c.start(d2, f);
|
|
return;
|
|
} catch (Throwable th2) {
|
|
dVar2.a(th2);
|
|
return;
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
if (i2 == 2) {
|
|
if (i > d / 4) {
|
|
a(com.fyber.inneractive.sdk.player.enums.a.FirstQuarter);
|
|
com.fyber.inneractive.sdk.measurement.d dVar3 = this.h;
|
|
if (dVar3 == null || dVar3.c == null) {
|
|
return;
|
|
}
|
|
IAlog.a("%s firstQuartile", "OMVideo");
|
|
try {
|
|
dVar3.c.firstQuartile();
|
|
return;
|
|
} catch (Throwable th3) {
|
|
dVar3.a(th3);
|
|
return;
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
if (i2 != 3) {
|
|
if (i2 == 4 && i > (d / 4) * 3) {
|
|
a(com.fyber.inneractive.sdk.player.enums.a.ThirdPQuarter);
|
|
com.fyber.inneractive.sdk.measurement.d dVar4 = this.h;
|
|
if (dVar4 == null || dVar4.c == null) {
|
|
return;
|
|
}
|
|
IAlog.a("%s thirdQuartile", "OMVideo");
|
|
try {
|
|
dVar4.c.thirdQuartile();
|
|
return;
|
|
} catch (Throwable th4) {
|
|
dVar4.a(th4);
|
|
return;
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
if (i > d / 2) {
|
|
a(com.fyber.inneractive.sdk.player.enums.a.MidPoint);
|
|
com.fyber.inneractive.sdk.measurement.d dVar5 = this.h;
|
|
if (dVar5 == null || dVar5.c == null) {
|
|
return;
|
|
}
|
|
IAlog.a("%s midpoint", "OMVideo");
|
|
try {
|
|
dVar5.c.midpoint();
|
|
} catch (Throwable th5) {
|
|
dVar5.a(th5);
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.c
|
|
public final void a(InneractiveVideoError inneractiveVideoError, JSONObject jSONObject) {
|
|
a(this.v, VideoClickOrigin.InvalidOrigin, v.EVENT_ERROR);
|
|
b(inneractiveVideoError, jSONObject);
|
|
IAlog.f("IAMediaPlayerFlowManager: reporting error to listeners: %s", inneractiveVideoError.getPlayerError().toString());
|
|
g gVar = this.r;
|
|
if (gVar != null) {
|
|
try {
|
|
((h) gVar).a(inneractiveVideoError, jSONObject, false);
|
|
} catch (Exception e) {
|
|
if (IAlog.a <= 3) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|
|
com.fyber.inneractive.sdk.util.r rVar = this.l;
|
|
if (rVar != null) {
|
|
rVar.b();
|
|
rVar.h = null;
|
|
this.m = null;
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.c
|
|
public final void a(com.fyber.inneractive.sdk.response.i iVar, VideoClickOrigin videoClickOrigin, v... vVarArr) {
|
|
if (vVarArr.length == 0) {
|
|
IAlog.f("IAVastMediaPlayerFlowManager: eventTypes array is empty", new Object[0]);
|
|
return;
|
|
}
|
|
if (iVar == null) {
|
|
IAlog.f("IAVastMediaPlayerFlowManager: parser is null", new Object[0]);
|
|
return;
|
|
}
|
|
ArrayList arrayList = new ArrayList();
|
|
for (v vVar : vVarArr) {
|
|
String e = vVar.e();
|
|
IAlog.a("IAVastMediaPlayerFlowManager: Firing events for type: %s", e);
|
|
List<String> a2 = iVar.a(vVar);
|
|
if (a2 != null && a2.size() != 0) {
|
|
arrayList.addAll(a2);
|
|
IAlog.a("found %d events for type: %s, url: %s", Integer.valueOf(a2.size()), e, a2.get(0));
|
|
a(a2, vVar);
|
|
} else {
|
|
IAlog.a("IAVastMediaPlayerFlowManager: no events for type: %s", e);
|
|
}
|
|
if (vVar == v.EVENT_CLICK) {
|
|
for (Map.Entry<String, c> entry : C.entrySet()) {
|
|
String key = entry.getKey();
|
|
String a3 = entry.getValue().a(this.b, videoClickOrigin);
|
|
for (int i = 0; i < arrayList.size(); i++) {
|
|
String str = (String) arrayList.get(i);
|
|
if (str.contains(key)) {
|
|
arrayList.set(i, str.replace(key, a3));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
Iterator it = arrayList.iterator();
|
|
while (it.hasNext()) {
|
|
String str2 = (String) it.next();
|
|
if (!TextUtils.isEmpty(str2)) {
|
|
j0.b(str2);
|
|
}
|
|
}
|
|
}
|
|
|
|
public static void a(com.fyber.inneractive.sdk.measurement.e eVar, v... vVarArr) {
|
|
ArrayList arrayList = new ArrayList();
|
|
for (v vVar : vVarArr) {
|
|
String e = vVar.e();
|
|
IAlog.a("IAVastMediaPlayerFlowManager: Firing events for type: %s", e);
|
|
List<String> a2 = eVar.a(vVar);
|
|
if (a2 != null) {
|
|
ArrayList arrayList2 = (ArrayList) a2;
|
|
if (arrayList2.size() != 0) {
|
|
arrayList.addAll(a2);
|
|
IAlog.a("found %d events for type: %s", Integer.valueOf(arrayList2.size()), e);
|
|
a(a2, vVar);
|
|
}
|
|
}
|
|
IAlog.a("IAVastMediaPlayerFlowManager: no events for type: %s", e);
|
|
}
|
|
Iterator it = arrayList.iterator();
|
|
while (it.hasNext()) {
|
|
String str = (String) it.next();
|
|
if (!TextUtils.isEmpty(str)) {
|
|
j0.b(str);
|
|
}
|
|
}
|
|
}
|
|
|
|
public static void a(List<String> list, v vVar) {
|
|
for (String str : list) {
|
|
IAlog.a(" event url: %s", str);
|
|
if (!TextUtils.isEmpty(str)) {
|
|
vVar.e();
|
|
}
|
|
}
|
|
}
|
|
|
|
public final void a(com.fyber.inneractive.sdk.player.enums.a aVar) {
|
|
if (this.w == aVar) {
|
|
return;
|
|
}
|
|
if (aVar == com.fyber.inneractive.sdk.player.enums.a.Started) {
|
|
this.x = false;
|
|
a(this.v, VideoClickOrigin.InvalidOrigin, v.EVENT_IMPRESSION, v.EVENT_START);
|
|
} else if (aVar == com.fyber.inneractive.sdk.player.enums.a.FirstQuarter) {
|
|
a(this.v, VideoClickOrigin.InvalidOrigin, v.EVENT_FIRSTQ);
|
|
} else if (aVar == com.fyber.inneractive.sdk.player.enums.a.MidPoint) {
|
|
a(this.v, VideoClickOrigin.InvalidOrigin, v.EVENT_MID);
|
|
} else if (aVar == com.fyber.inneractive.sdk.player.enums.a.ThirdPQuarter) {
|
|
a(this.v, VideoClickOrigin.InvalidOrigin, v.EVENT_THIRDQ);
|
|
} else if (aVar == com.fyber.inneractive.sdk.player.enums.a.Completed && !this.x) {
|
|
this.x = true;
|
|
a(this.v, VideoClickOrigin.InvalidOrigin, v.EVENT_COMPLETE);
|
|
} else if (aVar == com.fyber.inneractive.sdk.player.enums.a.Restarted) {
|
|
a(this.v, VideoClickOrigin.InvalidOrigin, v.EVENT_REWIND);
|
|
} else if (aVar == com.fyber.inneractive.sdk.player.enums.a.Progress) {
|
|
a(this.v, VideoClickOrigin.InvalidOrigin, v.EVENT_PROGRESS);
|
|
}
|
|
this.w = aVar;
|
|
}
|
|
}
|