mirror of
https://github.com/samsonjs/media.git
synced 2026-03-29 10:05:48 +00:00
Repair progressive downloads in DownloadTracker.
They are currently broken because we ignore downloads without periods. As the DownloadHelper doesn't create periods for progressive media, we don't download them. Fixing by starting download automatically without showing track selection dialog. PiperOrigin-RevId: 236120202
This commit is contained in:
parent
84c8842dfa
commit
cde6189c14
1 changed files with 4 additions and 1 deletions
|
|
@ -247,7 +247,10 @@ public class DownloadTracker implements DownloadManager.Listener {
|
|||
@Override
|
||||
public void onPrepared(DownloadHelper helper) {
|
||||
if (helper.getPeriodCount() == 0) {
|
||||
onPrepareError(helper, new IOException("No periods found."));
|
||||
Log.d(TAG, "No periods found. Downloading entire stream.");
|
||||
DownloadAction downloadAction = downloadHelper.getDownloadAction(Util.getUtf8Bytes(name));
|
||||
startDownload(downloadAction);
|
||||
downloadHelper.release();
|
||||
return;
|
||||
}
|
||||
mappedTrackInfo = downloadHelper.getMappedTrackInfo(/* periodIndex= */ 0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue