[Android/ExoPlayer] No AdEvent being triggered with custom TrackSelector parameters

149 views
Skip to first unread message

Krzysztof Balana

unread,
Oct 31, 2019, 3:53:43 AM10/31/19
to Interactive Media Ads SDK
Android SDK
Exoplayer : 2.10.5 and belo
InteractiveMedia : 3.16 and below

Hi!

I've stumbled upon on some strange behaviour. In our app, we use ExoPlayer with some additional components (like TrackSelector, DRMSessionManager, BandwithMeter etc). Everything seems to work fine, I can read AdEvents correctly (they're being triggered via IMA DAI SDK) untill trackSelectors parameter setRenderedDisabled() will be used.

val newParameters = trackSelector.buildUponParameters()
.setRendererDisabled(C.TRACK_TYPE_TEXT, true)
.clearSelectionOverrides()
trackSelector.setParameters(newParameters)
(it's being used for disabling closed captions)

I've found that, particularly, setRenderDisabled() makes IMA SDK not working. Without changing this parameter, everything works as expected.

Is that an expected behaviour? I can't find connection between those two functionalities...

Thanks in advance!

IMA SDK

unread,
Oct 31, 2019, 7:07:21 AM10/31/19
to krzyszto...@dazn.com, ima...@googlegroups.com

Hi Krzysztof,

Thank you for reaching out to us.

Would you be able to share with us your sample app so we can take a closer on how this being implemented? Or if you have detailed steps on how to replicate this behavior, please do share also.

Don't forget to use the "Reply privately to author" option to share this information privately.


Regards,
Sherwin Diesta
IMA SDK Team



ref:_00D1U1174p._5001UKP5c1:ref

Krzysztof Balana

unread,
Oct 31, 2019, 11:07:41 AM10/31/19
to Interactive Media Ads SDK
Hi Sherwin!


I've prepare a compressed BasicExample app (from https://github.com/googleads/googleads-ima-android/tree/master/BasicExample). Inside class SampleVideoPlayer.java I've switched:

DefaultTrackSelector.Parameters params = new DefaultTrackSelector.ParametersBuilder().setPreferredTextLanguage("en").build();
trackSelector.setParameters(params);

into

DefaultTrackSelector.Parameters brokenParams = trackSelector.buildUponParameters().setRendererDisabled(C.TRACK_TYPE_TEXT, true).clearSelectionOverrides().build();
trackSelector.setParameters(brokenParams);
and it has broke triggering AdEvents as well.

Full implementation would be like this:

DefaultTrackSelector trackSelector = new DefaultTrackSelector();
DefaultTrackSelector.Parameters brokenParams = trackSelector.buildUponParameters().setRendererDisabled(C.TRACK_TYPE_TEXT, true).clearSelectionOverrides().build();
trackSelector.setParameters(brokenParams);

mPlayer = ExoPlayerFactory.newSimpleInstance(new DefaultRenderersFactory(mContext),
trackSelector, new DefaultLoadControl());

You can compile and check it by yourself. IMA SDK stopps triggering ad events.

IMA SDK

unread,
Oct 31, 2019, 6:07:41 PM10/31/19
to krzyszto...@dazn.com, ima...@googlegroups.com
Hi Krzysztof,

The issue you're seeing with your implementation is not with the IMA DAI SDK for Android, it seems to be with the Exoplayer's DefaultTrackSelector class not returning the correct parameters (see screenshot attached). Unfortunately, Non-IMA SDK issues are beyond the scope of this forum hence we cannot give you support, we would recommend you to reach out to the Exoplayer Support Team for further assistance on your inquiry.

Regards,
Arnaud Casame
IMA SDK Team


ref:_00D1U1174p._5001UKP5c1:ref
exoplayer_class.png
Reply all
Reply to author
Forward
0 new messages