Skip to content

Instantly share code, notes, and snippets.

@nazmulidris
Created March 9, 2018 01:24
Show Gist options
  • Save nazmulidris/5a692ef153b61593bd181ee8cdfa32da to your computer and use it in GitHub Desktop.
Save nazmulidris/5a692ef153b61593bd181ee8cdfa32da to your computer and use it in GitHub Desktop.
override fun onUserLeaveHint() {
enterPictureInPictureMode(
with(PictureInPictureParams.Builder()) {
val width = 16
val height = 9
setAspectRatio(Rational(width, height))
build()
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment