mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-04-20 03:24:50 +00:00
Added fix for video player not filling height properly for audio only in a playlist.
This commit is contained in:
parent
e1d3b95f73
commit
4fbb325313
1 changed files with 12 additions and 3 deletions
|
@ -270,7 +270,7 @@ class FutoVideoPlayer : FutoVideoPlayerBase {
|
|||
if (drawable != null) {
|
||||
_videoView.defaultArtwork = drawable;
|
||||
_videoView.useArtwork = true;
|
||||
fitHeight();
|
||||
fitOrFill(isFullScreen);
|
||||
} else {
|
||||
_videoView.defaultArtwork = null;
|
||||
_videoView.useArtwork = false;
|
||||
|
@ -311,7 +311,7 @@ class FutoVideoPlayer : FutoVideoPlayerBase {
|
|||
gestureControl.hideControls();
|
||||
//videoControlsBar.visibility = View.GONE;
|
||||
_videoView.resizeMode = AspectRatioFrameLayout.RESIZE_MODE_FIT;
|
||||
fillHeight();
|
||||
|
||||
_videoControls_fullscreen.show();
|
||||
videoControls.hide();
|
||||
}
|
||||
|
@ -323,16 +323,25 @@ class FutoVideoPlayer : FutoVideoPlayerBase {
|
|||
gestureControl.hideControls();
|
||||
//videoControlsBar.visibility = View.VISIBLE;
|
||||
_videoView.resizeMode = AspectRatioFrameLayout.RESIZE_MODE_ZOOM;
|
||||
fitHeight();
|
||||
|
||||
videoControls.show();
|
||||
_videoControls_fullscreen.hide();
|
||||
}
|
||||
|
||||
fitOrFill(fullScreen);
|
||||
gestureControl.setFullscreen(fullScreen);
|
||||
onToggleFullScreen.emit(fullScreen);
|
||||
isFullScreen = fullScreen;
|
||||
}
|
||||
|
||||
private fun fitOrFill(fullScreen: Boolean) {
|
||||
if (fullScreen) {
|
||||
fillHeight();
|
||||
} else {
|
||||
fitHeight();
|
||||
}
|
||||
}
|
||||
|
||||
fun lockControlsAlpha(locked : Boolean) {
|
||||
if(locked && _isControlsLocked != locked) {
|
||||
_isControlsLocked = locked;
|
||||
|
|
Loading…
Add table
Reference in a new issue