Skip to content

Commit d9895da

Browse files
PiP snippet additions (#203)
1 parent b48562b commit d9895da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compose/snippets/src/main/java/com/example/compose/snippets/pictureInPicture/PictureInPictureSnippets.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ fun PiPBuilderSetAutoEnterEnabled(
7777
}
7878
context.findActivity().setPictureInPictureParams(builder.build())
7979
}
80-
// [END android_compose_pip_builder_auto_enter]
8180
VideoPlayer(pipModifier)
81+
// [END android_compose_pip_builder_auto_enter]
8282
} else {
8383
Log.i(PIP_TAG, "API does not support PiP")
8484
}
@@ -102,7 +102,6 @@ fun EnterPiPThroughButton() {
102102
Button(onClick = {
103103
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
104104
context.findActivity().enterPictureInPictureMode(
105-
// the parameters have been set by previous calls
106105
PictureInPictureParams.Builder().build()
107106
)
108107
} else {
@@ -339,6 +338,7 @@ fun PiPBuilderAddRemoteActions(
339338
}
340339
context.findActivity().setPictureInPictureParams(builder.build())
341340
}
341+
VideoPlayer(modifier = pipModifier)
342342
// [END android_compose_pip_add_remote_actions]
343343
} else {
344344
Log.i(PIP_TAG, "API does not support PiP")

0 commit comments

Comments
 (0)