Skip to content

Commit

Permalink
Merge pull request #6757 from Bnyro/master
Browse files Browse the repository at this point in the history
fix: video aspect ratio ignored when playing videos offline
  • Loading branch information
Bnyro authored Nov 18, 2024
2 parents 996586c + 889c253 commit 9acb486
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,16 @@ class OfflinePlayerActivity : BaseActivity() {
playerBinding.duration.text = DateUtils.formatElapsedTime(
player.duration / 1000
)

if (events.contains(Player.EVENT_TRACKS_CHANGED)) {
requestedOrientation = PlayerHelper.getOrientation(
playerController.videoSize.width,
playerController.videoSize.height
)
}
}

override fun onIsPlayingChanged(isPlaying: Boolean) {
super.onIsPlayingChanged(isPlaying)

requestedOrientation = PlayerHelper.getOrientation(
playerController.videoSize.width,
playerController.videoSize.height
)

if (PlayerHelper.pipEnabled) {
PictureInPictureCompat.setPictureInPictureParams(
this@OfflinePlayerActivity,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ abstract class CustomExoPlayerView(
binding.queueToggle.setOnClickListener {
PlayingQueueSheet().show(supportFragmentManager, null)
}

updateMarginsByFullscreenMode()
}

/**
Expand Down

0 comments on commit 9acb486

Please sign in to comment.