Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: automatic PiP animation #648

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix linting
  • Loading branch information
Natanel-Shitrit authored and jarnedemeulemeester committed Feb 3, 2024
commit 195bad2ae382f84871d6c7a9bc59c0c4859f3368
7 changes: 4 additions & 3 deletions app/phone/src/main/java/dev/jdtech/jellyfin/PlayerActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,8 @@ class PlayerActivity : BasePlayerActivity() {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S &&
appPreferences.playerPipGesture &&
viewModel.player.isPlaying &&
!isControlsLocked) {
!isControlsLocked
) {
pictureInPicture()
}
}
Expand Down Expand Up @@ -308,10 +309,10 @@ class PlayerActivity : BasePlayerActivity() {
.setSourceRectHint(sourceRectHint)

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
builder.setAutoEnterEnabled(true);
builder.setAutoEnterEnabled(true)
}

return builder.build();
return builder.build()
}

private fun pictureInPicture() {
Expand Down