mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Add HlsDownloadTest
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=169064003
This commit is contained in:
parent
457d0ba1b9
commit
8d739067ec
1 changed files with 4 additions and 2 deletions
|
|
@ -17,6 +17,7 @@ package com.google.android.exoplayer2.playbacktests.gts;
|
||||||
|
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.test.ActivityInstrumentationTestCase2;
|
import android.test.ActivityInstrumentationTestCase2;
|
||||||
|
import android.util.Log;
|
||||||
import com.google.android.exoplayer2.offline.Downloader;
|
import com.google.android.exoplayer2.offline.Downloader;
|
||||||
import com.google.android.exoplayer2.offline.Downloader.ProgressListener;
|
import com.google.android.exoplayer2.offline.Downloader.ProgressListener;
|
||||||
import com.google.android.exoplayer2.offline.DownloaderConstructorHelper;
|
import com.google.android.exoplayer2.offline.DownloaderConstructorHelper;
|
||||||
|
|
@ -178,8 +179,9 @@ public final class DashDownloadTest extends ActivityInstrumentationTestCase2<Hos
|
||||||
@Override
|
@Override
|
||||||
public void onDownloadProgress(Downloader downloader, float downloadPercentage,
|
public void onDownloadProgress(Downloader downloader, float downloadPercentage,
|
||||||
long downloadedBytes) {
|
long downloadedBytes) {
|
||||||
System.out.printf("onDownloadProgress downloadPercentage = [%g], downloadedData = [%d]%n",
|
Log.d("DashDownloadTest",
|
||||||
downloadPercentage, downloadedBytes);
|
String.format("onDownloadProgress downloadPercentage = [%g], downloadedData = [%d]%n",
|
||||||
|
downloadPercentage, downloadedBytes));
|
||||||
if (downloadPercentage >= stopAt) {
|
if (downloadPercentage >= stopAt) {
|
||||||
Thread.currentThread().interrupt();
|
Thread.currentThread().interrupt();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue