Skip to content

Commit

Permalink
优化UI
Browse files Browse the repository at this point in the history
  • Loading branch information
kingslay committed Jan 5, 2024
1 parent 0c5a8b6 commit 61b339f
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions Sources/KSPlayer/SwiftUI/KSVideoPlayerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,6 @@ public struct KSVideoPlayerView: View {
break
}
}
.onExitCommand {
if playerCoordinator.isMaskShow {
playerCoordinator.isMaskShow = false
} else {
dismiss()
}
}
#else
.onHover {
playerCoordinator.isMaskShow = $0
Expand All @@ -167,9 +160,6 @@ public struct KSVideoPlayerView: View {
.onAppear {
maskFocused = true
}
.onExitCommand {
playerCoordinator.isMaskShow = false
}
.padding()
}

Expand All @@ -193,6 +183,13 @@ public struct KSVideoPlayerView: View {
playerCoordinator.playerLayer?.play()
}
}
.onExitCommand {
if playerCoordinator.isMaskShow {
playerCoordinator.isMaskShow = false
} else {
dismiss()
}
}
#endif
}

Expand Down

0 comments on commit 61b339f

Please sign in to comment.