整点视频 v3.3.0版本的 MD5 值为:cba0457dc37421eed445b30f92de25d3
以下内容为反编译后的 DownloadVideoPlayActivity.java 源代码,内容仅作参考
package com.ys.resemble.ui.mine;
import android.content.res.Configuration;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.annotation.Nullable;
import chuangyuan.ycj.videolibrary.listener.OnGestureBrightnessListener;
import chuangyuan.ycj.videolibrary.listener.OnGestureFastForwardListener;
import chuangyuan.ycj.videolibrary.listener.OnGestureVolumeListener;
import chuangyuan.ycj.videolibrary.listener.VideoInfoListener;
import chuangyuan.ycj.videolibrary.video.OooO;
import com.google.android.exoplayer2.ExoPlaybackException;
import com.wholepoint.wpfilms.R;
import com.ys.resemble.app.AppApplication;
import com.ys.resemble.app.BaseActivity;
import com.ys.resemble.data.local.VideoLookHistoryDao;
import com.ys.resemble.databinding.ActivityDownloadVideoPlayBinding;
import com.ys.resemble.entity.table.VideoDownloadEntity;
import com.ys.resemble.entity.table.VideoLookHistoryEntry;
import io.reactivex.functions.Consumer;
import java.util.ArrayList;
import java.util.List;
import me.goldze.mvvmhabit.base.BaseApplication;
public class DownloadVideoPlayActivity extends BaseActivity<ActivityDownloadVideoPlayBinding, DownloadVideoPlayViewModel> implements View.OnClickListener {
private boolean OooO;
private chuangyuan.ycj.videolibrary.video.OooO00o OooO00o;
private ProgressBar OooO0O0;
private ProgressBar OooO0OO;
private ImageView OooO0Oo;
private VideoDownloadEntity OooO0o;
private ImageView OooO0o0;
private VideoLookHistoryEntry OooO0oo;
private RelativeLayout OooOO0;
private TextView OooOO0O;
private ImageView OooOO0o;
private com.ys.resemble.widgets.dialog.o000oOoO OooOOO;
private TextView OooOOO0;
private ImageView OooOOOO;
private com.ys.resemble.widgets.dialog.o0ooOOo OooOOOo;
private com.ys.resemble.widgets.dialog.downloadcomplete.OooO0O0 OooOOo;
private com.ys.resemble.widgets.dialog.downloadcomplete.OooO00o OooOOo0;
public List<VideoDownloadEntity> OooO0oO = new ArrayList();
private int OooOOoo = 0;
class OooO implements VideoInfoListener {
OooO() {
}
@Override
public void isPlaying(boolean z) {
}
@Override
public void onLoadingChanged() {
}
@Override
public void onPlayEnd() {
List<VideoDownloadEntity> list = DownloadVideoPlayActivity.this.OooO0oO;
if (list == null || list.size() <= 0 || DownloadVideoPlayActivity.this.OooOOoo == DownloadVideoPlayActivity.this.OooO0oO.size() - 1) {
return;
}
DownloadVideoPlayActivity.this.OooOOOO();
}
@Override
public void onPlayStart(long j) {
}
@Override
public void onPlayerError(@Nullable ExoPlaybackException exoPlaybackException) {
}
}
class OooO00o implements View.OnClickListener {
OooO00o() {
}
@Override
public void onClick(View view) {
DownloadVideoPlayActivity.this.finish();
}
}
class OooO0O0 implements OnGestureFastForwardListener {
OooO0O0() {
}
@Override
public void setFastPosition(int i) {
((ActivityDownloadVideoPlayBinding) ((BaseActivity) DownloadVideoPlayActivity.this).binding).exoPlayContextId.getGestureFastForwardLayout().setVisibility(0);
DownloadVideoPlayActivity downloadVideoPlayActivity = DownloadVideoPlayActivity.this;
com.od.OoooOO0.o0ooOOo.OooO0O0(downloadVideoPlayActivity, R.drawable.ic_video_fast, downloadVideoPlayActivity.OooO0Oo, true);
DownloadVideoPlayActivity.this.OooO00o.OoooOOo(2.0f, 1.0f);
}
}
class OooO0OO implements OnGestureVolumeListener {
OooO0OO() {
}
@Override
public void setVolumePosition(int i, int i2) {
((ActivityDownloadVideoPlayBinding) ((BaseActivity) DownloadVideoPlayActivity.this).binding).exoPlayContextId.getGestureAudioLayout().setVisibility(0);
DownloadVideoPlayActivity.this.OooO0O0.setMax(i);
DownloadVideoPlayActivity.this.OooO0O0.setProgress(i2);
}
}
class OooO0o implements OnGestureBrightnessListener {
OooO0o() {
}
@Override
public void setBrightnessPosition(int i, int i2) {
((ActivityDownloadVideoPlayBinding) ((BaseActivity) DownloadVideoPlayActivity.this).binding).exoPlayContextId.getGestureBrightnessLayout().setVisibility(0);
DownloadVideoPlayActivity.this.OooO0OO.setMax(i);
DownloadVideoPlayActivity.this.OooO0OO.setProgress(i2);
}
}
public void OooOOO(com.ys.resemble.event.o0000 o0000Var) throws Exception {
this.OooOOoo = o0000Var.OooO00o;
if (this.OooO0o.getVideoType() == 3) {
OooOOOo(o0000Var.OooO00o);
} else if (this.OooO0o.getVideoType() == 2 || this.OooO0o.getVideoType() == 4) {
OooOOOo(o0000Var.OooO00o);
}
}
@Override
public DownloadVideoPlayViewModel initViewModel() {
return new DownloadVideoPlayViewModel(BaseApplication.OooO00o(), com.ys.resemble.app.OooO0O0.OooO00o());
}
public void OooOO0o() {
if (this.OooO00o.OooOoOO() == null || this.OooO00o.OooOoOO().getContentPosition() <= 0) {
return;
}
VideoLookHistoryEntry videoLookHistoryEntry = new VideoLookHistoryEntry();
videoLookHistoryEntry.setId(this.OooO0o.getId());
if (this.OooO0o.getVideoType() != 2 && this.OooO0o.getVideoType() != 4 && this.OooO0o.getVideoType() != 3) {
videoLookHistoryEntry.setName(this.OooO0o.getName());
} else {
videoLookHistoryEntry.setName(this.OooO0o.getComplete_name());
}
videoLookHistoryEntry.setCoverUrl(this.OooO0o.getCoverUrl());
videoLookHistoryEntry.setVideoDesc("");
videoLookHistoryEntry.setVideoType(this.OooO0o.getVideoType());
videoLookHistoryEntry.setUrl(this.OooO0o.getUrl());
videoLookHistoryEntry.setUpdateTime(System.currentTimeMillis());
videoLookHistoryEntry.setCurrent(this.OooO0o.getVideo_position());
videoLookHistoryEntry.setContentPosition(this.OooO00o.OooOoOO().getContentPosition());
videoLookHistoryEntry.setDuration(this.OooO00o.OooOo0o());
VideoLookHistoryDao.getInstance().insertHistory(videoLookHistoryEntry);
}
public void OooOOOO() {
String url;
if (this.OooO0oO.size() > 0) {
if (this.OooOOoo >= this.OooO0oO.size() - 1) {
me.goldze.mvvmhabit.utils.o000oOoO.OooO0OO("已经播放到最后一集");
return;
}
int i = this.OooOOoo + 1;
this.OooOOoo = i;
VideoDownloadEntity videoDownloadEntity = this.OooO0oO.get(i);
this.OooO0o = videoDownloadEntity;
if (!me.goldze.mvvmhabit.utils.Oooo000.OooO00o(videoDownloadEntity.getOrginal_url())) {
url = "http://127.0.0.1:" + AppApplication.OooO0OO + "/resource.m3u8?src=" + com.ys.resemble.util.OooOOO.OooO00o(this.OooO0o.getOrginal_url());
} else {
url = this.OooO0o.getUrl();
}
this.OooO00o.Oooo();
this.OooO00o.OoooOOO(url);
((ActivityDownloadVideoPlayBinding) this.binding).exoPlayContextId.setTitle(this.OooO0o.getComplete_name());
this.OooO00o.OoooOoO(0L);
this.OooO00o.OooooOO();
}
}
public void OooOOOo(int i) {
String url;
VideoDownloadEntity videoDownloadEntity = this.OooO0oO.get(i);
this.OooO0o = videoDownloadEntity;
if (!me.goldze.mvvmhabit.utils.Oooo000.OooO00o(videoDownloadEntity.getOrginal_url())) {
url = "http://127.0.0.1:" + AppApplication.OooO0OO + "/resource.m3u8?src=" + com.ys.resemble.util.OooOOO.OooO00o(this.OooO0o.getOrginal_url());
} else {
url = this.OooO0o.getUrl();
}
this.OooO00o.Oooo();
this.OooO00o.OoooOOO(url);
((ActivityDownloadVideoPlayBinding) this.binding).exoPlayContextId.setTitle(this.OooO0o.getComplete_name());
this.OooO00o.OoooOoO(0L);
this.OooO00o.OooooOO();
}
@Override
public void exitNetChangeDialog() {
super.exitNetChangeDialog();
me.goldze.mvvmhabit.base.OooO00o.OooO0o().OooO00o();
}
@Override
public int initContentView(Bundle bundle) {
return R.layout.activity_download_video_play;
}
@Override
public void initData() {
super.initData();
this.OooO0o = (VideoDownloadEntity) getIntent().getSerializableExtra("videoDownloadEntry");
this.OooO0oO = (List) getIntent().getSerializableExtra("videoDownloadList");
this.OooO = getIntent().getBooleanExtra("flag", false);
this.OooOO0O = (TextView) findViewById(R.id.tv_speed);
RelativeLayout relativeLayout = (RelativeLayout) findViewById(R.id.rl_speed);
this.OooOO0 = relativeLayout;
relativeLayout.setOnClickListener(this);
ImageView imageView = (ImageView) findViewById(R.id.iv_video_more);
this.OooOOOO = imageView;
imageView.setOnClickListener(this);
ArrayList<VideoLookHistoryEntry> queryItemHistory = VideoLookHistoryDao.getInstance().queryItemHistory(this.OooO0o.getId());
if (queryItemHistory.size() > 0) {
for (int i = 0; i < queryItemHistory.size(); i++) {
if (this.OooO0o.getComplete_name().equals(queryItemHistory.get(i).getName())) {
this.OooO0oo = queryItemHistory.get(i);
}
}
}
if (this.OooO0oO != null) {
int i2 = 0;
while (true) {
if (i2 >= this.OooO0oO.size()) {
break;
} else if (this.OooO0o.getStreamid().equals(this.OooO0oO.get(i2).getStreamid())) {
this.OooOOoo = i2;
break;
} else {
i2++;
}
}
}
this.OooO0o0 = (ImageView) findViewById(R.id.exo_controls_back);
this.OooO0OO = (ProgressBar) findViewById(R.id.exo_video_audio_brightness_pro_my);
this.OooO0O0 = (ProgressBar) findViewById(R.id.exo_video_audio_pro_my);
this.OooO0Oo = (ImageView) findViewById(R.id.exo_video_fast_img_my);
this.OooOO0o = (ImageView) findViewById(R.id.iv_exo_next);
this.OooOOO0 = (TextView) findViewById(R.id.tv_set_num);
this.OooOO0o.setOnClickListener(this);
this.OooOOO0.setOnClickListener(this);
if (this.OooO) {
this.OooOO0o.setVisibility(0);
this.OooOOO0.setVisibility(0);
}
this.OooO0o0.setOnClickListener(new OooO00o());
chuangyuan.ycj.videolibrary.whole.OooO00o oooO00o = new chuangyuan.ycj.videolibrary.whole.OooO00o(BaseApplication.OooO00o(), new com.od.Oooo.OooO0o(this, null));
OooO.OooO0O0 oooO0O0 = new OooO.OooO0O0(this, 1, R.id.exo_play_context_id);
oooO0O0.OooO0Oo(oooO00o);
oooO0O0.OooO0oo(true);
oooO0O0.OooO(false);
oooO0O0.OooOO0O(false);
oooO0O0.OooOO0(this.OooO0o.getComplete_name());
oooO0O0.OooO0o0(new OooO0o());
oooO0O0.OooO0oO(new OooO0OO());
oooO0O0.OooO0o(new OooO0O0());
this.OooO00o = oooO0O0.OooO0O0();
String url = !me.goldze.mvvmhabit.utils.Oooo000.OooO00o(this.OooO0o.getOrginal_url()) ? "http://127.0.0.1:" + AppApplication.OooO0OO + "/resource.m3u8?src=" + com.ys.resemble.util.OooOOO.OooO00o(this.OooO0o.getOrginal_url()) : this.OooO0o.getUrl();
if (!me.goldze.mvvmhabit.utils.Oooo000.OooO00o(url)) {
this.OooO00o.OoooOOO(url);
VideoLookHistoryEntry videoLookHistoryEntry = this.OooO0oo;
if (videoLookHistoryEntry != null) {
this.OooO00o.OoooOoO(videoLookHistoryEntry.getContentPosition());
}
this.OooO00o.OooooOO();
}
this.OooO00o.OooOOoo(new OooO());
((ActivityDownloadVideoPlayBinding) this.binding).exoPlayContextId.Oooo0o(true);
setRequestedOrientation(0);
getWindow().getDecorView().setSystemUiVisibility(0);
}
@Override
public int initVariableId() {
return 12;
}
@Override
public void initViewObservable() {
super.initViewObservable();
addSubscribe(me.goldze.mvvmhabit.bus.OooO0O0.OooO00o().OooO0Oo(com.ys.resemble.event.o0000.class).subscribe(new Consumer() {
@Override
public final void accept(Object obj) {
DownloadVideoPlayActivity.this.OooOOO((com.ys.resemble.event.o0000) obj);
}
}));
}
@Override
public void netChangeListener() {
super.netChangeListener();
if (me.goldze.mvvmhabit.base.OooO00o.OooO0o().OooO0OO() == this) {
showNetChangeDialog();
chuangyuan.ycj.videolibrary.video.OooO00o oooO00o = this.OooO00o;
if (oooO00o != null) {
oooO00o.Oooo0o0();
}
}
}
@Override
public void onBackPressed() {
chuangyuan.ycj.videolibrary.video.OooO00o oooO00o = this.OooO00o;
if (oooO00o != null && oooO00o.Oooo00O()) {
finish();
} else {
finish();
}
}
@Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.iv_exo_next:
if (this.OooO00o != null) {
OooOOOO();
return;
}
return;
case R.id.iv_video_more:
com.ys.resemble.widgets.dialog.o0ooOOo o0ooooo = new com.ys.resemble.widgets.dialog.o0ooOOo(this, this, ((ActivityDownloadVideoPlayBinding) this.binding).exoPlayContextId);
this.OooOOOo = o0ooooo;
o0ooooo.showAtLocation(((ActivityDownloadVideoPlayBinding) this.binding).exoPlayContextId, 5, 0, 0);
return;
case R.id.rl_speed:
if (this.OooOOO == null) {
this.OooOOO = new com.ys.resemble.widgets.dialog.o000oOoO(this, this.OooO00o, this.OooOO0O);
}
this.OooOOO.showAtLocation(((ActivityDownloadVideoPlayBinding) this.binding).exoPlayContextId, 5, 0, 0);
return;
case R.id.tv_set_num:
VideoDownloadEntity videoDownloadEntity = this.OooO0o;
if (videoDownloadEntity != null) {
if (videoDownloadEntity.getVideoType() != 2 && this.OooO0o.getVideoType() != 4) {
if (this.OooO0o.getVideoType() == 3) {
com.ys.resemble.widgets.dialog.downloadcomplete.OooO0O0 oooO0O0 = new com.ys.resemble.widgets.dialog.downloadcomplete.OooO0O0(this, this.OooO0oO, this.OooOOoo);
this.OooOOo = oooO0O0;
oooO0O0.showAtLocation(((ActivityDownloadVideoPlayBinding) this.binding).exoPlayContextId, 5, 0, 0);
return;
}
return;
}
com.ys.resemble.widgets.dialog.downloadcomplete.OooO00o oooO00o = new com.ys.resemble.widgets.dialog.downloadcomplete.OooO00o(this, this.OooO0oO, this.OooOOoo);
this.OooOOo0 = oooO00o;
oooO00o.showAtLocation(((ActivityDownloadVideoPlayBinding) this.binding).exoPlayContextId, 5, 0, 0);
return;
}
return;
default:
return;
}
}
@Override
public void onConfigurationChanged(Configuration configuration) {
chuangyuan.ycj.videolibrary.video.OooO00o oooO00o = this.OooO00o;
if (oooO00o != null) {
oooO00o.Oooo00o(configuration);
}
super.onConfigurationChanged(configuration);
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
me.goldze.mvvmhabit.utils.OooOOOO.OooO0Oo(this, false, R.color.black);
}
@Override
public void onDestroy() {
super.onDestroy();
chuangyuan.ycj.videolibrary.video.OooO00o oooO00o = this.OooO00o;
if (oooO00o != null) {
oooO00o.Oooo0();
}
if (this.OooOOO != null) {
this.OooOOO = null;
}
if (this.OooOOOo != null) {
this.OooOOOo = null;
}
if (this.OooOOo0 != null) {
this.OooOOo0 = null;
}
if (this.OooOOo != null) {
this.OooOOo = null;
}
}
@Override
public void onPause() {
super.onPause();
OooOO0o();
chuangyuan.ycj.videolibrary.video.OooO00o oooO00o = this.OooO00o;
if (oooO00o != null) {
oooO00o.Oooo0O0();
}
}
@Override
public void onResume() {
super.onResume();
chuangyuan.ycj.videolibrary.video.OooO00o oooO00o = this.OooO00o;
if (oooO00o != null) {
oooO00o.Oooo0OO();
}
}
}