Commit 2d022a21 by andrewlewis Committed by Ian Baker

Fix buildForAdsResponse

PiperOrigin-RevId: 340198099
parent 379cd8a0
......@@ -15,6 +15,7 @@
([#7832](https://github.com/google/ExoPlayer/issues/7832)).
* Fix a bug that caused multiple ads in an ad pod to be skipped when one
ad in the ad pod was skipped.
* Fix passing an ads response to the `ImaAdsLoader` builder.
### 2.12.1 (2020-10-23) ###
......
......@@ -705,7 +705,9 @@ public final class ImaAdsLoader
if (adTagUri != null) {
adTagDataSpec = new DataSpec(adTagUri);
} else if (adsResponse != null) {
adTagDataSpec = new DataSpec(Util.getDataUriForString(adsResponse, "text/xml"));
adTagDataSpec =
new DataSpec(
Util.getDataUriForString(/* mimeType= */ "text/xml", /* data= */ adsResponse));
} else {
throw new IllegalStateException();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment