mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-08-02 22:30:40 +00:00
Merge branch 'spinner-block-player' into 'master'
Spinner block player go full screen See merge request videostreaming/grayjay!53
This commit is contained in:
commit
178d874ba0
2 changed files with 7 additions and 2 deletions
|
@ -2384,8 +2384,8 @@ class VideoDetailView : ConstraintLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
fun isLandscapeVideo(): Boolean? {
|
fun isLandscapeVideo(): Boolean? {
|
||||||
var videoSourceWidth = _player.exoPlayer?.player?.videoSize?.width
|
val videoSourceWidth = _player.exoPlayer?.player?.videoSize?.width
|
||||||
var videoSourceHeight = _player.exoPlayer?.player?.videoSize?.height
|
val videoSourceHeight = _player.exoPlayer?.player?.videoSize?.height
|
||||||
|
|
||||||
return if (videoSourceWidth == null || videoSourceHeight == null || videoSourceWidth == 0 || videoSourceHeight == 0){
|
return if (videoSourceWidth == null || videoSourceHeight == null || videoSourceWidth == 0 || videoSourceHeight == 0){
|
||||||
null
|
null
|
||||||
|
|
|
@ -592,6 +592,11 @@ class FutoVideoPlayer : FutoVideoPlayerBase {
|
||||||
|
|
||||||
@OptIn(UnstableApi::class)
|
@OptIn(UnstableApi::class)
|
||||||
fun setFullScreen(fullScreen: Boolean) {
|
fun setFullScreen(fullScreen: Boolean) {
|
||||||
|
// prevent fullscreen before the video has loaded to make sure we know whether it's a vertical or horizontal video
|
||||||
|
if(exoPlayer?.player?.videoSize?.height ?: 0 == 0 && fullScreen){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
updateRotateLock()
|
updateRotateLock()
|
||||||
|
|
||||||
if (isFullScreen == fullScreen) {
|
if (isFullScreen == fullScreen) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue