|
|
@@ -3,6 +3,7 @@ package com.miekir.eden.ui.home.video;
|
|
|
import android.app.Activity;
|
|
|
import android.os.Bundle;
|
|
|
import android.text.TextUtils;
|
|
|
+import android.view.View;
|
|
|
|
|
|
import androidx.annotation.NonNull;
|
|
|
import androidx.annotation.Nullable;
|
|
|
@@ -14,6 +15,7 @@ import com.miekir.eden.kawayi.bean.BaseKwyBean;
|
|
|
import com.miekir.eden.manager.EdenManager;
|
|
|
import com.miekir.eden.net.RetrofitHelper;
|
|
|
import com.miekir.eden.tool.StringTool;
|
|
|
+import com.miekir.eden.tool.SystemTool;
|
|
|
import com.scwang.smart.refresh.layout.SmartRefreshLayout;
|
|
|
import com.scwang.smart.refresh.layout.api.RefreshLayout;
|
|
|
import com.scwang.smart.refresh.layout.listener.OnLoadMoreListener;
|
|
|
@@ -38,6 +40,7 @@ public class KwyVideoActivity extends Activity {
|
|
|
public static final String KEY_URL = "url";
|
|
|
public static final String KEY_TITLE = "title";
|
|
|
private String mTitle;
|
|
|
+ private String mVideoUrl;
|
|
|
|
|
|
private JzvdStd js_video;
|
|
|
private SmartRefreshLayout srl_video;
|
|
|
@@ -68,6 +71,7 @@ public class KwyVideoActivity extends Activity {
|
|
|
//finish();
|
|
|
}
|
|
|
});
|
|
|
+ mVideoUrl = EdenManager.getInstance().getVideoUrl();
|
|
|
JzvdStd.setCurrentJzvd(VideoPlayer.CURRENT_JZVD);
|
|
|
js_video.setUp(EdenManager.getInstance().getVideoUrl(), mTitle);
|
|
|
js_video.startVideo();
|
|
|
@@ -82,6 +86,14 @@ public class KwyVideoActivity extends Activity {
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
+ srl_video.setOnLongClickListener(new View.OnLongClickListener() {
|
|
|
+ @Override
|
|
|
+ public boolean onLongClick(View v) {
|
|
|
+ SystemTool.copyText(KwyVideoActivity.this, mVideoUrl);
|
|
|
+ ToastTool.showShort(StringTool.getString(R.string.resource_copied));
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -126,6 +138,7 @@ public class KwyVideoActivity extends Activity {
|
|
|
srl_video.finishLoadMore();
|
|
|
//JzvdStd.startFullscreenDirectly(this, VideoPlayer.class, result, mTitle);
|
|
|
if (videoBean != null && !TextUtils.isEmpty(videoBean.getJson())) {
|
|
|
+ mVideoUrl = videoBean.getJson();
|
|
|
JZDataSource dataSource = new JZDataSource(videoBean.getJson(), mTitle);
|
|
|
js_video.changeUrl(dataSource, 0);
|
|
|
} else {
|