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),
|
textScaleFactor: MediaQuery.textScalerOf(Get.context!).scale(1),
|
||||||
);
|
);
|
||||||
|
|
||||||
late Function getPlayerKey;
|
Function? getPlayerKey;
|
||||||
|
|
||||||
void updateSubtitleStyle() {
|
void updateSubtitleStyle() {
|
||||||
getPlayerKey().currentState?.update(
|
getPlayerKey?.call()?.currentState?.update(
|
||||||
subtitleViewConfiguration: subtitleViewConfiguration,
|
subtitleViewConfiguration: subtitleViewConfiguration,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -161,6 +161,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
plPlayerController.getPlayerKey = () => key;
|
||||||
animationController = AnimationController(
|
animationController = AnimationController(
|
||||||
vsync: this, duration: const Duration(milliseconds: 100));
|
vsync: this, duration: const Duration(milliseconds: 100));
|
||||||
videoController = plPlayerController.videoController!;
|
videoController = plPlayerController.videoController!;
|
||||||
@@ -169,7 +170,6 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
plPlayerController.headerControl = widget.headerControl;
|
plPlayerController.headerControl = widget.headerControl;
|
||||||
plPlayerController.bottomControl = widget.bottomControl;
|
plPlayerController.bottomControl = widget.bottomControl;
|
||||||
plPlayerController.danmuWidget = widget.danmuWidget;
|
plPlayerController.danmuWidget = widget.danmuWidget;
|
||||||
plPlayerController.getPlayerKey = () => key;
|
|
||||||
defaultBtmProgressBehavior = GStorage.setting.get(
|
defaultBtmProgressBehavior = GStorage.setting.get(
|
||||||
SettingBoxKey.btmProgressBehavior,
|
SettingBoxKey.btmProgressBehavior,
|
||||||
defaultValue: BtmProgressBehavior.values.first.code);
|
defaultValue: BtmProgressBehavior.values.first.code);
|
||||||
|
|||||||
Reference in New Issue
Block a user