问题
I am developing a video application on Android that plays videos from YouTube. For this purpose, I am using YouTube Android API. I have made my player to CHROMELESS as follows:
public void onInitializationSuccess(Provider provider, YouTubePlayer player,
boolean wasRestored) {
player.setPlayerStyle(PlayerStyle.CHROMELESS);
player.loadVideo(VIDEO);
}
Everything is working fine but while video playing bottom overlay ads are coming at the bottom. How can I hide or remove that bottom overlay ads? If it is not possible then how can I block touch event on that portion of ads only.
I don't want my users to leave my application.
回答1:
set Change
player.setPlayerStyle(PlayerStyle.CHROMELESS);
player.loadVideo(VIDEO);
To:---
player.loadVideo(VIDEO);
player.setPlayerStyle(PlayerStyle.CHROMELESS);
NOTE:- Load the video first then set your player style may be helpful to you
来源:https://stackoverflow.com/questions/29059462/how-to-remove-bottom-overlay-ads-from-custom-youtube-player-android