Added fix for video player not filling height properly for audio only in a playlist.

This commit is contained in:
Koen 2023-11-07 14:20:57 +01:00
commit 4fbb325313

View file

@ -270,7 +270,7 @@ class FutoVideoPlayer : FutoVideoPlayerBase {
if (drawable != null) { if (drawable != null) {
_videoView.defaultArtwork = drawable; _videoView.defaultArtwork = drawable;
_videoView.useArtwork = true; _videoView.useArtwork = true;
fitHeight(); fitOrFill(isFullScreen);
} else { } else {
_videoView.defaultArtwork = null; _videoView.defaultArtwork = null;
_videoView.useArtwork = false; _videoView.useArtwork = false;
@ -311,7 +311,7 @@ class FutoVideoPlayer : FutoVideoPlayerBase {
gestureControl.hideControls(); gestureControl.hideControls();
//videoControlsBar.visibility = View.GONE; //videoControlsBar.visibility = View.GONE;
_videoView.resizeMode = AspectRatioFrameLayout.RESIZE_MODE_FIT; _videoView.resizeMode = AspectRatioFrameLayout.RESIZE_MODE_FIT;
fillHeight();
_videoControls_fullscreen.show(); _videoControls_fullscreen.show();
videoControls.hide(); videoControls.hide();
} }
@ -323,16 +323,25 @@ class FutoVideoPlayer : FutoVideoPlayerBase {
gestureControl.hideControls(); gestureControl.hideControls();
//videoControlsBar.visibility = View.VISIBLE; //videoControlsBar.visibility = View.VISIBLE;
_videoView.resizeMode = AspectRatioFrameLayout.RESIZE_MODE_ZOOM; _videoView.resizeMode = AspectRatioFrameLayout.RESIZE_MODE_ZOOM;
fitHeight();
videoControls.show(); videoControls.show();
_videoControls_fullscreen.hide(); _videoControls_fullscreen.hide();
} }
fitOrFill(fullScreen);
gestureControl.setFullscreen(fullScreen); gestureControl.setFullscreen(fullScreen);
onToggleFullScreen.emit(fullScreen); onToggleFullScreen.emit(fullScreen);
isFullScreen = fullScreen; isFullScreen = fullScreen;
} }
private fun fitOrFill(fullScreen: Boolean) {
if (fullScreen) {
fillHeight();
} else {
fitHeight();
}
}
fun lockControlsAlpha(locked : Boolean) { fun lockControlsAlpha(locked : Boolean) {
if(locked && _isControlsLocked != locked) { if(locked && _isControlsLocked != locked) {
_isControlsLocked = locked; _isControlsLocked = locked;