mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-08-05 02:00:13 +08:00
set system brightness
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -110,6 +110,7 @@ class VideoDetailController extends GetxController
|
||||
|
||||
PlPlayerController plPlayerController = PlPlayerController.getInstance()
|
||||
..setCurrBrightness(-1.0);
|
||||
bool get setSystemBrightness => plPlayerController.setSystemBrightness;
|
||||
|
||||
late VideoItem firstVideo;
|
||||
late AudioItem firstAudio;
|
||||
|
||||
@@ -326,7 +326,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
);
|
||||
|
||||
if (!Get.previousRoute.startsWith('/video')) {
|
||||
if (Utils.isMobile) {
|
||||
if (Platform.isAndroid && !videoDetailController.setSystemBrightness) {
|
||||
ScreenBrightnessPlatform.instance.resetApplicationScreenBrightness();
|
||||
}
|
||||
PlPlayerController.setPlayCallBack(null);
|
||||
@@ -371,7 +371,7 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
|
||||
WidgetsBinding.instance.removeObserver(this);
|
||||
|
||||
if (Utils.isMobile) {
|
||||
if (Platform.isAndroid && !videoDetailController.setSystemBrightness) {
|
||||
ScreenBrightnessPlatform.instance.resetApplicationScreenBrightness();
|
||||
}
|
||||
|
||||
@@ -418,7 +418,9 @@ class _VideoDetailPageVState extends State<VideoDetailPageV>
|
||||
|
||||
introController.startTimer();
|
||||
|
||||
if (Utils.isMobile && mounted) {
|
||||
if (mounted &&
|
||||
Platform.isAndroid &&
|
||||
!videoDetailController.setSystemBrightness) {
|
||||
if (videoDetailController.brightness != null) {
|
||||
plPlayerController?.setCurrBrightness(
|
||||
videoDetailController.brightness!,
|
||||
|
||||
Reference in New Issue
Block a user