title: How to play Youtube live stream video in application?
body: <p>I am trying to play live stream youtube video in my application using api key but it's showing error like: <em><code>Playback on other applications has been disabled by the video owner.</code></em></p>
  
  <p>Here is image description:</p>
  
  <p><img src="https://i.stack.imgur.com/KMJCs.png" alt="error image"></p>
  
  <p>Here is my code which is used to load video by using video id:</p>
  
  <pre><code>public class MainActivity extends YouTubeBaseActivity implements
          YouTubePlayer.OnInitializedListener {
      private static final int RECOVERY_DIALOG_REQUEST = 1;
      // YouTube player view
      private YouTubePlayerView youTubeView;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                  WindowManager.LayoutParams.FLAG_FULLSCREEN);
          setContentView(R.layout.activity_main);
          youTubeView = (YouTubePlayerView) findViewById(R.id.youtube_view);
          // Initializing video player with developer key
          youTubeView.initialize(Config.DEVELOPER_KEY, this);
  
      }
      @Override
      public void onInitializationFailure(YouTubePlayer.Provider provider,
                                          YouTubeInitializationResult errorReason) {
          if (errorReason.isUserRecoverableError()) {
              errorReason.getErrorDialog(this, RECOVERY_DIALOG_REQUEST).show();
          } else {
              String errorMessage = String.format(
                      getString(R.string.error_player), errorReason.toString());
              Toast.makeText(this, errorMessage, Toast.LENGTH_LONG).show();
          }
      }
      @Override
      public void onInitializationSuccess(YouTubePlayer.Provider provider,
                                          YouTubePlayer player, boolean wasRestored) {
          if (!wasRestored) {
  
              // loadVideo() will auto play video
              // Use cueVideo() method, if you don't want to play it automatically
              player.loadVideo("ywrPouTDTAE"); //live vid
  
              // Hiding player controls
            //  player.setPlayerStyle(YouTubePlayer.PlayerStyle.CHROMELESS);
          }
      }
      @Override
      protected void onActivityResult(int requestCode, int resultCode, Intent data) {
          if (requestCode == RECOVERY_DIALOG_REQUEST) {
              // Retry initialization if user performed a recovery action
              getYouTubePlayerProvider().initialize(Config.DEVELOPER_KEY, this);
          }
      }
  
      private YouTubePlayer.Provider getYouTubePlayerProvider() {
          return (YouTubePlayerView) findViewById(R.id.youtube_view);
      }
  
  }
  </code></pre>