- 云盘字幕加载,字段统一为subt

- 增加本地选择字幕功能
pull/50/head
okjackcaptain 4 years ago
parent f0da98bc7b
commit c4a9e142eb
  1. 2
      app/build.gradle
  2. 18
      app/src/main/java/com/github/tvbox/osc/player/controller/VodController.java
  3. 52
      app/src/main/java/com/github/tvbox/osc/subtitle/SubtitleLoader.java
  4. 55
      app/src/main/java/com/github/tvbox/osc/ui/activity/PlayActivity.java
  5. 68
      app/src/main/java/com/github/tvbox/osc/ui/dialog/SubtitleDialog.java
  6. 55
      app/src/main/java/com/github/tvbox/osc/ui/fragment/PlayFragment.java
  7. 109
      app/src/main/java/com/github/tvbox/osc/util/UnicodeReader.java
  8. 55
      app/src/main/res/layout/dialog_subtitle.xml
  9. 69
      app/src/main/res/layout/player_vod_control_view.xml

@ -96,4 +96,6 @@ dependencies {
implementation 'com.owen:tv-recyclerview:3.0.0'
implementation 'com.github.getActivity:XXPermissions:13.6'
implementation 'com.github.hedzr:android-file-chooser:v1.2.0-final'
implementation 'commons-io:commons-io:2.11.0'
}

@ -1,5 +1,7 @@
package com.github.tvbox.osc.player.controller;
import static xyz.doikki.videoplayer.util.PlayerUtils.stringForTime;
import android.content.Context;
import android.os.Handler;
import android.os.Message;
@ -33,15 +35,12 @@ import org.json.JSONException;
import org.json.JSONObject;
import java.text.SimpleDateFormat;
import java.util.List;
import java.util.Date;
import java.util.List;
import xyz.doikki.videoplayer.player.VideoView;
import xyz.doikki.videoplayer.util.PlayerUtils;
import static xyz.doikki.videoplayer.util.PlayerUtils.stringForTime;
public class VodController extends BaseController {
public VodController(@NonNull @NotNull Context context) {
super(context);
@ -118,6 +117,7 @@ public class VodController extends BaseController {
TextView mPlayLoadNetSpeed;
TextView mVideoSize;
public SimpleSubtitleView mSubtitleView;
public TextView mZimuBtn;
Handler myHandle;
Runnable myRunnable;
@ -176,6 +176,7 @@ public class VodController extends BaseController {
mPlayLoadNetSpeed = findViewById(R.id.tv_play_load_net_speed);
mVideoSize = findViewById(R.id.tv_videosize);
mSubtitleView = findViewById(R.id.subtitle_view);
mZimuBtn = findViewById(R.id.zimu_select);
myHandle=new Handler();
myRunnable = new Runnable() {
@ -484,6 +485,13 @@ public class VodController extends BaseController {
updatePlayerCfgView();
}
});
mZimuBtn.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
listener.selectSubtitle();
hideBottom();
}
});
}
@Override
@ -547,6 +555,8 @@ public class VodController extends BaseController {
void replay(boolean replay);
void errReplay();
void selectSubtitle();
}
public void setListener(VodControlListener listener) {

@ -35,15 +35,18 @@ import com.github.tvbox.osc.subtitle.format.FormatSRT;
import com.github.tvbox.osc.subtitle.format.FormatSTL;
import com.github.tvbox.osc.subtitle.model.TimedTextObject;
import com.github.tvbox.osc.subtitle.runtime.AppTaskExecutor;
import com.github.tvbox.osc.util.UnicodeReader;
import com.lzy.okgo.OkGo;
import org.apache.commons.io.input.ReaderInputStream;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import java.io.Reader;
import okhttp3.Response;
/**
@ -153,25 +156,32 @@ public class SubtitleLoader {
private static TimedTextObject loadFromRemote(final String remoteSubtitlePath)
throws IOException, FatalParsingException {
Log.d(TAG, "parseRemote: remoteSubtitlePath = " + remoteSubtitlePath);
if (!remoteSubtitlePath.contains("alicloud")) {
URL url = new URL(remoteSubtitlePath);
return loadAndParse(url.openStream(), url.getPath());
String referer = "";
String from = "";
if (remoteSubtitlePath.contains("alicloud")) {
referer = "https://www.aliyundrive.com/";
from = "aliyundrive";
} else if (remoteSubtitlePath.contains("assrt.net")) {
referer = "https://secure.assrt.net/";
from = "assrt";
}
String ua = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.54 Safari/537.36";
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url(remoteSubtitlePath)
.addHeader("Referer", "https://www.aliyundrive.com/")
.addHeader("User-Agent", ua)
.build();
Response response = null;
response = client.newCall(request).execute();
Response response = OkGo.<String>get(remoteSubtitlePath)
.headers("Referer", referer)
.headers("User-Agent", ua)
.execute();
String content = response.body().string();
try {
Uri uri = Uri.parse(remoteSubtitlePath);
InputStream subtitle = new ByteArrayInputStream(content.getBytes());
String filename = uri.getQueryParameter("response-content-disposition");
String filename = "";
if (from == "aliyundrive") {
filename = uri.getQueryParameter("response-content-disposition");
filename = "zimu." + filename.substring(filename.lastIndexOf(".")+1);
} else {
filename = uri.getPath();
filename = "zimu." + filename.substring(filename.lastIndexOf(".")+1);
}
return loadAndParse(subtitle, filename);
} catch (Exception e) {
e.printStackTrace();
@ -191,16 +201,18 @@ public class SubtitleLoader {
String fileName = filePath.substring(filePath.lastIndexOf("/") + 1);
String ext = fileName.substring(fileName.lastIndexOf("."));
Log.d(TAG, "parse: name = " + fileName + ", ext = " + ext);
Reader reader = new UnicodeReader(is); //处理有BOM头的utf8
InputStream newInputStream = new ReaderInputStream(reader, "UTF-8");
if (".srt".equalsIgnoreCase(ext)) {
return new FormatSRT().parseFile(fileName, is);
return new FormatSRT().parseFile(fileName, newInputStream);
} else if (".ass".equalsIgnoreCase(ext)) {
return new FormatASS().parseFile(fileName, is);
return new FormatASS().parseFile(fileName, newInputStream);
} else if (".stl".equalsIgnoreCase(ext)) {
return new FormatSTL().parseFile(fileName, is);
return new FormatSTL().parseFile(fileName, newInputStream);
} else if (".ttml".equalsIgnoreCase(ext)) {
return new FormatSTL().parseFile(fileName, is);
return new FormatSTL().parseFile(fileName, newInputStream);
}
return new FormatSRT().parseFile(fileName, is);
return new FormatSRT().parseFile(fileName, newInputStream);
}
public interface Callback {

@ -10,7 +10,6 @@ import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.Base64;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup;
@ -48,6 +47,7 @@ import com.github.tvbox.osc.player.MyVideoView;
import com.github.tvbox.osc.player.controller.VodController;
import com.github.tvbox.osc.player.thirdparty.MXPlayer;
import com.github.tvbox.osc.player.thirdparty.ReexPlayer;
import com.github.tvbox.osc.ui.dialog.SubtitleDialog;
import com.github.tvbox.osc.util.AdBlocker;
import com.github.tvbox.osc.util.DefaultConfig;
import com.github.tvbox.osc.util.HawkConfig;
@ -61,6 +61,7 @@ import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.AbsCallback;
import com.lzy.okgo.model.HttpHeaders;
import com.lzy.okgo.model.Response;
import com.obsez.android.lib.filechooser.ChooserDialog;
import com.orhanobut.hawk.Hawk;
import org.greenrobot.eventbus.EventBus;
@ -75,6 +76,7 @@ import org.xwalk.core.XWalkWebResourceRequest;
import org.xwalk.core.XWalkWebResourceResponse;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
@ -188,10 +190,43 @@ public class PlayActivity extends BaseActivity {
public void errReplay() {
errorWithRetry("视频播放出错", false);
}
@Override
public void selectSubtitle() {
SubtitleDialog subtitleDialog = new SubtitleDialog(PlayActivity.this);
subtitleDialog.setLocalFileChooserListener(new SubtitleDialog.LocalFileChooserListener() {
@Override
public void openLocalFileChooserDialog() {
new ChooserDialog(PlayActivity.this)
.withFilter(false, false, "srt", "ass", "scc", "stl", "ttml")
.withStartFile("/storage/emulated/0/Download")
.withChosenListener(new ChooserDialog.Result() {
@Override
public void onChoosePath(String path, File pathFile) {
LOG.i("Local Subtitle Path: " + path);
setSubtitle(path);//设置字幕
}
})
.build()
.show();
}
});
subtitleDialog.show();
}
});
mVideoView.setVideoController(mController);
}
//设置字幕
void setSubtitle(String path) {
if (path != null && path .length() > 0) {
// 设置字幕
mController.mSubtitleView.setVisibility(View.INVISIBLE);
mController.mSubtitleView.setSubtitlePath(path);
mController.mSubtitleView.setVisibility(View.VISIBLE);
}
}
void setTip(String msg, boolean loading, boolean err) {
runOnUiThread(new Runnable() {//影魔 解决解析偶发闪退
@Override
@ -234,13 +269,6 @@ public class PlayActivity extends BaseActivity {
if (mVideoView != null) {
mVideoView.release();
String zimuParamKey = "___zimu___"; //字幕url的header中key
String zimuBase64Url = "";
if (headers != null && headers.containsKey(zimuParamKey)) {
zimuBase64Url = headers.get(zimuParamKey);
headers.remove(zimuParamKey);//remove传过来的字幕header的key
}
if (url != null) {
try {
int playerType = mVodPlayerCfg.getInt("pl");
@ -277,17 +305,12 @@ public class PlayActivity extends BaseActivity {
mController.resetSpeed();
//加载字幕开始
String zimuUrl = "";
if (zimuBase64Url != null && zimuBase64Url.length() > 0) {
zimuUrl = new String(Base64.decode(zimuBase64Url, Base64.DEFAULT));
mController.mSubtitleView.setVisibility(View.GONE);
}
if(zimuUrl.isEmpty())zimuUrl=playSubtitle;
if (zimuUrl != null && zimuUrl .length() > 0) {
// 绑定MediaPlayer
mController.mSubtitleView.bindToMediaPlayer(mVideoView.getMediaPlayer());
mController.mSubtitleView.setVisibility(View.INVISIBLE);
if (playSubtitle != null && playSubtitle .length() > 0) {
// 设置字幕
mController.mSubtitleView.setSubtitlePath(zimuUrl);
mController.mSubtitleView.setSubtitlePath(playSubtitle);
mController.mSubtitleView.setVisibility(View.VISIBLE);
}
//加载字幕结束

@ -0,0 +1,68 @@
package com.github.tvbox.osc.ui.dialog;
import android.content.Context;
import android.view.View;
import android.widget.TextView;
import androidx.annotation.NonNull;
import com.github.tvbox.osc.R;
import com.github.tvbox.osc.util.FastClickCheckUtil;
import org.jetbrains.annotations.NotNull;
public class SubtitleDialog extends BaseDialog {
private TextView selectLocal;
private TextView selectRemote;
private SearchSubtitleListener mSearchSubtitleListener;
private LocalFileChooserListener mLocalFileChooserListener;
public SubtitleDialog(@NonNull @NotNull Context context) {
super(context, R.style.CustomDialogStyleDim);
setCanceledOnTouchOutside(false);
setCancelable(true);
setContentView(R.layout.dialog_subtitle);
init(context);
}
private void init(Context context) {
selectLocal = findViewById(R.id.selectLocal);
selectRemote = findViewById(R.id.selectRemote);
selectLocal.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
FastClickCheckUtil.check(view);
dismiss();
mLocalFileChooserListener.openLocalFileChooserDialog();
}
});
selectRemote.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
FastClickCheckUtil.check(view);
dismiss();
mSearchSubtitleListener.openSearchSubtitleDialog();
}
});
}
public void setLocalFileChooserListener(LocalFileChooserListener localFileChooserListener) {
mLocalFileChooserListener = localFileChooserListener;
}
public interface LocalFileChooserListener {
void openLocalFileChooserDialog();
}
public void setSearchSubtitleListener(SearchSubtitleListener searchSubtitleListener) {
mSearchSubtitleListener = searchSubtitleListener;
}
public interface SearchSubtitleListener {
void openSearchSubtitleDialog();
}
}

@ -9,7 +9,6 @@ import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.Base64;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup;
@ -47,6 +46,7 @@ import com.github.tvbox.osc.player.MyVideoView;
import com.github.tvbox.osc.player.controller.VodController;
import com.github.tvbox.osc.player.thirdparty.MXPlayer;
import com.github.tvbox.osc.player.thirdparty.ReexPlayer;
import com.github.tvbox.osc.ui.dialog.SubtitleDialog;
import com.github.tvbox.osc.util.AdBlocker;
import com.github.tvbox.osc.util.DefaultConfig;
import com.github.tvbox.osc.util.HawkConfig;
@ -60,6 +60,7 @@ import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.AbsCallback;
import com.lzy.okgo.model.HttpHeaders;
import com.lzy.okgo.model.Response;
import com.obsez.android.lib.filechooser.ChooserDialog;
import com.orhanobut.hawk.Hawk;
import org.greenrobot.eventbus.EventBus;
@ -74,6 +75,7 @@ import org.xwalk.core.XWalkWebResourceRequest;
import org.xwalk.core.XWalkWebResourceResponse;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
@ -187,10 +189,43 @@ public class PlayFragment extends BaseLazyFragment {
public void errReplay() {
errorWithRetry("视频播放出错", false);
}
@Override
public void selectSubtitle() {
SubtitleDialog subtitleDialog = new SubtitleDialog(getContext());
subtitleDialog.setLocalFileChooserListener(new SubtitleDialog.LocalFileChooserListener() {
@Override
public void openLocalFileChooserDialog() {
new ChooserDialog(getActivity())
.withFilter(false, false, "srt", "ass", "scc", "stl", "ttml")
.withStartFile("/storage/emulated/0/Download")
.withChosenListener(new ChooserDialog.Result() {
@Override
public void onChoosePath(String path, File pathFile) {
LOG.i("Local Subtitle Path: " + path);
setSubtitle(path);//设置字幕
}
})
.build()
.show();
}
});
subtitleDialog.show();
}
});
mVideoView.setVideoController(mController);
}
//设置字幕
void setSubtitle(String path) {
if (path != null && path .length() > 0) {
// 设置字幕
mController.mSubtitleView.setVisibility(View.INVISIBLE);
mController.mSubtitleView.setSubtitlePath(path);
mController.mSubtitleView.setVisibility(View.VISIBLE);
}
}
void setTip(String msg, boolean loading, boolean err) {
requireActivity().runOnUiThread(new Runnable() { //影魔
@Override
@ -232,13 +267,6 @@ public class PlayFragment extends BaseLazyFragment {
if (mVideoView != null) {
mVideoView.release();
String zimuParamKey = "___zimu___"; //字幕url的header中key
String zimuBase64Url = "";
if (headers != null && headers.containsKey(zimuParamKey)) {
zimuBase64Url = headers.get(zimuParamKey);
headers.remove(zimuParamKey);//remove传过来的字幕header的key
}
if (url != null) {
try {
int playerType = mVodPlayerCfg.getInt("pl");
@ -275,17 +303,12 @@ public class PlayFragment extends BaseLazyFragment {
mController.resetSpeed();
//加载字幕开始
String zimuUrl = "";
if (zimuBase64Url != null && zimuBase64Url.length() > 0) {
zimuUrl = new String(Base64.decode(zimuBase64Url, Base64.DEFAULT));
mController.mSubtitleView.setVisibility(View.GONE);
}
if(zimuUrl.isEmpty())zimuUrl=playSubtitle;
if (zimuUrl != null && zimuUrl .length() > 0) {
// 绑定MediaPlayer
mController.mSubtitleView.bindToMediaPlayer(mVideoView.getMediaPlayer());
mController.mSubtitleView.setVisibility(View.INVISIBLE);
if (playSubtitle != null && playSubtitle .length() > 0) {
// 设置字幕
mController.mSubtitleView.setSubtitlePath(zimuUrl);
mController.mSubtitleView.setSubtitlePath(playSubtitle);
mController.mSubtitleView.setVisibility(View.VISIBLE);
}
//加载字幕结束

@ -0,0 +1,109 @@
package com.github.tvbox.osc.util;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PushbackInputStream;
import java.io.Reader;
public class UnicodeReader extends Reader {
private InputStreamReader internalIn = null;
private String encoding;
private static final int BOM_SIZE = 4;
public UnicodeReader(String file)
throws IOException, FileNotFoundException, SecurityException {
this(new File(file));
}
public UnicodeReader(File file)
throws IOException, FileNotFoundException, SecurityException {
this(new FileInputStream(file));
}
public UnicodeReader(File file, String defaultEncoding)
throws IOException, FileNotFoundException, SecurityException {
this(new FileInputStream(file), defaultEncoding);
}
public UnicodeReader(InputStream in)
throws IOException {
this(in, null);
}
public UnicodeReader(InputStream in, String defaultEncoding)
throws IOException {
init(in, defaultEncoding);
}
public void close()
throws IOException {
this.internalIn.close();
}
public String getEncoding() {
return this.encoding;
}
protected void init(InputStream in, String defaultEncoding)
throws IOException {
PushbackInputStream tempIn = new PushbackInputStream(in, 4);
byte[] bom = new byte[4];
int n = tempIn.read(bom, 0, bom.length);
int unread;
if ((bom[0] == 0) && (bom[1] == 0) &&
(bom[2] == -2) && (bom[3] == -1)) {
this.encoding = "UTF-32BE";
unread = n - 4;
} else {
if (n == 4) {
if ((bom[0] == -1) && (bom[1] == -2) &&
(bom[2] == 0) && (bom[3] == 0)) {
this.encoding = "UTF-32LE";
unread = n - 4;
//break label240;
}
}
if ((bom[0] == -17) && (bom[1] == -69) &&
(bom[2] == -65)) {
this.encoding = "UTF-8";
unread = n - 3;
} else {
if ((bom[0] == -2) && (bom[1] == -1)) {
this.encoding = "UTF-16BE";
unread = n - 2;
} else {
if ((bom[0] == -1) && (bom[1] == -2)) {
this.encoding = "UTF-16LE";
unread = n - 2;
} else {
this.encoding = defaultEncoding;
unread = n;
}
}
}
}
if (unread > 0)
tempIn.unread(bom, n - unread, unread);
else if (unread < -1) {
tempIn.unread(bom, 0, 0);
}
if (this.encoding == null) {
this.internalIn = new InputStreamReader(tempIn);
this.encoding = this.internalIn.getEncoding();
} else {
this.internalIn = new InputStreamReader(tempIn, this.encoding);
}
}
public int read(char[] cbuf, int off, int len)
throws IOException {
return this.internalIn.read(cbuf, off, len);
}
}

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="@dimen/vs_640"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@drawable/shape_dialog_bg_main"
android:orientation="vertical"
android:padding="@dimen/vs_30">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="vertical">
<TextView
android:id="@+id/selectLocal"
android:layout_width="@dimen/vs_480"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@drawable/button_dialog_main"
android:focusable="true"
android:gravity="center"
android:padding="@dimen/vs_10"
android:text="选择本地字幕"
android:textColor="@color/color_FFFFFF"
android:textSize="@dimen/ts_22" />
<TextView
android:id="@+id/selectRemote"
android:layout_width="@dimen/vs_480"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="@dimen/vs_10"
android:background="@drawable/button_dialog_main"
android:focusable="true"
android:gravity="center"
android:visibility="gone"
android:padding="@dimen/vs_10"
android:text="在线搜索字幕"
android:textColor="@color/color_FFFFFF"
android:textSize="@dimen/ts_22" />
</LinearLayout>
</LinearLayout>
</FrameLayout>

@ -29,7 +29,7 @@
android:paddingLeft="@dimen/vs_20"
android:text="http://"
android:textColor="@android:color/white"
android:textSize="@dimen/ts_24" />
android:textSize="@dimen/ts_22" />
<TextView
android:id="@+id/tv_videosize"
@ -42,7 +42,7 @@
android:tag="vod_video_size"
android:text="[ 1024 x 768 ]"
android:textColor="@android:color/white"
android:textSize="@dimen/ts_24" />
android:textSize="@dimen/ts_22" />
</LinearLayout>
@ -71,7 +71,7 @@
android:tag="vod_control_pause_time"
android:text="00:00:00"
android:textColor="@android:color/white"
android:textSize="@dimen/ts_24" />
android:textSize="@dimen/ts_22" />
<TextView
android:id="@+id/tv_play_load_net_speed_right_top"
@ -98,9 +98,8 @@
android:paddingRight="@dimen/vs_20"
android:paddingBottom="@dimen/vs_15"
android:text="字幕将在这里显示"
android:visibility="invisible"
android:textColor="#ffffff"
android:visibility="gone"
tools:visibility="visible"
android:textSize="16sp"
android:textStyle="bold"/>
@ -125,16 +124,6 @@
android:layout_marginBottom="@dimen/vs_10"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/vs_5"
android:layout_marginRight="@dimen/vs_5"
android:paddingRight="@dimen/vs_10"
android:text="播放"
android:textColor="@color/color_FFFFFF"
android:textSize="@dimen/ts_24" />
<TextView
android:id="@+id/play_next"
android:layout_width="wrap_content"
@ -146,7 +135,7 @@
android:padding="@dimen/vs_10"
android:text="下一集"
android:textColor="@android:color/white"
android:textSize="@dimen/ts_24" />
android:textSize="@dimen/ts_22" />
<TextView
android:id="@+id/play_pre"
@ -159,7 +148,7 @@
android:padding="@dimen/vs_10"
android:text="上一集"
android:textColor="@android:color/white"
android:textSize="@dimen/ts_24" />
android:textSize="@dimen/ts_22" />
<TextView
android:id="@+id/play_retry"
@ -172,7 +161,7 @@
android:padding="@dimen/vs_10"
android:text="重播"
android:textColor="@android:color/white"
android:textSize="@dimen/ts_24" />
android:textSize="@dimen/ts_22" />
<TextView
android:id="@+id/play_refresh"
@ -185,7 +174,7 @@
android:padding="@dimen/vs_10"
android:text="刷新"
android:textColor="@android:color/white"
android:textSize="@dimen/ts_24" />
android:textSize="@dimen/ts_22" />
<TextView
android:id="@+id/play_scale"
@ -198,7 +187,7 @@
android:padding="@dimen/vs_10"
android:text="16:9"
android:textColor="@android:color/white"
android:textSize="@dimen/ts_24" />
android:textSize="@dimen/ts_22" />
<TextView
android:id="@+id/play_speed"
@ -211,7 +200,7 @@
android:padding="@dimen/vs_10"
android:text="x1.0"
android:textColor="@android:color/white"
android:textSize="@dimen/ts_24" />
android:textSize="@dimen/ts_22" />
<TextView
android:id="@+id/play_player"
@ -224,7 +213,7 @@
android:padding="@dimen/vs_10"
android:text="系统播放器"
android:textColor="@android:color/white"
android:textSize="@dimen/ts_24" />
android:textSize="@dimen/ts_22" />
<TextView
android:id="@+id/play_ijk"
@ -237,7 +226,7 @@
android:padding="@dimen/vs_10"
android:text="硬解码"
android:textColor="@android:color/white"
android:textSize="@dimen/ts_24" />
android:textSize="@dimen/ts_22" />
<TextView
android:layout_width="wrap_content"
@ -247,7 +236,7 @@
android:padding="@dimen/vs_10"
android:text="片头片尾"
android:textColor="@color/color_FFFFFF"
android:textSize="@dimen/ts_24" />
android:textSize="@dimen/ts_22" />
<TextView
android:id="@+id/play_time_start"
@ -260,7 +249,7 @@
android:padding="@dimen/vs_10"
android:text="01:00"
android:textColor="@android:color/white"
android:textSize="@dimen/ts_24" />
android:textSize="@dimen/ts_22" />
<TextView
android:id="@+id/play_time_end"
@ -273,7 +262,7 @@
android:padding="@dimen/vs_10"
android:text="01:00"
android:textColor="@android:color/white"
android:textSize="@dimen/ts_24" />
android:textSize="@dimen/ts_22" />
<TextView
android:id="@+id/play_time_step"
@ -286,7 +275,8 @@
android:padding="@dimen/vs_10"
android:text="1S"
android:textColor="@android:color/white"
android:textSize="@dimen/ts_24" />
android:textSize="@dimen/ts_22" />
<!--添加片头片尾重置按钮-->
<TextView
android:id="@+id/play_time_reset"
@ -299,7 +289,20 @@
android:padding="@dimen/vs_10"
android:text="重置"
android:textColor="@android:color/white"
android:textSize="@dimen/ts_24" />
android:textSize="@dimen/ts_22" />
<TextView
android:id="@+id/zimu_select"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/vs_5"
android:layout_marginRight="@dimen/vs_5"
android:background="@drawable/button_dialog_main"
android:focusable="true"
android:padding="@dimen/vs_10"
android:text="字幕"
android:textColor="@android:color/white"
android:textSize="@dimen/ts_22" />
</LinearLayout>
@ -321,7 +324,7 @@
android:paddingRight="@dimen/vs_10"
android:text="解析"
android:textColor="@color/color_FFFFFF"
android:textSize="@dimen/ts_24" />
android:textSize="@dimen/ts_22" />
<com.owen.tvrecyclerview.widget.TvRecyclerView
android:id="@+id/mGridView"
@ -349,7 +352,7 @@
android:paddingRight="@dimen/vs_10"
android:text="00:00"
android:textColor="@color/color_FFFFFF"
android:textSize="@dimen/ts_24" />
android:textSize="@dimen/ts_22" />
<SeekBar
android:id="@+id/seekBar"
@ -378,7 +381,7 @@
android:paddingLeft="@dimen/vs_10"
android:text="00:00"
android:textColor="@color/color_FFFFFF"
android:textSize="@dimen/ts_24" />
android:textSize="@dimen/ts_22" />
</LinearLayout>
@ -412,7 +415,7 @@
android:paddingLeft="@dimen/vs_20"
android:text="http://"
android:textColor="@android:color/white"
android:textSize="@dimen/ts_24" />
android:textSize="@dimen/ts_22" />
</LinearLayout>
<LinearLayout
@ -521,6 +524,6 @@
android:tag="play_load_net_speed"
android:text="0"
android:textColor="@color/color_FFFFFF"
android:textSize="@dimen/ts_24" />
android:textSize="@dimen/ts_22" />
</FrameLayout>

Loading…
Cancel
Save