title: Wrong volume control stream for CastPlayer in a Service
body: <p>I'm using the ExoPlayer Google Cast extension v2.8.4. When playing content using the CastPlayer, the device's physical volume buttons should control the receiver device's volume. This behaves as expected when the CastPlayer is contained within an Activity. However, when the CastPlayer is contained within a Service (such as a MediaBrowserServiceCompat) the physical volume buttons change the sender device's media volume.</p>
  
  <p>I've created 2 sample projects demonstrating the issue:</p>
  
  <ul>
  <li><a href="https://github.com/deRonbrown/CastVolumeControlTest" rel="nofollow noreferrer">CastVolumeControlTest</a> shows the proper volume control stream behavior while casting.</li>
  <li><a href="https://github.com/deRonbrown/CastVolumeControlServiceTest" rel="nofollow noreferrer">CastVolumeControlServiceTest</a> shows the incorrect volume control stream behavior while casting.</li>
  </ul>
  
  <p>As seen in the image below, the cast device volume does appear in the full volume controls view, but the phone's media volume is the active control stream when the CastPlayer is in a service.</p>
  
  <p>Is there a way to set the proper volume control stream in the Service implementation?</p>
  
  <p><a href="https://i.stack.imgur.com/XZnhY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XZnhY.png" alt="enter image description here"></a></p>