compile 'com.google.android.gms:play-services-ads:9.8.0'
compile 'com.brightcove.player:exoplayer:4.13.1'
compile 'com.brightcove.player:android-sdk:4.13.1'
compile 'com.brightcove.player:android-ima-plugin:4.13.1'
On certain CUE points event I am displaying ad rolls its working perfectly but I am facing black screen whenever ads getting loaded, why this transition is not smooth.
below is my Ads requesting block:
videoView.getEventEmitter().on(GoogleIMAEventType.ADS_REQUEST_FOR_VIDEO, new EventListener() {
public void processEvent(Event event) {
Log.v(TAG, "######ADS_REQUEST_FOR_VIDEO: " + event.properties);
EventEmitter eventEmitter = videoView.getEventEmitter();
// Create a container object for the ads to be presented.
AdDisplayContainer container = sdkFactory.createAdDisplayContainer();
container.setPlayer(googleIMAComponent.getVideoAdPlayer());
container.setAdContainer(videoView);
// Build the list of ads request objects, one per ad
// URL, and point each to the ad display container
// created above.
ArrayList<AdsRequest> adsRequests = new ArrayList<AdsRequest>();
// for (String adURL : googleAds) {
AdsRequest adsRequest = sdkFactory.createAdsRequest();
adsRequest.setAdTagUrl(adRulesUrl);
adsRequest.setAdDisplayContainer(container);
adsRequests.add(adsRequest);
// }
//Respond to the event
event.properties.put(GoogleIMAComponent.ADS_REQUESTS, adsRequests);
eventEmitter.respond(event);
}
});