- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
351 lines
11 KiB
Java
351 lines
11 KiB
Java
package com.fyber.inneractive.sdk.player.controller;
|
|
|
|
import android.annotation.SuppressLint;
|
|
import android.graphics.Bitmap;
|
|
import com.fyber.inneractive.sdk.config.IAConfigManager;
|
|
import com.fyber.inneractive.sdk.config.e0;
|
|
import com.fyber.inneractive.sdk.config.enums.TapAction;
|
|
import com.fyber.inneractive.sdk.player.controller.v;
|
|
import com.fyber.inneractive.sdk.player.enums.VideoClickOrigin;
|
|
import com.fyber.inneractive.sdk.util.IAlog;
|
|
import com.fyber.inneractive.sdk.util.p0;
|
|
import com.fyber.inneractive.sdk.util.s0;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class k extends o<v.a> implements v {
|
|
public a C;
|
|
public final float D;
|
|
public float E;
|
|
public boolean F;
|
|
public boolean G;
|
|
public boolean H;
|
|
|
|
public class a implements Runnable {
|
|
public a() {
|
|
}
|
|
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
k.this.h(false);
|
|
k.this.C = null;
|
|
}
|
|
}
|
|
|
|
public k(com.fyber.inneractive.sdk.player.e eVar, com.fyber.inneractive.sdk.player.ui.p pVar, e0 e0Var, com.fyber.inneractive.sdk.config.global.s sVar, boolean z, String str, boolean z2) {
|
|
super(eVar, pVar, e0Var, sVar, z, str, z2);
|
|
this.E = 0.0f;
|
|
this.F = false;
|
|
this.G = false;
|
|
this.H = false;
|
|
this.D = ((e0) this.b).b().b().intValue() / 100.0f;
|
|
B();
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.o, com.fyber.inneractive.sdk.player.ui.m
|
|
public final void a(boolean z) {
|
|
if (z) {
|
|
a(this.E);
|
|
}
|
|
super.a(z);
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.o, com.fyber.inneractive.sdk.player.controller.b
|
|
public final boolean c() {
|
|
return true;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.o, com.fyber.inneractive.sdk.player.ui.m
|
|
public final void d() {
|
|
super.d();
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.o, com.fyber.inneractive.sdk.player.controller.b
|
|
public final void destroy() {
|
|
A();
|
|
this.g = null;
|
|
super.destroy();
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.o
|
|
@SuppressLint({"NewApi"})
|
|
public final void j() {
|
|
super.j();
|
|
com.fyber.inneractive.sdk.player.c cVar = this.a;
|
|
if (cVar != null && cVar.b != null) {
|
|
IAlog.a("%sconnectToTextureView playing state = %s", IAlog.a(this), this.a.b.e);
|
|
if (this.a.b.j()) {
|
|
this.d.f(!this.a.j);
|
|
com.fyber.inneractive.sdk.player.ui.s sVar = this.d;
|
|
com.fyber.inneractive.sdk.player.ui.c cVar2 = new com.fyber.inneractive.sdk.player.ui.c();
|
|
cVar2.b = false;
|
|
sVar.c(new com.fyber.inneractive.sdk.player.ui.b(cVar2));
|
|
this.d.d(false);
|
|
B();
|
|
}
|
|
}
|
|
a(this.E);
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.o
|
|
public final void k() {
|
|
A();
|
|
super.k();
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.o
|
|
public final int m() {
|
|
return IAConfigManager.L.t.b.a(5, 1, "VideoAdBufferingTimeout") * 1000;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.o
|
|
public final int n() {
|
|
return 0;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.o, com.fyber.inneractive.sdk.player.controller.b
|
|
public final void pauseVideo() {
|
|
A();
|
|
super.pauseVideo();
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.o
|
|
public final void q() {
|
|
y();
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.o
|
|
public final void r() {
|
|
super.r();
|
|
A();
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.o
|
|
public final void t() {
|
|
z();
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.o
|
|
public final void u() {
|
|
super.u();
|
|
if (((e0) this.b).f.i != TapAction.FULLSCREEN) {
|
|
this.d.p();
|
|
}
|
|
w();
|
|
this.d.d(false);
|
|
this.F = true;
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.o
|
|
public final boolean v() {
|
|
return false;
|
|
}
|
|
|
|
public final void B() {
|
|
i iVar;
|
|
com.fyber.inneractive.sdk.player.c cVar = this.a;
|
|
if (cVar == null || (iVar = cVar.b) == null || iVar.n) {
|
|
return;
|
|
}
|
|
if (((e0) this.b).f.d.booleanValue()) {
|
|
this.a.b.b(false);
|
|
} else {
|
|
if (o()) {
|
|
return;
|
|
}
|
|
this.a.b.d(false);
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.b
|
|
public final void b(int i) {
|
|
i iVar;
|
|
com.fyber.inneractive.sdk.player.c cVar = this.a;
|
|
if (cVar == null || (iVar = cVar.b) == null || iVar.e == com.fyber.inneractive.sdk.player.enums.b.Playing || this.C != null) {
|
|
return;
|
|
}
|
|
IAlog.a("%splayVideo %s", IAlog.a(this), this.d);
|
|
if (i == 0) {
|
|
h(false);
|
|
return;
|
|
}
|
|
a aVar = new a();
|
|
this.C = aVar;
|
|
this.d.postDelayed(aVar, i);
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.o, com.fyber.inneractive.sdk.player.controller.b
|
|
public final void e(boolean z) {
|
|
i iVar;
|
|
com.fyber.inneractive.sdk.player.c cVar = this.a;
|
|
if (cVar != null && (iVar = cVar.b) != null && !iVar.e.equals(com.fyber.inneractive.sdk.player.enums.b.Completed)) {
|
|
if (((e0) this.b).f.i != TapAction.FULLSCREEN) {
|
|
this.d.p();
|
|
}
|
|
w();
|
|
}
|
|
com.fyber.inneractive.sdk.player.c cVar2 = this.a;
|
|
Bitmap bitmap = cVar2 != null ? cVar2.k : null;
|
|
if (bitmap != null) {
|
|
this.d.d(true);
|
|
this.d.setLastFrameBitmap(bitmap);
|
|
}
|
|
super.e(z);
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.o
|
|
public final void h(boolean z) {
|
|
com.fyber.inneractive.sdk.player.c cVar = this.a;
|
|
if (cVar == null || cVar.b == null) {
|
|
return;
|
|
}
|
|
B();
|
|
super.h(false);
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.o
|
|
public final void p() {
|
|
IAlog.a("%s onBufferingTimeout reached. Skipping to end card", IAlog.a(this));
|
|
if (this.d.e) {
|
|
this.u = true;
|
|
b(false);
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.o
|
|
public final void s() {
|
|
com.fyber.inneractive.sdk.player.c cVar = this.a;
|
|
if (cVar == null || cVar.b == null) {
|
|
return;
|
|
}
|
|
j();
|
|
h(false);
|
|
}
|
|
|
|
public final void y() {
|
|
if (this.g == 0 || this.H) {
|
|
return;
|
|
}
|
|
A();
|
|
super.k();
|
|
((v.a) this.g).c();
|
|
IAlog.a("%sopening fullscreen", IAlog.a(this));
|
|
this.H = true;
|
|
com.fyber.inneractive.sdk.player.c cVar = this.a;
|
|
if (cVar != null) {
|
|
com.fyber.inneractive.sdk.player.e eVar = (com.fyber.inneractive.sdk.player.e) cVar;
|
|
eVar.a(eVar.v, VideoClickOrigin.InvalidOrigin, com.fyber.inneractive.sdk.model.vast.v.EVENT_FULLSCREEN, com.fyber.inneractive.sdk.model.vast.v.EVENT_EXPAND);
|
|
}
|
|
}
|
|
|
|
public final void z() {
|
|
com.fyber.inneractive.sdk.player.c cVar;
|
|
i iVar;
|
|
com.fyber.inneractive.sdk.player.ui.s sVar;
|
|
if (this.E < this.D || (cVar = this.a) == null || (iVar = cVar.b) == null || iVar.e.equals(com.fyber.inneractive.sdk.player.enums.b.Completed) || (sVar = this.d) == null || sVar.i() || this.a.b.j == null) {
|
|
return;
|
|
}
|
|
if (((e0) this.b).f.a.booleanValue() || this.F) {
|
|
b(IAConfigManager.L.i.a);
|
|
}
|
|
}
|
|
|
|
public final void A() {
|
|
if (this.C != null) {
|
|
IAlog.a("%sCancelling play runnable", IAlog.a(this));
|
|
this.d.removeCallbacks(this.C);
|
|
this.C = null;
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.o
|
|
public final void a(p0 p0Var) {
|
|
i iVar;
|
|
TapAction tapAction = ((e0) this.b).f.i;
|
|
com.fyber.inneractive.sdk.player.c cVar = this.a;
|
|
if (cVar == null || cVar.b == null || this.E >= this.D) {
|
|
if (tapAction == TapAction.CTR) {
|
|
if (a(false, VideoClickOrigin.CTA, p0Var)) {
|
|
a(false, (s0) new l(this));
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
if (tapAction == TapAction.FULLSCREEN) {
|
|
y();
|
|
return;
|
|
}
|
|
if (tapAction != TapAction.DO_NOTHING) {
|
|
IAlog.a("%sonVideoClicked called, but we recieved an unknown tap action %s", IAlog.a(this), tapAction);
|
|
return;
|
|
}
|
|
if (cVar == null || (iVar = cVar.b) == null) {
|
|
return;
|
|
}
|
|
com.fyber.inneractive.sdk.player.enums.b bVar = iVar.e;
|
|
if (bVar != com.fyber.inneractive.sdk.player.enums.b.Completed && bVar != com.fyber.inneractive.sdk.player.enums.b.Prepared) {
|
|
iVar.l();
|
|
} else {
|
|
iVar.b(1);
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.v
|
|
public final void d(boolean z) {
|
|
com.fyber.inneractive.sdk.player.c cVar;
|
|
i iVar;
|
|
this.G = z;
|
|
if (!z || (cVar = this.a) == null || (iVar = cVar.b) == null || iVar.j != null || !this.d.e || iVar.e.equals(com.fyber.inneractive.sdk.player.enums.b.Completed)) {
|
|
return;
|
|
}
|
|
j();
|
|
a(this.E);
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.v
|
|
public final void a(float f) {
|
|
i iVar;
|
|
i iVar2;
|
|
this.E = f;
|
|
if (IAlog.a >= 3) {
|
|
IAlog.c("%sonVisibilityChanged called with: %s vfpl = %s vfpa = %s", IAlog.a(this), Float.valueOf(f), Float.valueOf(this.D), Float.valueOf(1.0f - this.D));
|
|
}
|
|
com.fyber.inneractive.sdk.player.c cVar = this.a;
|
|
if (cVar == null || (iVar = cVar.b) == null) {
|
|
return;
|
|
}
|
|
if (iVar.e != com.fyber.inneractive.sdk.player.enums.b.Playing) {
|
|
z();
|
|
return;
|
|
}
|
|
if (f <= this.D) {
|
|
IAlog.e("%sonVisibilityChanged pausing player", IAlog.a(this));
|
|
if (this.a.b.j != null) {
|
|
this.F = false;
|
|
a(false, (s0) null);
|
|
A();
|
|
super.pauseVideo();
|
|
com.fyber.inneractive.sdk.player.c cVar2 = this.a;
|
|
if (cVar2 != null && (iVar2 = cVar2.b) != null) {
|
|
iVar2.b(false);
|
|
}
|
|
this.d.setMuteButtonState(true);
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // com.fyber.inneractive.sdk.player.controller.v
|
|
public final void a() {
|
|
i iVar;
|
|
IAlog.a("%sfullscreenExited called", IAlog.a(this));
|
|
this.H = false;
|
|
d(this.G);
|
|
com.fyber.inneractive.sdk.player.c cVar = this.a;
|
|
if (cVar == null || (iVar = cVar.b) == null) {
|
|
return;
|
|
}
|
|
a(iVar.e);
|
|
a(this.a.b.c());
|
|
}
|
|
}
|