package xyz.netfly.ads;

import androidx.media3.ui.PlayerView;
import com.bytedance.sdk.component.pglcrypt.PglCryptUtils;
import com.google.android.gms.measurement.internal.u1;
import java.util.HashMap;
import kotlinx.coroutines.y;

/* JADX INFO: loaded from: classes3.dex */
public final /* synthetic */ class a implements Runnable {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ int f34831a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ f f34832b;

    public /* synthetic */ a(f fVar, int i10) {
        this.f34831a = i10;
        this.f34832b = fVar;
    }

    @Override // java.lang.Runnable
    public final void run() {
        int i10 = this.f34831a;
        f fVar = this.f34832b;
        switch (i10) {
            case 0:
                fVar.getClass();
                xyz.stream.api.o oVarF = xyz.stream.api.o.f();
                c cVar = new c(fVar);
                oVarF.getClass();
                HashMap mapO = u1.o("key", "ads_release_config");
                xyz.stream.api.o.g("config/key", oVarF.n(), mapO, new xyz.stream.api.j(oVarF, cVar, "config/key", mapO, 15));
                break;
            default:
                if (fVar.f34847j && fVar.f34851n == null) {
                    xyz.stream.utils.h.c("IMA Ad Timeout");
                    HashMap map = new HashMap();
                    map.put("error_code", "AD_TIMEOUT");
                    map.put(PglCryptUtils.KEY_MESSAGE, "Ad loading timeout after 8000 ms");
                    map.put("status", "ERROR");
                    y.R("ima_ad_event", map);
                    fVar.f34847j = false;
                    PlayerView playerView = fVar.f34845h;
                    if (playerView != null) {
                        playerView.setVisibility(8);
                        fVar.b();
                        g gVar = fVar.f34846i;
                        if (gVar != null) {
                            gVar.b();
                        }
                        break;
                    }
                }
                break;
        }
    }
}
