File tree Expand file tree Collapse file tree
app/src/main/java/com/lagradost/cloudstream3/ui/player Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2707,6 +2707,11 @@ open class FullScreenPlayer : AbstractPlayerFragment() {
27072707 }
27082708
27092709 override fun playerDimensionsLoaded (width : Int , height : Int ) {
2710+ // On TV, don't rotate for portrait videos; display with pillarbox (black bars on sides)
2711+ if (isLayout(TV or EMULATOR )) {
2712+ isVerticalOrientation = false
2713+ return
2714+ }
27102715 isVerticalOrientation = height > width
27112716 updateOrientation()
27122717 }
@@ -2730,6 +2735,10 @@ open class FullScreenPlayer : AbstractPlayerFragment() {
27302735 }
27312736
27322737 private fun dynamicOrientation (): Int {
2738+ // TV should always remain in landscape mode
2739+ if (isLayout(TV or EMULATOR )) {
2740+ return ActivityInfo .SCREEN_ORIENTATION_SENSOR_LANDSCAPE
2741+ }
27332742 return if (autoPlayerRotateEnabled) {
27342743 if (isVerticalOrientation) {
27352744 ActivityInfo .SCREEN_ORIENTATION_SENSOR_PORTRAIT
You can’t perform that action at this time.
0 commit comments