导航菜单

页面标题

页面副标题

CleanTube v9.9.5 - CastControlPage.java 源代码

正在查看: CleanTube v9.9.5 应用的 CastControlPage.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.sgebrelibanos.aderaser;

import G2.m;
import V2.B;
import V2.D;
import V2.E;
import V2.InterfaceC0407e;
import V2.InterfaceC0408f;
import V2.z;
import W0.AbstractC0433l0;
import W0.AbstractC0438o;
import W0.C0436n;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.SeekBar;
import android.widget.TextView;
import com.google.android.material.button.MaterialButton;
import com.sgebrelibanos.aderaser.CastControlPage;
import com.squareup.picasso.q;
import j3.InterfaceC0883e;
import java.io.IOException;
import java.util.Arrays;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.TimeUnit;
import kotlin.Metadata;
import l1.AbstractC0896b;
import n1.InterfaceC0914a;
import o1.C0934D;
import o1.k;
import o1.y;
import org.json.JSONObject;

@Metadata(d1 = {"\u0000`\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u000b\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0017\n\u0002\u0010\u0006\n\u0002\b\u0007\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0002\u0010\u0003J\u000f\u0010\u0005\u001a\u00020\u0004H\u0002¢\u0006\u0004\b\u0005\u0010\u0003J\u0019\u0010\b\u001a\u00020\u00042\b\u0010\u0007\u001a\u0004\u0018\u00010\u0006H\u0014¢\u0006\u0004\b\b\u0010\tJ\r\u0010\n\u001a\u00020\u0004¢\u0006\u0004\b\n\u0010\u0003J\u0015\u0010\u000e\u001a\u00020\r2\u0006\u0010\f\u001a\u00020\u000b¢\u0006\u0004\b\u000e\u0010\u000fJ\u0015\u0010\u0011\u001a\u00020\u00042\u0006\u0010\u0010\u001a\u00020\u000b¢\u0006\u0004\b\u0011\u0010\u0012J\u0015\u0010\u0014\u001a\u00020\u000b2\u0006\u0010\u0013\u001a\u00020\u000b¢\u0006\u0004\b\u0014\u0010\u0015R\u0016\u0010\u0019\u001a\u00020\u00168\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b\u0017\u0010\u0018R\u0016\u0010\u001c\u001a\u00020\r8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u001a\u0010\u001bR\u0017\u0010\"\u001a\u00020\u001d8\u0006¢\u0006\f\n\u0004\b\u001e\u0010\u001f\u001a\u0004\b \u0010!R\u0016\u0010&\u001a\u00020#8\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b$\u0010%R\u0016\u0010*\u001a\u00020'8\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b(\u0010)R\u0016\u0010,\u001a\u00020'8\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b+\u0010)R\u0016\u00100\u001a\u00020-8\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b.\u0010/R\u0016\u00102\u001a\u00020-8\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b1\u0010/R\u0016\u00106\u001a\u0002038\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b4\u00105R\u0016\u00108\u001a\u00020-8\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b7\u0010/R\u0016\u0010:\u001a\u00020-8\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b9\u0010/R\u0016\u0010=\u001a\u00020\u000b8\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b;\u0010<R\u0016\u0010?\u001a\u00020\u000b8\u0002@\u0002X\u0082.¢\u0006\u0006\n\u0004\b>\u0010<R\"\u0010E\u001a\u00020\r8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b@\u0010\u001b\u001a\u0004\bA\u0010B\"\u0004\bC\u0010DR\"\u0010J\u001a\u00020\u000b8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\bF\u0010<\u001a\u0004\bG\u0010H\"\u0004\bI\u0010\u0012R\"\u0010Q\u001a\u00020K8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\bL\u0010\u001e\u001a\u0004\bM\u0010N\"\u0004\bO\u0010P¨\u0006R"}, d2 = {"Lcom/sgebrelibanos/aderaser/CastControlPage;", "Landroidx/appcompat/app/c;", "<init>", "()V", "Lc1/y;", "P0", "Landroid/os/Bundle;", "savedInstanceState", "onCreate", "(Landroid/os/Bundle;)V", "D0", "", "string", "", "C0", "(Ljava/lang/String;)Z", "eventString", "I0", "(Ljava/lang/String;)V", "duration", "x0", "(Ljava/lang/String;)Ljava/lang/String;", "Lcom/squareup/picasso/q;", "B", "Lcom/squareup/picasso/q;", "picasso", "C", "Z", "playing", "LW0/n;", "D", "LW0/n;", "y0", "()LW0/n;", "cast", "LV2/z;", "E", "LV2/z;", "client", "Landroid/widget/ImageButton;", "F", "Landroid/widget/ImageButton;", "playButton", "G", "pauseButton", "Landroid/widget/TextView;", "H", "Landroid/widget/TextView;", "durationTextView", "I", "currentTimeTextView", "Landroid/widget/SeekBar;", "J", "Landroid/widget/SeekBar;", "durationSeekBar", "K", "videoTitleView", "L", "channelTitleView", "M", "Ljava/lang/String;", "previousGSID", "N", "previousgGSessionID", "O", "A0", "()Z", "O0", "(Z)V", "durationPressed", "P", "z0", "()Ljava/lang/String;", "N0", "currentSeconds", "", "Q", "B0", "()D", "setVideoDuration", "(D)V", "videoDuration", "app_release"}, k = 1, mv = {1, 7, 1}, xi = 48)
public final class CastControlPage extends androidx.appcompat.app.c {

    private q picasso;

    private z client;

    private ImageButton playButton;

    private ImageButton pauseButton;

    private TextView durationTextView;

    private TextView currentTimeTextView;

    private SeekBar durationSeekBar;

    private TextView videoTitleView;

    private TextView channelTitleView;

    private String previousGSID;

    private String previousgGSessionID;

    private boolean durationPressed;

    private double videoDuration;

    private boolean playing = true;

    private final C0436n cast = new C0436n();

    private String currentSeconds = "0.0";

    public static final class a extends TimerTask {

        final y f10747f;

        final y f10748g;

        a(y yVar, y yVar2) {
            this.f10747f = yVar;
            this.f10748g = yVar2;
        }

        @Override
        public void run() {
            E a4;
            String d4 = AbstractC0438o.d();
            String str = CastControlPage.this.previousGSID;
            if (str == null) {
                k.s("previousGSID");
                str = null;
            }
            if (k.a(d4, str)) {
                String str2 = CastControlPage.this.previousgGSessionID;
                if (str2 == null) {
                    k.s("previousgGSessionID");
                    str2 = null;
                }
                if (k.a(str2, AbstractC0438o.b())) {
                    return;
                }
            }
            InterfaceC0407e interfaceC0407e = (InterfaceC0407e) this.f10747f.f13316e;
            if (interfaceC0407e != null) {
                interfaceC0407e.cancel();
            }
            StringBuilder sb = new StringBuilder();
            sb.append("ID's Don't Match - Canceled - ");
            InterfaceC0407e interfaceC0407e2 = (InterfaceC0407e) this.f10747f.f13316e;
            sb.append(interfaceC0407e2 != null ? Boolean.valueOf(interfaceC0407e2.h()) : null);
            Log.d("CastMeta", sb.toString());
            InterfaceC0407e interfaceC0407e3 = (InterfaceC0407e) this.f10747f.f13316e;
            if (interfaceC0407e3 == null || !interfaceC0407e3.h()) {
                return;
            }
            D d5 = (D) this.f10748g.f13316e;
            if (d5 != null && (a4 = d5.a()) != null) {
                a4.close();
            }
            CastControlPage.this.D0();
        }
    }

    public static final class b implements InterfaceC0408f {

        final y f10750b;

        b(y yVar) {
            this.f10750b = yVar;
        }

        @Override
        public void a(InterfaceC0407e interfaceC0407e, D d4) {
            k.f(interfaceC0407e, "call");
            k.f(d4, "response");
            if (!d4.F()) {
                StringBuilder sb = new StringBuilder();
                sb.append("Issue Occurred - ");
                E a4 = d4.a();
                sb.append(a4 != null ? a4.k() : null);
                Log.e("CastState", sb.toString());
                return;
            }
            E a5 = d4.a();
            if (a5 != null) {
                InterfaceC0883e h4 = a5.h();
                while (!h4.G()) {
                    String C3 = h4.C();
                    Log.d("CastState", C3 + " - " + d4.W().k());
                    if (!CastControlPage.this.C0(C3) && !k.a(C3, "]")) {
                        CastControlPage.this.I0(C3);
                    }
                    this.f10750b.f13316e = interfaceC0407e;
                }
            }
        }

        @Override
        public void b(InterfaceC0407e interfaceC0407e, IOException iOException) {
            k.f(interfaceC0407e, "call");
            k.f(iOException, "e");
            Log.e("CastState", "Error Occurred: " + iOException.getLocalizedMessage());
            CastControlPage.this.D0();
        }
    }

    public static final class c implements SeekBar.OnSeekBarChangeListener {

        private int f10751a;

        c() {
        }

        @Override
        public void onProgressChanged(SeekBar seekBar, int i4, boolean z3) {
            if (z3) {
                this.f10751a = i4;
                CastControlPage.this.N0(String.valueOf(i4));
                TextView textView = CastControlPage.this.currentTimeTextView;
                if (textView == null) {
                    k.s("currentTimeTextView");
                    textView = null;
                }
                CastControlPage castControlPage = CastControlPage.this;
                textView.setText(castControlPage.x0(castControlPage.getCurrentSeconds()));
            }
        }

        @Override
        public void onStartTrackingTouch(SeekBar seekBar) {
            CastControlPage.this.O0(true);
        }

        @Override
        public void onStopTrackingTouch(SeekBar seekBar) {
            CastControlPage.this.getCast().J(String.valueOf(this.f10751a));
            CastControlPage.this.O0(false);
        }
    }

    public static final class d implements SeekBar.OnSeekBarChangeListener {

        private int f10753a;

        d() {
        }

        @Override
        public void onProgressChanged(SeekBar seekBar, int i4, boolean z3) {
            k.f(seekBar, "seekBar");
            if (z3) {
                this.f10753a = i4;
            }
        }

        @Override
        public void onStartTrackingTouch(SeekBar seekBar) {
            k.f(seekBar, "seekBar");
        }

        @Override
        public void onStopTrackingTouch(SeekBar seekBar) {
            k.f(seekBar, "seekBar");
            CastControlPage.this.getCast().L(this.f10753a * 10);
        }
    }

    public static final class e extends TimerTask {
        e() {
        }

        @Override
        public void run() {
            if (!CastControlPage.this.playing || CastControlPage.this.getDurationPressed()) {
                return;
            }
            SeekBar seekBar = CastControlPage.this.durationSeekBar;
            TextView textView = null;
            if (seekBar == null) {
                k.s("durationSeekBar");
                seekBar = null;
            }
            if (seekBar.getProgress() >= CastControlPage.this.getVideoDuration()) {
                SeekBar seekBar2 = CastControlPage.this.durationSeekBar;
                if (seekBar2 == null) {
                    k.s("durationSeekBar");
                    seekBar2 = null;
                }
                seekBar2.setProgress(seekBar2.getProgress() + 1);
                Double g4 = m.g(CastControlPage.this.getCurrentSeconds());
                if (g4 != null) {
                    CastControlPage.this.N0(Double.valueOf(g4.doubleValue() + 1).toString());
                    TextView textView2 = CastControlPage.this.currentTimeTextView;
                    if (textView2 == null) {
                        k.s("currentTimeTextView");
                    } else {
                        textView = textView2;
                    }
                    CastControlPage castControlPage = CastControlPage.this;
                    textView.setText(castControlPage.x0(castControlPage.getCurrentSeconds()));
                }
            }
        }
    }

    static final class f extends o1.m implements InterfaceC0914a {
        f() {
            super(0);
        }

        @Override
        public Object invoke() {
            m16invoke();
            return c1.y.f9045a;
        }

        public final void m16invoke() {
            CastControlPage.this.D0();
        }
    }

    static final class g extends o1.m implements InterfaceC0914a {

        public static final g f10757e = new g();

        g() {
            super(0);
        }

        public final void m17invoke() {
        }

        @Override
        public Object invoke() {
            m17invoke();
            return c1.y.f9045a;
        }
    }

    public static final void E0(CastControlPage castControlPage, View view) {
        k.f(castControlPage, "this$0");
        castControlPage.startActivity(new Intent(castControlPage, (Class<?>) SearchVideos.class));
    }

    public static final void F0(CastControlPage castControlPage, View view) {
        k.f(castControlPage, "this$0");
        castControlPage.playing = true;
        ImageButton imageButton = castControlPage.playButton;
        ImageButton imageButton2 = null;
        if (imageButton == null) {
            k.s("playButton");
            imageButton = null;
        }
        imageButton.setVisibility(8);
        ImageButton imageButton3 = castControlPage.pauseButton;
        if (imageButton3 == null) {
            k.s("pauseButton");
        } else {
            imageButton2 = imageButton3;
        }
        imageButton2.setVisibility(0);
        castControlPage.cast.H();
    }

    public static final void G0(CastControlPage castControlPage, View view) {
        k.f(castControlPage, "this$0");
        castControlPage.playing = false;
        ImageButton imageButton = castControlPage.pauseButton;
        ImageButton imageButton2 = null;
        if (imageButton == null) {
            k.s("pauseButton");
            imageButton = null;
        }
        imageButton.setVisibility(8);
        ImageButton imageButton3 = castControlPage.playButton;
        if (imageButton3 == null) {
            k.s("playButton");
        } else {
            imageButton2 = imageButton3;
        }
        imageButton2.setVisibility(0);
        castControlPage.cast.C();
    }

    public static final void H0(CastControlPage castControlPage, View view) {
        k.f(castControlPage, "this$0");
        castControlPage.cast.p();
    }

    public static final void J0(CastControlPage castControlPage, Object obj, Object obj2) {
        k.f(castControlPage, "this$0");
        ImageButton imageButton = castControlPage.playButton;
        TextView textView = null;
        if (imageButton == null) {
            k.s("playButton");
            imageButton = null;
        }
        imageButton.setVisibility(0);
        ImageButton imageButton2 = castControlPage.pauseButton;
        if (imageButton2 == null) {
            k.s("pauseButton");
            imageButton2 = null;
        }
        imageButton2.setVisibility(8);
        TextView textView2 = castControlPage.durationTextView;
        if (textView2 == null) {
            k.s("durationTextView");
            textView2 = null;
        }
        textView2.setText(castControlPage.x0(String.valueOf(obj)));
        TextView textView3 = castControlPage.currentTimeTextView;
        if (textView3 == null) {
            k.s("currentTimeTextView");
        } else {
            textView = textView3;
        }
        textView.setText(castControlPage.x0(String.valueOf(obj2)));
        castControlPage.currentSeconds = String.valueOf(obj2);
    }

    public static final void K0(CastControlPage castControlPage, Object obj, Object obj2) {
        k.f(castControlPage, "this$0");
        ImageButton imageButton = castControlPage.playButton;
        TextView textView = null;
        if (imageButton == null) {
            k.s("playButton");
            imageButton = null;
        }
        imageButton.setVisibility(8);
        ImageButton imageButton2 = castControlPage.pauseButton;
        if (imageButton2 == null) {
            k.s("pauseButton");
            imageButton2 = null;
        }
        imageButton2.setVisibility(0);
        TextView textView2 = castControlPage.durationTextView;
        if (textView2 == null) {
            k.s("durationTextView");
            textView2 = null;
        }
        textView2.setText(castControlPage.x0(String.valueOf(obj)));
        TextView textView3 = castControlPage.currentTimeTextView;
        if (textView3 == null) {
            k.s("currentTimeTextView");
        } else {
            textView = textView3;
        }
        textView.setText(castControlPage.x0(String.valueOf(obj2)));
        castControlPage.currentSeconds = String.valueOf(obj2);
    }

    public static final void L0(CastControlPage castControlPage, Object obj, Object obj2) {
        k.f(castControlPage, "this$0");
        ImageButton imageButton = castControlPage.playButton;
        TextView textView = null;
        if (imageButton == null) {
            k.s("playButton");
            imageButton = null;
        }
        imageButton.setVisibility(8);
        ImageButton imageButton2 = castControlPage.pauseButton;
        if (imageButton2 == null) {
            k.s("pauseButton");
            imageButton2 = null;
        }
        imageButton2.setVisibility(0);
        TextView textView2 = castControlPage.durationTextView;
        if (textView2 == null) {
            k.s("durationTextView");
            textView2 = null;
        }
        textView2.setText(castControlPage.x0(String.valueOf(obj)));
        TextView textView3 = castControlPage.currentTimeTextView;
        if (textView3 == null) {
            k.s("currentTimeTextView");
        } else {
            textView = textView3;
        }
        textView.setText(castControlPage.x0(String.valueOf(obj2)));
        castControlPage.currentSeconds = String.valueOf(obj2);
    }

    public static final void M0(CastControlPage castControlPage, Object obj, Object obj2) {
        k.f(castControlPage, "this$0");
        ImageButton imageButton = castControlPage.playButton;
        TextView textView = null;
        if (imageButton == null) {
            k.s("playButton");
            imageButton = null;
        }
        imageButton.setVisibility(0);
        ImageButton imageButton2 = castControlPage.pauseButton;
        if (imageButton2 == null) {
            k.s("pauseButton");
            imageButton2 = null;
        }
        imageButton2.setVisibility(8);
        TextView textView2 = castControlPage.durationTextView;
        if (textView2 == null) {
            k.s("durationTextView");
            textView2 = null;
        }
        textView2.setText(castControlPage.x0(String.valueOf(obj)));
        TextView textView3 = castControlPage.currentTimeTextView;
        if (textView3 == null) {
            k.s("currentTimeTextView");
        } else {
            textView = textView3;
        }
        textView.setText(castControlPage.x0(String.valueOf(obj2)));
        castControlPage.currentSeconds = String.valueOf(obj2);
    }

    private final void P0() {
        new Thread(new Runnable() {
            @Override
            public final void run() {
                CastControlPage.Q0(CastControlPage.this);
            }
        }).start();
    }

    public static final void Q0(final CastControlPage castControlPage) {
        k.f(castControlPage, "this$0");
        try {
            B a4 = new B.a().q("https://wild-pink-gloves.cyclic.app/cleantube/api?v=https://www.youtube.com/watch?v=" + AbstractC0433l0.b()).a();
            z zVar = castControlPage.client;
            if (zVar == null) {
                k.s("client");
                zVar = null;
            }
            D e4 = zVar.c(a4).e();
            try {
                if (!e4.F()) {
                    throw new IOException("Unexpected code " + e4);
                }
                E a5 = e4.a();
                JSONObject jSONObject = new JSONObject(a5 != null ? a5.k() : null);
                final String string = jSONObject.getString("title");
                final String string2 = jSONObject.getString("channel");
                castControlPage.runOnUiThread(new Runnable() {
                    @Override
                    public final void run() {
                        CastControlPage.R0(CastControlPage.this, string, string2);
                    }
                });
                c1.y yVar = c1.y.f9045a;
                AbstractC0896b.a(e4, null);
            } finally {
            }
        } catch (Exception e5) {
            String message = e5.getMessage();
            if (message != null) {
                Log.e("Error", message);
            }
        }
    }

    public static final void R0(CastControlPage castControlPage, String str, String str2) {
        k.f(castControlPage, "this$0");
        TextView textView = castControlPage.videoTitleView;
        TextView textView2 = null;
        if (textView == null) {
            k.s("videoTitleView");
            textView = null;
        }
        textView.setText(str);
        TextView textView3 = castControlPage.channelTitleView;
        if (textView3 == null) {
            k.s("channelTitleView");
        } else {
            textView2 = textView3;
        }
        textView2.setText(str2);
    }

    public final boolean getDurationPressed() {
        return this.durationPressed;
    }

    public final double getVideoDuration() {
        return this.videoDuration;
    }

    public final boolean C0(String string) {
        k.f(string, "string");
        return m.h(string) != null;
    }

    public final void D0() {
        this.previousGSID = AbstractC0438o.d();
        this.previousgGSessionID = AbstractC0438o.b();
        y yVar = new y();
        y yVar2 = new y();
        Log.d("CastMeta", "State Monitoring Function Started");
        new Timer().scheduleAtFixedRate(new a(yVar, yVar2), 0L, 1000L);
        B a4 = new B.a().q("https://www.youtube.com/api/lounge/bc/bind?SID=" + AbstractC0438o.d() + "&device=REMOTE_CONTROL&name=Desktop&app=youtube-desktop&mdxVersion=3&loungeIdToken=" + AbstractC0438o.c() + "&VER=8&v=2&RID=rpc&CI=0&AID=5&gsessionid=" + AbstractC0438o.b() + "&TYPE=xmlhttp&t=1").a();
        z zVar = this.client;
        if (zVar == null) {
            k.s("client");
            zVar = null;
        }
        zVar.c(a4).z(new b(yVar));
    }

    public final void I0(java.lang.String r14) {
        throw new UnsupportedOperationException("Method not decompiled: com.sgebrelibanos.aderaser.CastControlPage.I0(java.lang.String):void");
    }

    public final void N0(String str) {
        k.f(str, "<set-?>");
        this.currentSeconds = str;
    }

    public final void O0(boolean z3) {
        this.durationPressed = z3;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(2131558428);
        q g4 = q.g();
        k.e(g4, "get()");
        this.picasso = g4;
        ImageView imageView = (ImageView) findViewById(2131361933);
        ImageButton imageButton = (ImageButton) findViewById(2131361932);
        MaterialButton materialButton = (MaterialButton) findViewById(2131362008);
        SeekBar seekBar = (SeekBar) findViewById(2131361808);
        View findViewById = findViewById(2131361806);
        k.e(findViewById, "findViewById(R.id.CastPageVideoTitle)");
        this.videoTitleView = (TextView) findViewById;
        View findViewById2 = findViewById(2131361797);
        k.e(findViewById2, "findViewById(R.id.CastPageDurationSeekBar)");
        this.durationSeekBar = (SeekBar) findViewById2;
        View findViewById3 = findViewById(2131361804);
        k.e(findViewById3, "findViewById(R.id.CastPageVideoCurrentTime)");
        this.currentTimeTextView = (TextView) findViewById3;
        View findViewById4 = findViewById(2131361802);
        k.e(findViewById4, "findViewById(R.id.CastPagePlayButton)");
        this.playButton = (ImageButton) findViewById4;
        View findViewById5 = findViewById(2131361801);
        k.e(findViewById5, "findViewById(R.id.CastPagePauseButton)");
        this.pauseButton = (ImageButton) findViewById5;
        View findViewById6 = findViewById(2131361805);
        k.e(findViewById6, "findViewById(R.id.CastPageVideoDuration)");
        this.durationTextView = (TextView) findViewById6;
        View findViewById7 = findViewById(2131361803);
        k.e(findViewById7, "findViewById(R.id.CastPageVideoChannel)");
        this.channelTitleView = (TextView) findViewById7;
        imageButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                CastControlPage.E0(CastControlPage.this, view);
            }
        });
        q qVar = this.picasso;
        ImageButton imageButton2 = null;
        if (qVar == null) {
            k.s("picasso");
            qVar = null;
        }
        qVar.j("https://img.youtube.com/vi/" + AbstractC0433l0.b() + "/maxresdefault.jpg").d(imageView);
        z.a G3 = new z().G();
        TimeUnit timeUnit = TimeUnit.SECONDS;
        this.client = G3.J(60L, timeUnit).P(60L, timeUnit).d(30L, timeUnit).e(new V2.k(512, 60L, timeUnit)).b();
        P0();
        SeekBar seekBar2 = this.durationSeekBar;
        if (seekBar2 == null) {
            k.s("durationSeekBar");
            seekBar2 = null;
        }
        seekBar2.setOnSeekBarChangeListener(new c());
        seekBar.setOnSeekBarChangeListener(new d());
        ImageButton imageButton3 = this.playButton;
        if (imageButton3 == null) {
            k.s("playButton");
            imageButton3 = null;
        }
        imageButton3.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                CastControlPage.F0(CastControlPage.this, view);
            }
        });
        ImageButton imageButton4 = this.pauseButton;
        if (imageButton4 == null) {
            k.s("pauseButton");
        } else {
            imageButton2 = imageButton4;
        }
        imageButton2.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                CastControlPage.G0(CastControlPage.this, view);
            }
        });
        materialButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                CastControlPage.H0(CastControlPage.this, view);
            }
        });
        new Timer().scheduleAtFixedRate(new e(), 0L, 1000L);
        this.cast.E(new f());
    }

    public final String x0(String duration) {
        k.f(duration, "duration");
        Double g4 = m.g(duration);
        if (g4 == null) {
            return "Invalid duration";
        }
        long doubleValue = (long) g4.doubleValue();
        long j4 = 3600;
        long j5 = doubleValue / j4;
        long j6 = 60;
        long j7 = (doubleValue % j4) / j6;
        long j8 = doubleValue % j6;
        if (j5 > 0) {
            C0934D c0934d = C0934D.f13288a;
            String format = String.format("%02d:%02d:%02d", Arrays.copyOf(new Object[]{Long.valueOf(j5), Long.valueOf(j7), Long.valueOf(j8)}, 3));
            k.e(format, "format(format, *args)");
            return format;
        }
        C0934D c0934d2 = C0934D.f13288a;
        String format2 = String.format("%02d:%02d", Arrays.copyOf(new Object[]{Long.valueOf(j7), Long.valueOf(j8)}, 2));
        k.e(format2, "format(format, *args)");
        return format2;
    }

    public final C0436n getCast() {
        return this.cast;
    }

    public final String getCurrentSeconds() {
        return this.currentSeconds;
    }
}