Source:
void completePlayerSetup(boolean asked) { final VideoItem videoItem = getVideoItem(); OoyalaSkinLayout skinLayout = (OoyalaSkinLayout)findViewById(R.id.ooyalaSkin); PlayerDomain domain = new PlayerDomain(DOMAIN); Options options = new Options.Builder().setShowPromoImage(false).setUseExoPlayer(true).build(); player = new OoyalaPlayer(PCODE, domain, options); SkinOptions skinOptions = new SkinOptions.Builder().build(); playerSkinLayoutController = new OoyalaSkinLayoutController(getApplication(), skinLayout, player, skinOptions); playerSkinLayoutController.addObserver(this); player.addObserver(this); final OoyalaPulseManager pulseManager = new OoyalaPulseManager(player); pulseManager.setListener(new OoyalaPulseManager.Listener() { @Override public PulseSession createPulseSession(OoyalaPulseManager ooyalaPulseManager, Video video, String pulseHost, ContentMetadata contentMetadata, RequestSettings requestSettings) { List<Float> midrollPositions = new ArrayList<>(); for(float f : videoItem.getMidrollPositions()) { midrollPositions.add(f); } requestSettings.setLinearPlaybackPositions(midrollPositions); contentMetadata.setTags(Arrays.asList(videoItem.getTags())); contentMetadata.setIdentifier(videoItem.getContentId()); contentMetadata.setCategory(videoItem.getCategory()); Pulse.setPulseHost(pulseHost, null, null); return Pulse.createSession(contentMetadata, requestSettings); } @Override public void openClickThrough(OoyalaPulseManager ooyalaPulseManager, PulseVideoAd pulseVideoAd) { Intent intent = new Intent(Intent.ACTION_VIEW).setData(Uri.parse(pulseVideoAd.getClickthroughURL().toString())); startActivity(intent); pulseVideoAd.adClickThroughTriggered(); } }); player.setEmbedCode(videoItem.getContentCode()); }

Target:
void completePlayerSetup(boolean asked) { if (asked) { final VideoItem videoItem = getVideoItem(); OoyalaSkinLayout skinLayout = (OoyalaSkinLayout) findViewById(R.id.ooyalaSkin); PlayerDomain domain = new PlayerDomain(DOMAIN); Options options = new Options.Builder().setShowPromoImage(false).setUseExoPlayer(true).build(); player = new OoyalaPlayer(PCODE, domain, options); SkinOptions skinOptions = new SkinOptions.Builder().build(); playerSkinLayoutController = new OoyalaSkinLayoutController(getApplication(), skinLayout, player, skinOptions); playerSkinLayoutController.addObserver(this); player.addObserver(this); final OoyalaPulseManager pulseManager = new OoyalaPulseManager(player); pulseManager.setListener(new OoyalaPulseManager.Listener() { @Override public PulseSession createPulseSession(OoyalaPulseManager ooyalaPulseManager, Video video, String pulseHost, ContentMetadata contentMetadata, RequestSettings requestSettings) { List<Float> midrollPositions = new ArrayList<>(); for (float f : videoItem.getMidrollPositions()) { midrollPositions.add(f); } requestSettings.setLinearPlaybackPositions(midrollPositions); contentMetadata.setTags(Arrays.asList(videoItem.getTags())); contentMetadata.setIdentifier(videoItem.getContentId()); contentMetadata.setCategory(videoItem.getCategory()); Pulse.setPulseHost(pulseHost, null, null); return Pulse.createSession(contentMetadata, requestSettings); } @Override public void openClickThrough(OoyalaPulseManager ooyalaPulseManager, PulseVideoAd pulseVideoAd) { Intent intent = new Intent(Intent.ACTION_VIEW).setData(Uri.parse(pulseVideoAd.getClickthroughURL().toString())); startActivity(intent); pulseVideoAd.adClickThroughTriggered(); } }); player.setEmbedCode(videoItem.getContentCode()); } }