code: private void initializeYoutubeFragment() {
      youtubeFragment = new YouTubePlayerSupportFragment();
      youtubeFragment.initialize(YOUTUBE_API_KEY, new YouTubePlayer.OnInitializedListener() {
  
        @Override public void onInitializationSuccess(YouTubePlayer.Provider provider,
            YouTubePlayer player, boolean wasRestored) {
          if (!wasRestored) {
            youtubePlayer = player;
            youtubePlayer.loadVideo(VIDEO_KEY);
            youtubePlayer.setShowFullscreenButton(true);
          }
        }
  
        @Override public void onInitializationFailure(YouTubePlayer.Provider provider,
            YouTubeInitializationResult error) {
        }
      });
    }
docs: Initialize the YouTubeSupportFrament attached as top fragment to the DraggablePanel widget and
  reproduce the YouTube video represented with a YouTube url.