mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-08-02 22:30:40 +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) {
|
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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue