@@ -699,7 +699,7 @@ public boolean onOptionsItemSelected(final MenuItem item) {
699699 Stream stream ;
700700 if (currentInfo .getVideoStreams ().isEmpty ()
701701 && currentInfo .getVideoOnlyStreams ().isEmpty ()) {
702- stream = getSelectedAudioStream ();
702+ stream = getDefaultAudioStream ();
703703 } else {
704704 stream = getSelectedVideoStream ();
705705 }
@@ -939,7 +939,7 @@ private boolean shouldShowComments() {
939939 //////////////////////////////////////////////////////////////////////////*/
940940
941941 private void openBackgroundPlayer (final boolean append ) {
942- AudioStream audioStream = getSelectedAudioStream ();
942+ AudioStream audioStream = getDefaultAudioStream ();
943943
944944 boolean useExternalAudioPlayer = PreferenceManager .getDefaultSharedPreferences (activity )
945945 .getBoolean (activity .getString (R .string .use_external_audio_player_key ), false );
@@ -1025,8 +1025,16 @@ private VideoStream getSelectedVideoStream() {
10251025 return sortedVideoStreams != null ? sortedVideoStreams .get (selectedVideoStreamIndex ) : null ;
10261026 }
10271027
1028+ /**
1029+ * Get the stream to play when the current stream is an audio-only stream.
1030+ *
1031+ * This is the audio-only equivalent of getSelectedVideoStream,
1032+ * without the ability for the user to select a custom stream quality.
1033+ *
1034+ * @return AudioStream instance according to user settings
1035+ */
10281036 @ Nullable
1029- private AudioStream getSelectedAudioStream () {
1037+ private AudioStream getDefaultAudioStream () {
10301038 int streamIndex = ListHelper .getDefaultAudioFormat (activity , currentInfo .getAudioStreams ());
10311039 return currentInfo .getAudioStreams ().get (streamIndex );
10321040 }
0 commit comments