Merge pull request #6757 from Bnyro/master

fix: video aspect ratio ignored when playing videos offline
This commit is contained in:
Bnyro 2024-11-18 16:31:04 +01:00 committed by GitHub
commit 9acb48645c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 7 deletions

View File

@ -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,

View File

@ -260,6 +260,8 @@ abstract class CustomExoPlayerView(
binding.queueToggle.setOnClickListener {
PlayingQueueSheet().show(supportFragmentManager, null)
}
updateMarginsByFullscreenMode()
}
/**