From c0e64b65e4a0db79c5338dc0518180797c279711 Mon Sep 17 00:00:00 2001 From: Kimen Tang Date: Tue, 12 Dec 2023 13:05:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DiOS16=E4=BB=A5?= =?UTF-8?q?=E4=B8=8A=E8=B0=83=E8=8A=82=E5=B1=8F=E5=B9=95=E4=BA=AE=E5=BA=A6?= =?UTF-8?q?=E4=B8=8D=E4=B8=9D=E6=BB=91=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/KSPlayer/Video/IOSVideoPlayerView.swift | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Sources/KSPlayer/Video/IOSVideoPlayerView.swift b/Sources/KSPlayer/Video/IOSVideoPlayerView.swift index db60ede37..89a14b14b 100644 --- a/Sources/KSPlayer/Video/IOSVideoPlayerView.swift +++ b/Sources/KSPlayer/Video/IOSVideoPlayerView.swift @@ -33,6 +33,14 @@ open class IOSVideoPlayerView: VideoPlayerView { fullScreenDelegate?.player(isMaskShow: isMaskShow, isFullScreen: landscapeButton.isSelected) } } + + #if !os(xrOS) + private var brightness: CGFloat = UIScreen.main.brightness { + didSet { + UIScreen.main.brightness = brightness + } + } + #endif override open func customizeUIComponents() { super.customizeUIComponents() @@ -254,7 +262,7 @@ open class IOSVideoPlayerView: VideoPlayerView { } } else if KSOptions.enableBrightnessGestures { #if !os(xrOS) - UIScreen.main.brightness += CGFloat(panValue(velocity: point, direction: direction, currentTime: Float(toolBar.currentTime), totalTime: Float(totalTime))) + brightness += CGFloat(panValue(velocity: point, direction: direction, currentTime: Float(toolBar.currentTime), totalTime: Float(totalTime))) #endif } } else {