I have an alarm clock app and i want the users to be able to set a youtube video as their alarm. The thing is that the YouTubePlayer is playing via the music stream, which means that if the user is going to sleep while the earphones are plugged to the smartphone, he/she won't be able to hear the alarm. On the MediaPlayer i can set the alarm to use the phone speakers by using this line of code:
audioManager.setStreamVolume(AudioManager.STREAM_ALARM, stream_music_volume, AudioManager.FLAG_REMOVE_SOUND_AND_VIBRATE);
Is there a possibility to do the same with the YouTubePlayer or i have to play it via the music stream?