package R5;

import Z6.AbstractC0385z;
import Z6.InterfaceC0382w;
import android.widget.TextView;
import androidx.media3.ui.DefaultTimeBar;
import com.google.android.gms.internal.measurement.C1;
import com.martsnew.tv.ui.player.TvPlayerActivity;
import u5.AbstractC1605E;

/* JADX INFO: renamed from: R5.f, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C0287f extends G6.i implements O6.p {

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public int f6161u;

    /* JADX INFO: renamed from: v, reason: collision with root package name */
    public final /* synthetic */ TvPlayerActivity f6162v;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C0287f(E6.d dVar, TvPlayerActivity tvPlayerActivity) {
        super(2, dVar);
        this.f6162v = tvPlayerActivity;
    }

    @Override // O6.p
    public final Object k(Object obj, Object obj2) throws Throwable {
        ((C0287f) m((E6.d) obj2, (InterfaceC0382w) obj)).p(A6.n.f457a);
        return F6.a.f2580q;
    }

    @Override // G6.a
    public final E6.d m(E6.d dVar, Object obj) {
        return new C0287f(dVar, this.f6162v);
    }

    @Override // G6.a
    public final Object p(Object obj) throws Throwable {
        TextView textView;
        DefaultTimeBar defaultTimeBar;
        F6.a aVar = F6.a.f2580q;
        int i = this.f6161u;
        if (i != 0 && i != 1) {
            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
        }
        C1.N(obj);
        do {
            int i5 = TvPlayerActivity.f11193a0;
            TvPlayerActivity tvPlayerActivity = this.f6162v;
            if (((O3.e) tvPlayerActivity.W()).s()) {
                AbstractC1605E abstractC1605E = tvPlayerActivity.X;
                if (abstractC1605E != null && (defaultTimeBar = abstractC1605E.f17538R) != null) {
                    defaultTimeBar.setPosition(((B0.I) tvPlayerActivity.W()).M());
                }
                AbstractC1605E abstractC1605E2 = tvPlayerActivity.X;
                if (abstractC1605E2 != null && (textView = abstractC1605E2.f17543W) != null) {
                    textView.setText(s7.l.k(((B0.I) tvPlayerActivity.W()).M()));
                }
            }
            this.f6161u = 1;
        } while (AbstractC0385z.h(1000L, this) != aVar);
        return aVar;
    }
}
