title: How to play youtube data api video in landscape fullscreen mode by default
body: <p>I am developing an android app, where I want to make a collection of some youtube videos. I want to play these videos in fullscreen landscape mode when I tap on any of the videos. Please help me. Here is the code</p>
  
  <blockquote>
    <p>MainActivity.java</p>
  </blockquote>
  
  <pre><code>package com.pss.hotbellydance;
  
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  
  import com.google.android.youtube.player.YouTubeBaseActivity;
  import com.google.android.youtube.player.YouTubeInitializationResult;
  import com.google.android.youtube.player.YouTubePlayer;
  import com.google.android.youtube.player.YouTubePlayerView;
  
  public class MainActivity extends YouTubeBaseActivity {
  
  YouTubePlayerView youTubePlayerView;
  public static final String KEY = "AIzaSyDUbG4mpT9FCLhkVi3uRdI1G-Dt9DRXTlU";
  public static final String VID_ID = "UVSTNzonj8Q";
  YouTubePlayer.OnInitializedListener onInitializedListener;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      youTubePlayerView = (YouTubePlayerView) findViewById(R.id.video1);
  
      onInitializedListener = new YouTubePlayer.OnInitializedListener() {
          @Override
          public void onInitializationSuccess(YouTubePlayer.Provider provider, YouTubePlayer youTubePlayer, boolean b) {
              youTubePlayer.loadVideo(VID_ID);
          }
  
          @Override
          public void onInitializationFailure(YouTubePlayer.Provider provider, YouTubeInitializationResult youTubeInitializationResult) {
  
          }
      };
  
      youTubePlayerView.initialize(KEY,onInitializedListener);
  }
  }
  </code></pre>
  
  <blockquote>
    <p>activity_main.xml</p>
  </blockquote>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical"
  tools:context="com.pss.hotbellydance.MainActivity"&gt;
  
  &lt;com.google.android.youtube.player.YouTubePlayerView
  android:id="@+id/video1"
  android:layout_width="match_parent"
  android:layout_height="250dp"&gt;
  &lt;/com.google.android.youtube.player.YouTubePlayerView&gt;
  &lt;/LinearLayout&gt;
  </code></pre>