feat: 播放器亮度记忆

This commit is contained in:
guozhigq
2023-08-25 23:51:40 +08:00
parent 6083578f93
commit 8bc6a32b06
6 changed files with 39 additions and 18 deletions

View File

@ -45,6 +45,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
double doubleOffset = 0;
Box localCache = GStrorage.localCache;
Box setting = GStrorage.setting;
late double statusBarHeight;
final videoHeight = Get.size.width * 9 / 16;
late Future _futureBuilderFuture;
@ -104,6 +105,10 @@ class _VideoDetailPageState extends State<VideoDetailPage>
@override
// 离开当前页面时
void didPushNext() async {
/// 开启
if (setting.get(SettingBoxKey.enableAutoBrightness, defaultValue: false)) {
videoDetailController.brightness = plPlayerController!.brightness.value;
}
videoDetailController.defaultST = plPlayerController!.position.value;
videoIntroController.isPaused = true;
plPlayerController!.pause();