Commit 6b17e2cf by andrewlewis Committed by Oliver Woodman

Fix handling of postrolls

adsLoader.contentComplete was called twice which led to postrolls not seeing
the STARTED event.

Also make the onPositionDiscontinuity handler easier to follow by renaming
variables, and remove the adGroupIndex field.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=161537765
parent 06216514
...@@ -336,8 +336,6 @@ public class PlayerActivity extends Activity implements OnClickListener, ExoPlay ...@@ -336,8 +336,6 @@ public class PlayerActivity extends Activity implements OnClickListener, ExoPlay
} }
try { try {
mediaSource = createAdsMediaSource(mediaSource, Uri.parse(adTagUriString)); mediaSource = createAdsMediaSource(mediaSource, Uri.parse(adTagUriString));
// The demo app has a non-null overlay frame layout.
simpleExoPlayerView.getOverlayFrameLayout().addView(adOverlayViewGroup);
} catch (Exception e) { } catch (Exception e) {
showToast(R.string.ima_not_loaded); showToast(R.string.ima_not_loaded);
} }
......
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