@@ -4234,10 +4234,7 @@ private void useVideoSource(final boolean videoEnabled) {
42344234 if (playQueueManagerReloadingNeeded (sourceType , info , getVideoRendererIndex ())) {
42354235 reloadPlayQueueManager ();
42364236 } else {
4237- final StreamType streamType = info .getStreamType ();
4238- if (streamType == StreamType .AUDIO_STREAM
4239- || streamType == StreamType .AUDIO_LIVE_STREAM
4240- || streamType == StreamType .POST_LIVE_AUDIO_STREAM ) {
4237+ if (StreamTypeUtil .isAudio (info .getStreamType ())) {
42414238 // Nothing to do more than setting the recovery position
42424239 setRecovery ();
42434240 return ;
@@ -4296,21 +4293,17 @@ private boolean playQueueManagerReloadingNeeded(final SourceType sourceType,
42964293 @ NonNull final StreamInfo streamInfo ,
42974294 final int videoRendererIndex ) {
42984295 final StreamType streamType = streamInfo .getStreamType ();
4296+ final boolean isStreamTypeAudio = StreamTypeUtil .isAudio (streamType );
42994297
4300- if (videoRendererIndex == RENDERER_UNAVAILABLE && streamType != StreamType .AUDIO_STREAM
4301- && streamType != StreamType .AUDIO_LIVE_STREAM
4302- && streamType != StreamType .POST_LIVE_AUDIO_STREAM ) {
4298+ if (videoRendererIndex == RENDERER_UNAVAILABLE && !isStreamTypeAudio ) {
43034299 return true ;
43044300 }
43054301
43064302 // The content is an audio stream, an audio live stream, or a live stream with a live
43074303 // source: it's not needed to reload the play queue manager because the stream source will
43084304 // be the same
4309- if ((streamType == StreamType .AUDIO_STREAM
4310- || streamType == StreamType .POST_LIVE_AUDIO_STREAM
4311- || streamType == StreamType .AUDIO_LIVE_STREAM )
4312- || (streamType == StreamType .LIVE_STREAM
4313- && sourceType == SourceType .LIVE_STREAM )) {
4305+ if (isStreamTypeAudio || (streamType == StreamType .LIVE_STREAM
4306+ && sourceType == SourceType .LIVE_STREAM )) {
43144307 return false ;
43154308 }
43164309
@@ -4324,9 +4317,7 @@ private boolean playQueueManagerReloadingNeeded(final SourceType sourceType,
43244317 && isNullOrEmpty (streamInfo .getAudioStreams ()))) {
43254318 // It's not needed to reload the play queue manager only if the content's stream type
43264319 // is a video stream, a live stream or an ended live stream
4327- return streamType != StreamType .VIDEO_STREAM
4328- && streamType != StreamType .LIVE_STREAM
4329- && streamType != StreamType .POST_LIVE_STREAM ;
4320+ return !StreamTypeUtil .isVideo (streamType );
43304321 }
43314322
43324323 // Other cases: the play queue manager reload is needed
0 commit comments