vc=44: fix back-from-fullscreen showing thumbnail placeholder
Reported: press fullscreen → press system back → VideoDetail re-renders
as a "freshly loaded page" — thumbnail with Play button overlay
visible, audio continuing from the persistent MediaController.
Root cause: `var inlinePlaying by remember(streamUrl) { mutableStateOf(false) }`
at VideoDetailScreen.kt:125 keys on streamUrl, so popping back from
Player remounts the composable with a fresh false. The thumbnail
placeholder Box renders instead of InlinePlayer; audio keeps going
on the shared controller because nothing was stopped.
Fix: default inlinePlaying to true when the shared controller is
already playing this exact stream — almost always the back-from-
fullscreen case. Fresh navigation to a video that isn't currently
playing still gets the thumbnail+Play placeholder as before.
This commit is contained in:
parent
2cfb26bbd3
commit
5d9cf3e370
2 changed files with 13 additions and 3 deletions
|
|
@ -55,6 +55,6 @@ const val NEWPIPE_APPLICATION_ID_NEW = "net.newpipe.app"
|
|||
// vc=19 / 0.1.0-AE — rust pipeline cutover. Extraction via
|
||||
// strawcore-core (Sulkta-Coop/strawcore) via the UniFFI wrapper; no
|
||||
// NewPipeExtractor in the runtime path.
|
||||
const val STRAW_VERSION_CODE = 43
|
||||
const val STRAW_VERSION_NAME = "0.1.0-BC"
|
||||
const val STRAW_VERSION_CODE = 44
|
||||
const val STRAW_VERSION_NAME = "0.1.0-BD"
|
||||
const val STRAW_APPLICATION_ID = "com.sulkta.straw"
|
||||
|
|
|
|||
|
|
@ -122,7 +122,17 @@ fun VideoDetailScreen(
|
|||
var showDownloadDialog by remember { mutableStateOf(false) }
|
||||
var showSaveToPlaylistDialog by remember { mutableStateOf(false) }
|
||||
// Inline-play state resets when navigating to a different video.
|
||||
var inlinePlaying by remember(streamUrl) { mutableStateOf(false) }
|
||||
// BUT: if the shared MediaController is already playing this exact
|
||||
// stream — most commonly because the user popped back from
|
||||
// fullscreen Player — default to true so the inline surface picks
|
||||
// up the running playback instead of dropping back to the
|
||||
// thumbnail+Play placeholder. Without this, system back from
|
||||
// fullscreen looked like "the video went to background" — audio
|
||||
// continued via the persistent controller but the video page
|
||||
// re-rendered as a freshly-loaded detail.
|
||||
var inlinePlaying by remember(streamUrl) {
|
||||
mutableStateOf(NowPlaying.current.value?.streamUrl == streamUrl)
|
||||
}
|
||||
LaunchedEffect(streamUrl) { vm.load(streamUrl) }
|
||||
|
||||
// The Background button (and the fullscreen audio-only toggle)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue