mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: getPlayerKey
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -311,10 +311,10 @@ class PlPlayerController {
|
||||
textScaleFactor: MediaQuery.textScalerOf(Get.context!).scale(1),
|
||||
);
|
||||
|
||||
late Function getPlayerKey;
|
||||
Function? getPlayerKey;
|
||||
|
||||
void updateSubtitleStyle() {
|
||||
getPlayerKey().currentState?.update(
|
||||
getPlayerKey?.call()?.currentState?.update(
|
||||
subtitleViewConfiguration: subtitleViewConfiguration,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -161,6 +161,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
plPlayerController.getPlayerKey = () => key;
|
||||
animationController = AnimationController(
|
||||
vsync: this, duration: const Duration(milliseconds: 100));
|
||||
videoController = plPlayerController.videoController!;
|
||||
@@ -169,7 +170,6 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
||||
plPlayerController.headerControl = widget.headerControl;
|
||||
plPlayerController.bottomControl = widget.bottomControl;
|
||||
plPlayerController.danmuWidget = widget.danmuWidget;
|
||||
plPlayerController.getPlayerKey = () => key;
|
||||
defaultBtmProgressBehavior = GStorage.setting.get(
|
||||
SettingBoxKey.btmProgressBehavior,
|
||||
defaultValue: BtmProgressBehavior.values.first.code);
|
||||
|
||||
Reference in New Issue
Block a user