mirror of
https://github.com/jellyfin/jellyfin-android.git
synced 2026-09-03 05:10:27 +03:00
Use extension and fix possible crash
width and height can be null, MediaStream.isLandscape handles this.
This commit is contained in:
committed by
Niels van Velzen
parent
341676279e
commit
26e60cde65
@@ -250,7 +250,7 @@ class PlayerFragment : Fragment(), BackPressInterceptor {
|
||||
*/
|
||||
private fun toggleFullscreen() {
|
||||
val videoTrack = currentVideoStream
|
||||
if (videoTrack == null || videoTrack.width!! >= videoTrack.height!!) {
|
||||
if (videoTrack == null || videoTrack.isLandscape) {
|
||||
val current = resources.configuration.orientation
|
||||
requireActivity().requestedOrientation = when (current) {
|
||||
Configuration.ORIENTATION_PORTRAIT -> ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE
|
||||
|
||||
Reference in New Issue
Block a user