MEGA STAR IPTV v3.4版本的 MD5 值为:f68c82adeb6c1166a42c50cbe0c3cfa6

以下内容为反编译后的 a.java 源代码,内容仅作参考


package n7;

import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.pierfrancescosoffritti.androidyoutubeplayer.core.player.views.LegacyYouTubePlayerView;
import com.pierfrancescosoffritti.androidyoutubeplayer.core.ui.views.YouTubePlayerSeekBar;
public final class a implements n7.c, j7.d, j7.c, r7.b {
    private o7.b f8954b;
    private final View f8955c;
    private final View f8956d;
    private final LinearLayout f8957e;
    private final TextView f8958f;
    private final TextView f8959g;
    private final ProgressBar f8960h;
    private final ImageView f8961i;
    private final ImageView f8962j;
    private final ImageView f8963k;
    private final ImageView f8964l;
    private final ImageView f8965m;
    private final ImageView f8966n;
    private final YouTubePlayerSeekBar f8967o;
    private View.OnClickListener f8968p;
    private View.OnClickListener f8969q;
    private final q7.a f8970r;
    private boolean f8971s;
    private boolean f8972t;
    private boolean f8973u;
    private boolean f8974v;
    private final LegacyYouTubePlayerView f8975w;
    private final i7.e f8976x;

    static final class View$OnClickListenerC0134a implements View.OnClickListener {
        View$OnClickListenerC0134a() {
        }

        @Override
        public final void onClick(View view) {
            a.this.f8975w.r();
        }
    }

    static final class b implements View.OnClickListener {
        b() {
        }

        @Override
        public final void onClick(View view) {
            a.this.f8954b.a(a.this.f8961i);
        }
    }

    public static final class c implements View.OnClickListener {
        c() {
        }

        @Override
        public final void onClick(View view) {
            a.this.f8970r.i();
        }
    }

    public static final class d implements View.OnClickListener {
        d() {
        }

        @Override
        public final void onClick(View view) {
            a.this.E();
        }
    }

    public static final class e implements View.OnClickListener {
        e() {
        }

        @Override
        public final void onClick(View view) {
            a.this.f8968p.onClick(a.this.f8964l);
        }
    }

    public static final class f implements View.OnClickListener {
        f() {
        }

        @Override
        public final void onClick(View view) {
            a.this.f8969q.onClick(a.this.f8961i);
        }
    }

    static final class g implements View.OnClickListener {
        final String f8984c;

        g(String str) {
            this.f8984c = str;
        }

        @Override
        public final void onClick(View view) {
            try {
                a.this.f8963k.getContext().startActivity(new Intent("android.intent.action.VIEW", Uri.parse("http://www.youtube.com/watch?v=" + this.f8984c + "#t=" + a.this.f8967o.getSeekBar().getProgress())));
            } catch (Exception e9) {
                a.this.getClass();
                e9.getMessage();
            }
        }
    }

    public a(LegacyYouTubePlayerView legacyYouTubePlayerView, i7.e eVar) {
        t8.c.c(legacyYouTubePlayerView, "youTubePlayerView");
        t8.c.c(eVar, "youTubePlayer");
        this.f8975w = legacyYouTubePlayerView;
        this.f8976x = eVar;
        this.f8972t = true;
        View inflate = View.inflate(legacyYouTubePlayerView.getContext(), h7.e.ayp_default_player_ui, legacyYouTubePlayerView);
        Context context = legacyYouTubePlayerView.getContext();
        t8.c.b(context, "youTubePlayerView.context");
        this.f8954b = new p7.a(context);
        View findViewById = inflate.findViewById(h7.d.panel);
        t8.c.b(findViewById, "controlsView.findViewById(R.id.panel)");
        this.f8955c = findViewById;
        View findViewById2 = inflate.findViewById(h7.d.controls_container);
        t8.c.b(findViewById2, "controlsView.findViewById(R.id.controls_container)");
        this.f8956d = findViewById2;
        View findViewById3 = inflate.findViewById(h7.d.extra_views_container);
        t8.c.b(findViewById3, "controlsView.findViewByI…id.extra_views_container)");
        this.f8957e = (LinearLayout) findViewById3;
        View findViewById4 = inflate.findViewById(h7.d.video_title);
        t8.c.b(findViewById4, "controlsView.findViewById(R.id.video_title)");
        this.f8958f = (TextView) findViewById4;
        View findViewById5 = inflate.findViewById(h7.d.live_video_indicator);
        t8.c.b(findViewById5, "controlsView.findViewByI….id.live_video_indicator)");
        this.f8959g = (TextView) findViewById5;
        View findViewById6 = inflate.findViewById(h7.d.progress);
        t8.c.b(findViewById6, "controlsView.findViewById(R.id.progress)");
        this.f8960h = (ProgressBar) findViewById6;
        View findViewById7 = inflate.findViewById(h7.d.menu_button);
        t8.c.b(findViewById7, "controlsView.findViewById(R.id.menu_button)");
        this.f8961i = (ImageView) findViewById7;
        View findViewById8 = inflate.findViewById(h7.d.play_pause_button);
        t8.c.b(findViewById8, "controlsView.findViewById(R.id.play_pause_button)");
        this.f8962j = (ImageView) findViewById8;
        View findViewById9 = inflate.findViewById(h7.d.youtube_button);
        t8.c.b(findViewById9, "controlsView.findViewById(R.id.youtube_button)");
        this.f8963k = (ImageView) findViewById9;
        View findViewById10 = inflate.findViewById(h7.d.fullscreen_button);
        t8.c.b(findViewById10, "controlsView.findViewById(R.id.fullscreen_button)");
        this.f8964l = (ImageView) findViewById10;
        View findViewById11 = inflate.findViewById(h7.d.custom_action_left_button);
        t8.c.b(findViewById11, "controlsView.findViewByI…ustom_action_left_button)");
        this.f8965m = (ImageView) findViewById11;
        View findViewById12 = inflate.findViewById(h7.d.custom_action_right_button);
        t8.c.b(findViewById12, "controlsView.findViewByI…stom_action_right_button)");
        this.f8966n = (ImageView) findViewById12;
        View findViewById13 = inflate.findViewById(h7.d.youtube_player_seekbar);
        t8.c.b(findViewById13, "controlsView.findViewByI…d.youtube_player_seekbar)");
        this.f8967o = (YouTubePlayerSeekBar) findViewById13;
        this.f8970r = new q7.a(findViewById2);
        this.f8968p = new View$OnClickListenerC0134a();
        this.f8969q = new b();
        D();
    }

    private final void D() {
        this.f8976x.c(this.f8967o);
        this.f8976x.c(this.f8970r);
        this.f8967o.setYoutubePlayerSeekBarListener(this);
        this.f8955c.setOnClickListener(new c());
        this.f8962j.setOnClickListener(new d());
        this.f8964l.setOnClickListener(new e());
        this.f8961i.setOnClickListener(new f());
    }

    public final void E() {
        if (this.f8971s) {
            this.f8976x.pause();
        } else {
            this.f8976x.a();
        }
    }

    private final void F(boolean z9) {
        this.f8962j.setImageResource(z9 ? h7.c.ayp_ic_pause_36dp : h7.c.ayp_ic_play_36dp);
    }

    private final void G(i7.d dVar) {
        int i9 = n7.b.f8985a[dVar.ordinal()];
        if (i9 == 1 || i9 == 2) {
            this.f8971s = false;
        } else if (i9 == 3) {
            this.f8971s = true;
        }
        F(!this.f8971s);
    }

    @Override
    public void a(i7.e eVar, i7.a aVar) {
        t8.c.c(eVar, "youTubePlayer");
        t8.c.c(aVar, "playbackQuality");
    }

    @Override
    public void b(float f9) {
        this.f8976x.b(f9);
    }

    @Override
    public void c() {
        this.f8964l.setImageResource(h7.c.ayp_ic_fullscreen_24dp);
    }

    @Override
    public n7.c d(boolean z9) {
        this.f8964l.setVisibility(z9 ? 0 : 8);
        return this;
    }

    @Override
    public void e(i7.e eVar) {
        t8.c.c(eVar, "youTubePlayer");
    }

    @Override
    public void f(i7.e eVar, String str) {
        t8.c.c(eVar, "youTubePlayer");
        t8.c.c(str, "videoId");
        this.f8963k.setOnClickListener(new g(str));
    }

    @Override
    public void g(i7.e eVar, i7.b bVar) {
        t8.c.c(eVar, "youTubePlayer");
        t8.c.c(bVar, "playbackRate");
    }

    @Override
    public void h(i7.e eVar, i7.d dVar) {
        t8.c.c(eVar, "youTubePlayer");
        t8.c.c(dVar, "state");
        G(dVar);
        i7.d dVar2 = i7.d.PLAYING;
        if (dVar == dVar2 || dVar == i7.d.PAUSED || dVar == i7.d.VIDEO_CUED) {
            View view = this.f8955c;
            view.setBackgroundColor(y.b.b(view.getContext(), 17170445));
            this.f8960h.setVisibility(8);
            if (this.f8972t) {
                this.f8962j.setVisibility(0);
            }
            if (this.f8973u) {
                this.f8965m.setVisibility(0);
            }
            if (this.f8974v) {
                this.f8966n.setVisibility(0);
            }
            F(dVar == dVar2);
            return;
        }
        F(false);
        if (dVar == i7.d.BUFFERING) {
            this.f8960h.setVisibility(0);
            View view2 = this.f8955c;
            view2.setBackgroundColor(y.b.b(view2.getContext(), 17170445));
            if (this.f8972t) {
                this.f8962j.setVisibility(4);
            }
            this.f8965m.setVisibility(8);
            this.f8966n.setVisibility(8);
        }
        if (dVar == i7.d.UNSTARTED) {
            this.f8960h.setVisibility(8);
            if (this.f8972t) {
                this.f8962j.setVisibility(0);
            }
        }
    }

    @Override
    public void i() {
        this.f8964l.setImageResource(h7.c.ayp_ic_fullscreen_exit_24dp);
    }

    @Override
    public void j(i7.e eVar) {
        t8.c.c(eVar, "youTubePlayer");
    }

    @Override
    public n7.c k(boolean z9) {
        this.f8967o.getVideoDurationTextView().setVisibility(z9 ? 0 : 8);
        return this;
    }

    @Override
    public n7.c l(boolean z9) {
        this.f8963k.setVisibility(z9 ? 0 : 8);
        return this;
    }

    @Override
    public void m(i7.e eVar, float f9) {
        t8.c.c(eVar, "youTubePlayer");
    }

    @Override
    public n7.c n(boolean z9) {
        this.f8967o.getSeekBar().setVisibility(z9 ? 0 : 4);
        return this;
    }

    @Override
    public void o(i7.e eVar, i7.c cVar) {
        t8.c.c(eVar, "youTubePlayer");
        t8.c.c(cVar, "error");
    }

    @Override
    public n7.c p(boolean z9) {
        this.f8967o.getVideoCurrentTimeTextView().setVisibility(z9 ? 0 : 8);
        return this;
    }

    @Override
    public void q(i7.e eVar, float f9) {
        t8.c.c(eVar, "youTubePlayer");
    }

    @Override
    public void r(i7.e eVar, float f9) {
        t8.c.c(eVar, "youTubePlayer");
    }

    @Override
    public n7.c s(boolean z9) {
        this.f8967o.setVisibility(z9 ? 4 : 0);
        this.f8959g.setVisibility(z9 ? 0 : 8);
        return this;
    }
}