CCIPTV PRO v3.0.9.1版本的 MD5 值为:e78d4d980447be4a9f823314f45bbf03
以下内容为反编译后的 a.java 源代码,内容仅作参考
package f.g.a.g;
import android.animation.Animator;
import android.content.Intent;
import android.net.Uri;
import android.os.Handler;
import android.os.Looper;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.SeekBar;
import android.widget.TextView;
import com.pierfrancescosoffritti.youtubeplayer.player.YouTubePlayerView;
import f.g.a.f.e;
import f.g.a.f.g;
import me.zhanghai.android.materialprogressbar.SingleCircularProgressDrawable;
public class a implements f.g.a.g.b, g, e, View.OnClickListener, SeekBar.OnSeekBarChangeListener {
public final YouTubePlayerView b;
public final f.g.a.f.c c;
public f.g.a.g.c.b f9461d;
public View f9462e;
public View f9463f;
public TextView f9464g;
public TextView f9465h;
public TextView f9466i;
public ProgressBar f9467j;
public ImageView f9468k;
public ImageView f9469l;
public ImageView f9470m;
public ImageView f9471n;
public ImageView f9472o;
public ImageView f9473p;
public SeekBar f9474q;
public View.OnClickListener r;
public View.OnClickListener s;
public boolean t = false;
public boolean u = true;
public boolean v = false;
public boolean w = true;
public boolean x = true;
public boolean y = true;
public final Handler z = new Handler(Looper.getMainLooper());
public final Runnable A = new RunnableC0240a();
public boolean B = false;
public int C = -1;
public class RunnableC0240a implements Runnable {
public RunnableC0240a() {
}
@Override
public void run() {
a.this.t(SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL);
}
}
public class b implements Animator.AnimatorListener {
public final float b;
public b(float f2) {
this.b = f2;
}
@Override
public void onAnimationCancel(Animator animator) {
}
@Override
public void onAnimationEnd(Animator animator) {
if (this.b == SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL) {
a.this.f9463f.setVisibility(8);
}
}
@Override
public void onAnimationRepeat(Animator animator) {
}
@Override
public void onAnimationStart(Animator animator) {
if (this.b == 1.0f) {
a.this.f9463f.setVisibility(0);
}
}
}
public class c implements View.OnClickListener {
public final String b;
public c(String str) {
this.b = str;
}
@Override
public void onClick(View view) {
a.this.f9463f.getContext().startActivity(new Intent("android.intent.action.VIEW", Uri.parse("http://www.youtube.com/watch?v=" + this.b + "#t=" + a.this.f9474q.getProgress())));
}
}
public class d implements Runnable {
public d() {
}
@Override
public void run() {
a.this.f9466i.setText("");
}
}
public a(YouTubePlayerView youTubePlayerView, f.g.a.f.c cVar) {
this.b = youTubePlayerView;
this.c = cVar;
u(View.inflate(youTubePlayerView.getContext(), f.g.a.d.default_player_ui, youTubePlayerView));
this.f9461d = new f.g.a.g.c.c.a(youTubePlayerView.getContext());
}
public final void A() {
t(this.u ? SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL : 1.0f);
}
public final void B(int i2) {
if (i2 != -1) {
if (i2 != 0) {
if (i2 == 1) {
this.t = true;
}
}
this.t = false;
} else {
y();
}
C(!this.t);
}
public final void C(boolean z) {
this.f9469l.setImageResource(z ? f.g.a.b.ic_pause_36dp : f.g.a.b.ic_play_36dp);
}
@Override
public void a(int i2) {
this.C = -1;
B(i2);
if (i2 == 1 || i2 == 2 || i2 == 5) {
this.f9462e.setBackgroundColor(d.h.i.b.d(this.b.getContext(), 17170445));
this.f9467j.setVisibility(8);
if (this.x) {
this.f9469l.setVisibility(0);
}
this.v = true;
boolean z = i2 == 1;
C(z);
if (z) {
z();
return;
} else {
this.z.removeCallbacks(this.A);
return;
}
}
C(false);
t(1.0f);
if (i2 == 3) {
this.f9462e.setBackgroundColor(d.h.i.b.d(this.b.getContext(), 17170445));
if (this.x) {
this.f9469l.setVisibility(4);
}
this.f9472o.setVisibility(8);
this.f9473p.setVisibility(8);
this.v = false;
}
if (i2 == -1) {
this.v = false;
this.f9467j.setVisibility(8);
if (this.x) {
this.f9469l.setVisibility(0);
}
}
}
@Override
public void b(boolean z) {
this.f9471n.setVisibility(z ? 0 : 8);
}
@Override
public void c(String str) {
}
@Override
public void d(String str) {
}
@Override
public void e(boolean z) {
this.f9470m.setVisibility(z ? 0 : 8);
}
@Override
public void f(float f2) {
if (!this.y) {
this.f9474q.setSecondaryProgress(0);
return;
}
SeekBar seekBar = this.f9474q;
seekBar.setSecondaryProgress((int) (f2 * seekBar.getMax()));
}
@Override
public void g(String str) {
this.f9470m.setOnClickListener(new c(str));
}
@Override
public void h() {
}
@Override
public void i() {
this.f9471n.setImageResource(f.g.a.b.ic_fullscreen_24dp);
}
@Override
public void j(boolean z) {
this.f9464g.setVisibility(z ? 0 : 8);
}
@Override
public void k(float f2) {
this.f9466i.setText(f.g.a.h.c.a(f2));
this.f9474q.setMax((int) f2);
}
@Override
public void l(float f2) {
if (this.B) {
return;
}
if (this.C <= 0 || f.g.a.h.c.a(f2).equals(f.g.a.h.c.a(this.C))) {
this.C = -1;
this.f9474q.setProgress((int) f2);
}
}
@Override
public void m() {
}
@Override
public void n() {
this.f9471n.setImageResource(f.g.a.b.ic_fullscreen_exit_24dp);
}
@Override
public void o(boolean z) {
this.f9469l.setVisibility(z ? 0 : 8);
this.x = z;
}
@Override
public void onClick(View view) {
if (view == this.f9462e) {
A();
} else if (view == this.f9469l) {
x();
} else if (view == this.f9471n) {
v();
} else if (view == this.f9468k) {
w();
}
}
@Override
public void onError(int i2) {
}
@Override
public void onProgressChanged(SeekBar seekBar, int i2, boolean z) {
this.f9465h.setText(f.g.a.h.c.a(i2));
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
this.B = true;
}
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
if (this.t) {
this.C = seekBar.getProgress();
}
this.c.b(seekBar.getProgress());
this.B = false;
}
public final void t(float f2) {
if (this.v && this.w) {
this.u = f2 != SingleCircularProgressDrawable.START_ANGLE_MAX_NORMAL;
if (f2 == 1.0f && this.t) {
z();
} else {
this.z.removeCallbacks(this.A);
}
this.f9463f.animate().alpha(f2).setDuration(300L).setListener(new b(f2)).start();
}
}
public final void u(View view) {
this.f9462e = view.findViewById(f.g.a.c.panel);
this.f9463f = view.findViewById(f.g.a.c.controls_root);
LinearLayout linearLayout = (LinearLayout) view.findViewById(f.g.a.c.extra_views_container);
this.f9464g = (TextView) view.findViewById(f.g.a.c.video_title);
this.f9465h = (TextView) view.findViewById(f.g.a.c.video_current_time);
this.f9466i = (TextView) view.findViewById(f.g.a.c.video_duration);
TextView textView = (TextView) view.findViewById(f.g.a.c.live_video_indicator);
this.f9467j = (ProgressBar) view.findViewById(f.g.a.c.progress);
this.f9468k = (ImageView) view.findViewById(f.g.a.c.menu_button);
this.f9469l = (ImageView) view.findViewById(f.g.a.c.play_pause_button);
this.f9470m = (ImageView) view.findViewById(f.g.a.c.youtube_button);
this.f9471n = (ImageView) view.findViewById(f.g.a.c.fullscreen_button);
this.f9472o = (ImageView) view.findViewById(f.g.a.c.custom_action_left_button);
this.f9473p = (ImageView) view.findViewById(f.g.a.c.custom_action_right_button);
SeekBar seekBar = (SeekBar) view.findViewById(f.g.a.c.seek_bar);
this.f9474q = seekBar;
seekBar.setOnSeekBarChangeListener(this);
this.f9462e.setOnClickListener(this);
this.f9469l.setOnClickListener(this);
this.f9468k.setOnClickListener(this);
this.f9471n.setOnClickListener(this);
}
public final void v() {
View.OnClickListener onClickListener = this.r;
if (onClickListener == null) {
this.b.n();
} else {
onClickListener.onClick(this.f9471n);
}
}
public final void w() {
View.OnClickListener onClickListener = this.s;
if (onClickListener == null) {
this.f9461d.a(this.f9468k);
} else {
onClickListener.onClick(this.f9468k);
}
}
public final void x() {
if (this.t) {
this.c.pause();
} else {
this.c.play();
}
}
public final void y() {
this.f9474q.setProgress(0);
this.f9474q.setMax(0);
this.f9466i.post(new d());
}
public final void z() {
this.z.postDelayed(this.A, 3000L);
}
}