mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-29 16:30:31 +05:30
Merge pull request #6757 from Bnyro/master
fix: video aspect ratio ignored when playing videos offline
This commit is contained in:
commit
9acb48645c
@ -71,18 +71,16 @@ class OfflinePlayerActivity : BaseActivity() {
|
|||||||
playerBinding.duration.text = DateUtils.formatElapsedTime(
|
playerBinding.duration.text = DateUtils.formatElapsedTime(
|
||||||
player.duration / 1000
|
player.duration / 1000
|
||||||
)
|
)
|
||||||
|
|
||||||
if (events.contains(Player.EVENT_TRACKS_CHANGED)) {
|
|
||||||
requestedOrientation = PlayerHelper.getOrientation(
|
|
||||||
playerController.videoSize.width,
|
|
||||||
playerController.videoSize.height
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onIsPlayingChanged(isPlaying: Boolean) {
|
override fun onIsPlayingChanged(isPlaying: Boolean) {
|
||||||
super.onIsPlayingChanged(isPlaying)
|
super.onIsPlayingChanged(isPlaying)
|
||||||
|
|
||||||
|
requestedOrientation = PlayerHelper.getOrientation(
|
||||||
|
playerController.videoSize.width,
|
||||||
|
playerController.videoSize.height
|
||||||
|
)
|
||||||
|
|
||||||
if (PlayerHelper.pipEnabled) {
|
if (PlayerHelper.pipEnabled) {
|
||||||
PictureInPictureCompat.setPictureInPictureParams(
|
PictureInPictureCompat.setPictureInPictureParams(
|
||||||
this@OfflinePlayerActivity,
|
this@OfflinePlayerActivity,
|
||||||
|
@ -260,6 +260,8 @@ abstract class CustomExoPlayerView(
|
|||||||
binding.queueToggle.setOnClickListener {
|
binding.queueToggle.setOnClickListener {
|
||||||
PlayingQueueSheet().show(supportFragmentManager, null)
|
PlayingQueueSheet().show(supportFragmentManager, null)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateMarginsByFullscreenMode()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user