am c3c29486: Uploaded for Robin Connell. Fixed 4466580 Need widevine sample demo player support for adaptive streaming. Thumbnails now show and content plays for adaptive and oem content pages.

* commit 'c3c294866b007439ef058db8b8079160bf04d713':
  Uploaded for Robin Connell. Fixed 4466580 Need widevine sample demo player support for adaptive streaming. Thumbnails now show and content plays for adaptive and oem content pages.
This commit is contained in:
Edwin Wong
2011-06-03 15:55:37 -07:00
committed by Android Git Automerger
4 changed files with 8 additions and 8 deletions

View File

@@ -239,13 +239,13 @@ public abstract class AssetActivity extends Activity {
String imageUrl = null;
if (assetItem.getImagePath() == null || assetItem.getImagePath().equals("")) {
if (assetItem.getAssetPath().indexOf("http") == -1)
if (!assetItem.getAssetPath().contains("http") && !assetItem.getAssetPath().contains("wvplay"))
clipImage = BitmapFactory.decodeResource(getResources(), R.drawable.download_clip);
else
clipImage = BitmapFactory.decodeResource(getResources(), R.drawable.streaming_clip);
} else {
InputStream bitmapStream = null;
if (assetItem.getAssetPath().indexOf("http") != -1) {
if (assetItem.getImagePath().contains("http")) {
imageUrl = assetItem.getImagePath();
if (imageUrl != null) {

View File

@@ -94,7 +94,7 @@ public class HttpParser extends Thread {
start = htmlText.indexOf("\"", start) + 1;
end = htmlText.indexOf("\"", start);
imagePath = htmlText.substring(start, end);
if (!imagePath.contains("http")) {
if (!imagePath.contains("http") && !imagePath.contains("wvplay")) {
imagePath = rootUrl + imagePath;
}
start = htmlText.indexOf("<p>", start) + "<p>".length();

View File

@@ -42,8 +42,8 @@ public class StreamingActivity extends AssetActivity {
for (int i = 0; i < assets.size();) {
AssetsPage page = new AssetsPage();
for (int j = 0; j < AssetsPage.MAX_ITEMS && i < assets.size(); j++, i++) {
page.addPage(assets.get(i).getAssetPath(), assets.get(i).getImagePath(), assets
.get(i).getTitle());
page.addPage(assets.get(i).getAssetPath(),
assets.get(i).getImagePath(), assets.get(i).getTitle());
}
pages.add(page);
}
@@ -56,8 +56,8 @@ public class StreamingActivity extends AssetActivity {
for (int i = 0; i < assets.size();) {
AssetsPage page = new AssetsPage();
for (int j = 0; j < AssetsPage.MAX_ITEMS && i < assets.size(); j++, i++) {
page.addPage(assets.get(i).getUri(), assets.get(i).getThumbnail(), assets
.get(i).getTitle());
page.addPage(assets.get(i).getUri(), assets.get(i).getThumbnail(),
assets.get(i).getTitle());
}
pages.add(page);
}

View File

@@ -62,7 +62,7 @@ public class VideoPlayerView extends Activity {
private View createView() {
enteringFullScreen = false;
assetUri = this.getIntent().getStringExtra("com.widevine.demo.Path");
assetUri = this.getIntent().getStringExtra("com.widevine.demo.Path").replaceAll("wvplay", "http");
drm = new WidevineDrm(this);
drm.logBuffer.append("Asset Uri: " + assetUri + "\n");