mirror of
https://github.com/yattee/yattee.git
synced 2024-11-09 15:58:20 +00:00
Fix player overlay opacity
This commit is contained in:
parent
40097de1fd
commit
c7b64c973d
@ -10,7 +10,7 @@ extension PlayerModel {
|
||||
}
|
||||
|
||||
var videoForDisplay: Video? {
|
||||
videoBeingOpened ?? (closing ? nil : currentVideo)
|
||||
videoBeingOpened ?? currentVideo
|
||||
}
|
||||
|
||||
func play(_ videos: [Video], shuffling: Bool = false) {
|
||||
|
@ -30,10 +30,16 @@ struct PlayerOverlayModifier: ViewModifier {
|
||||
}
|
||||
}
|
||||
.animation(.easeIn, value: player.videoForDisplay)
|
||||
.opacity(player.videoForDisplay == nil ? 0 : 1)
|
||||
.opacity(opacity)
|
||||
}
|
||||
}
|
||||
|
||||
var opacity: Double {
|
||||
guard !player.closing else { return 0 }
|
||||
|
||||
return player.videoForDisplay == nil ? 0 : 1
|
||||
}
|
||||
|
||||
var maxWidth: Double {
|
||||
playerBarMaxWidth == "0" ? .infinity : (Double(playerBarMaxWidth) ?? 600)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user