Stop radio before setting up a new one
This commit is contained in:
parent
c4fea8835a
commit
c4a8d22760
2 changed files with 4 additions and 0 deletions
|
@ -137,6 +137,7 @@ fun NonQueuedMediaItemMenu(
|
|||
mediaItem = mediaItem,
|
||||
onDismiss = onDismiss ?: menuState::hide,
|
||||
onStartRadio = {
|
||||
binder?.stopRadio()
|
||||
binder?.player?.forcePlay(mediaItem)
|
||||
binder?.setupRadio(
|
||||
NavigationEndpoint.Endpoint.Watch(
|
||||
|
@ -146,6 +147,7 @@ fun NonQueuedMediaItemMenu(
|
|||
)
|
||||
},
|
||||
onPlaySingle = {
|
||||
binder?.stopRadio()
|
||||
binder?.player?.forcePlay(mediaItem)
|
||||
},
|
||||
onPlayNext = {
|
||||
|
|
|
@ -223,10 +223,12 @@ fun SearchResultScreen(
|
|||
is YouTube.Item.Artist -> artistRoute(item.info.endpoint!!.browseId)
|
||||
is YouTube.Item.Playlist -> playlistRoute(item.info.endpoint!!.browseId)
|
||||
is YouTube.Item.Song -> {
|
||||
binder?.stopRadio()
|
||||
binder?.player?.forcePlay(item.asMediaItem)
|
||||
binder?.setupRadio(item.info.endpoint)
|
||||
}
|
||||
is YouTube.Item.Video -> {
|
||||
binder?.stopRadio()
|
||||
binder?.player?.forcePlay(item.asMediaItem)
|
||||
binder?.setupRadio(item.info.endpoint)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue