title: Chromecast support for youtube videos played via the youtube player API
body: <p>When I watch videos in the official youtube app on my Android device, I see the familiar cast icon in the toolbar, which sends the playing video to my chromecast. </p>
  
  <p>I want to write my own app that uses the official youtube player API for Android. Playing with the Android samples (<a href="https://developers.google.com/youtube/android/player/sample-applications" rel="nofollow noreferrer">https://developers.google.com/youtube/android/player/sample-applications</a>), I've noticed that the chromecast icon is missing.</p>
  
  <p>What is the best way to add chromecast support to my app which uses YoutubePlayerView or YoutubePlayerFragment to play videos?</p>