mirror of
https://framagit.org/tom79/fedilab-tube
synced 2025-04-13 10:02:14 +02:00
fix
This commit is contained in:
parent
7c695f5f82
commit
e03147c6da
@ -55,7 +55,6 @@ import android.text.TextPaint;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.text.style.ClickableSpan;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.MotionEvent;
|
||||
@ -1194,7 +1193,6 @@ public class PeertubeActivity extends BasePeertubeActivity implements CommentLis
|
||||
*/
|
||||
private void stream(VideoData.Video video, String resolution, boolean autoPlay, long position, Uri subtitles, String lang) {
|
||||
videoURL = video.getFileUrl(resolution, PeertubeActivity.this);
|
||||
Log.v(Helper.TAG,">>>>>>>>videoURL: " + videoURL );
|
||||
if (subtitles != null) {
|
||||
subtitlesStr = subtitles.toString();
|
||||
}
|
||||
@ -1203,7 +1201,7 @@ public class PeertubeActivity extends BasePeertubeActivity implements CommentLis
|
||||
ProgressiveMediaSource videoSource = null;
|
||||
HlsMediaSource hlsMediaSource = null;
|
||||
SingleSampleMediaSource subtitleSource = null;
|
||||
DataSource.Factory dataSourceFactory = null;
|
||||
DataSource.Factory dataSourceFactory;
|
||||
if (video_cache == 0 || video.isLive()) {
|
||||
dataSourceFactory = new DefaultDataSourceFactory(PeertubeActivity.this,
|
||||
Util.getUserAgent(PeertubeActivity.this, null), null);
|
||||
|
@ -19,7 +19,6 @@ import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.util.Log;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
@ -230,42 +229,14 @@ public class VideoData {
|
||||
if (resolution != null) {
|
||||
for (File file : files) {
|
||||
if (file.getResolutions().getLabel().compareTo(resolution) == 0) {
|
||||
if (mode == Helper.VIDEO_MODE_MAGNET) {
|
||||
if (file.getMagnetUri() != null) {
|
||||
return file.getMagnetUri();
|
||||
} else {
|
||||
return file.getFileUrl();
|
||||
}
|
||||
} else if (mode == Helper.VIDEO_MODE_TORRENT) {
|
||||
if (file.getTorrentUrl() != null) {
|
||||
return file.getTorrentUrl();
|
||||
} else {
|
||||
return file.getFileUrl();
|
||||
}
|
||||
} else {
|
||||
return file.getFileUrl();
|
||||
}
|
||||
return file.getFileUrl();
|
||||
}
|
||||
}
|
||||
}
|
||||
File file = Helper.defaultFile(context, files);
|
||||
|
||||
if (file != null) {
|
||||
if (mode == Helper.VIDEO_MODE_MAGNET) {
|
||||
if (file.getMagnetUri() != null) {
|
||||
return file.getMagnetUri();
|
||||
} else {
|
||||
return file.getFileUrl();
|
||||
}
|
||||
} else if (mode == Helper.VIDEO_MODE_TORRENT) {
|
||||
if (file.getTorrentUrl() != null) {
|
||||
return file.getTorrentUrl();
|
||||
} else {
|
||||
return file.getFileUrl();
|
||||
}
|
||||
} else {
|
||||
return file.getFileUrl();
|
||||
}
|
||||
return file.getFileUrl();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user