Merge pull request #9562 from bravenewpipe/use-videostream-for-audio-only-background-playback

Support audio only background for services only supporting video streams
This commit is contained in:
Stypox 2023-01-02 17:51:10 +01:00 committed by GitHub
commit fc5a5c4e1c
3 changed files with 59 additions and 8 deletions

View file

@ -1602,8 +1602,9 @@ public final class VideoDetailFragment
binding.detailControlsDownload.setVisibility(
StreamTypeUtil.isLiveStream(info.getStreamType()) ? View.GONE : View.VISIBLE);
binding.detailControlsBackground.setVisibility(info.getAudioStreams().isEmpty()
? View.GONE : View.VISIBLE);
binding.detailControlsBackground.setVisibility(
info.getAudioStreams().isEmpty() && info.getVideoStreams().isEmpty()
? View.GONE : View.VISIBLE);
final boolean noVideoStreams =
info.getVideoStreams().isEmpty() && info.getVideoOnlyStreams().isEmpty();