parent
10892f92f1
commit
99fe789f30
|
@ -1462,8 +1462,6 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||
} else {
|
||||
CacheDataSourceFactory cacheDataSourceFactory = new CacheDataSourceFactory(PeertubeActivity.this);
|
||||
MediaItem mediaItem = new MediaItem.Builder().setUri(videoURL).build();
|
||||
videoSource = new ProgressiveMediaSource.Factory(cacheDataSourceFactory)
|
||||
.createMediaSource(mediaItem);
|
||||
if (subtitles != null) {
|
||||
MediaItem.Subtitle mediaSubtitle = new MediaItem.Subtitle(subtitles, MimeTypes.TEXT_VTT, lang, Format.NO_VALUE);
|
||||
subtitleSource = new SingleSampleMediaSource.Factory(cacheDataSourceFactory).createMediaSource(mediaSubtitle, C.TIME_UNSET);
|
||||
|
@ -1531,7 +1529,7 @@ public class PeertubeActivity extends AppCompatActivity implements CommentListAd
|
|||
} else {
|
||||
videoURL = peertube.getFileUrl(resolution, PeertubeActivity.this);
|
||||
}
|
||||
if (peertube != null && peertube.isWaitTranscoding() && peertube.isLive()) {
|
||||
if (peertube != null && peertube.isLive() && videoURL == null) {
|
||||
View parentLayout = findViewById(android.R.id.content);
|
||||
Snackbar snackbar = Snackbar.make(parentLayout, R.string.live_not_started, Snackbar.LENGTH_INDEFINITE);
|
||||
snackbar.setAction(R.string.close, view -> finish());
|
||||
|
|
|
@ -212,7 +212,14 @@ public class VideoData {
|
|||
} else if (streamingPlaylists != null) {
|
||||
List<File> files = new ArrayList<>();
|
||||
for (StreamingPlaylists streamingPlaylists : streamingPlaylists) {
|
||||
files.addAll(streamingPlaylists.getFiles());
|
||||
if (streamingPlaylists.getFiles().size() > 0) {
|
||||
files.addAll(streamingPlaylists.getFiles());
|
||||
} else {
|
||||
File file = new File();
|
||||
file.setFileUrl(streamingPlaylists.getPlaylistUrl());
|
||||
file.setFileDownloadUrl(streamingPlaylists.getPlaylistUrl());
|
||||
files.add(file);
|
||||
}
|
||||
}
|
||||
return files;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue