com.google.android.youtube.player.youtubeplayerview modestbranding已禁用或隐藏在android中

时间:2016-09-07 07:25:56

标签: android-studio

google youtube player

@Override
    public void onInitializationSuccess(Provider arg0, YouTubePlayer player,
            boolean restored) {
        // TODO Auto-generated method stub
        player.setFullscreenControlFlags(YouTubePlayer.FULLSCREEN_FLAG_CONTROL_ORIENTATION);

        //This flag tells the player to automatically enter fullscreen when in landscape. Since we don't have
        //landscape layout for this activity, this is a good way to allow the user rotate the video player.
        player.addFullscreenControlFlag(YouTubePlayer.FULLSCREEN_FLAG_ALWAYS_FULLSCREEN_IN_LANDSCAPE);

        if(!restored){    //lnIEn0kWdhY
            player.cueVideo(getIntent().getStringExtra("VIDEO_ID"));
            //player.cueVideo("lnIEn0kWdhY");    
            //player.setPlayerStyle(YouTubePlayer.PlayerStyle.DEFAULT);
        }
        else {
            Log.e("dd","dff");
        }
    }

1 个答案:

答案 0 :(得分:0)

使用最小视频播放器样式隐藏youtube图标。但它只会显示计时器栏播放/暂停控制。

player.setPlayerStyle(YouTubePlayer.PlayerStyle.MINIMAL);