Skip to content

Commit 58d0608

Browse files
committed
feat(sample): add onPlaybackEnded usage example with log
1 parent 2ad4492 commit 58d0608

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

sample/composeApp/src/commonMain/kotlin/sample/app/player/PlayerScreen.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ fun PlayerScreen(modifier: Modifier = Modifier) {
102102
}
103103
}
104104

105+
// Example: detect when playback reaches the end
106+
playerState.onPlaybackEnded = {
107+
println("Playback ended")
108+
}
109+
105110
// Auto-hide controls when playing
106111
LaunchedEffect(controlsVisible, playerState.isPlaying) {
107112
if (controlsVisible && playerState.isPlaying) {

0 commit comments

Comments
 (0)