Hi Aryeh,
One another way I am able to achieve this is by rearranging the order of adUIContainer by putting ExoPlayer PlayerView on top of adUIContainer (but AdCounter and learn more is not visible as well).
So layout looks something like this,
<FrameLayout
android:id="@+id/adUiContainer"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<com.google.android.exoplayer2.ui.PlayerView
android:id="@+id/playerView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
And onAdEvent() callback will look something like this,
case TAPPED:
log("Tapped on an Ad event fired.");
if (playerView.isControllerVisible()) {
playerView.hideController();
} else {
playerView.showController();
}
With this approach, I do not have to use playerView.bringToFront().
Apart from that, I am also using registerFriendlyObstruction()on all player controls.
I found one issue ExoPlayer, which is somewhat similar to this.
Thanks
Nishant