Skip to content

Commit 14b4658

Browse files
fix: minimize to bottom player should change playback to audio mode unless the video is playing
1 parent a7faa69 commit 14b4658

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

library/src/commonMain/kotlin/project/pipepipe/app/viewmodel/VideoDetailViewModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ class VideoDetailViewModel()
164164
val controller = SharedContext.platformMediaController
165165
val streamInfo = uiState.value.currentStreamInfo
166166
if (SharedContext.playbackMode.value == PlaybackMode.VIDEO_AUDIO
167-
&& controller?.currentMediaItem?.value?.mediaId == streamInfo?.url) {
167+
&& controller?.currentMediaItem?.value?.mediaId == streamInfo?.url && controller?.isPlaying?.value == true) {
168168
SharedContext.playingVideoUrlBeforeMinimizing = streamInfo?.url
169169
}
170170
SharedContext.updatePlaybackMode(PlaybackMode.AUDIO_ONLY)

0 commit comments

Comments
 (0)