feat: 播放器全屏回调
This commit is contained in:
@ -514,6 +514,13 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
showEposideCb: () => vdCtr.videoType == SearchType.video
|
showEposideCb: () => vdCtr.videoType == SearchType.video
|
||||||
? videoIntroController.showEposideHandler()
|
? videoIntroController.showEposideHandler()
|
||||||
: bangumiIntroController.showEposideHandler(),
|
: bangumiIntroController.showEposideHandler(),
|
||||||
|
fullScreenCb: (bool status) {
|
||||||
|
if (status) {
|
||||||
|
videoHeight.value = Get.size.height;
|
||||||
|
} else {
|
||||||
|
videoHeight.value = defaultVideoHeight;
|
||||||
|
}
|
||||||
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -39,6 +39,7 @@ class PLVideoPlayer extends StatefulWidget {
|
|||||||
this.customWidget,
|
this.customWidget,
|
||||||
this.customWidgets,
|
this.customWidgets,
|
||||||
this.showEposideCb,
|
this.showEposideCb,
|
||||||
|
this.fullScreenCb,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -52,6 +53,7 @@ class PLVideoPlayer extends StatefulWidget {
|
|||||||
final Widget? customWidget;
|
final Widget? customWidget;
|
||||||
final List<Widget>? customWidgets;
|
final List<Widget>? customWidgets;
|
||||||
final Function? showEposideCb;
|
final Function? showEposideCb;
|
||||||
|
final Function? fullScreenCb;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<PLVideoPlayer> createState() => _PLVideoPlayerState();
|
State<PLVideoPlayer> createState() => _PLVideoPlayerState();
|
||||||
@ -335,7 +337,10 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
fuc: () => _.triggerFullScreen(status: !_.isFullScreen.value),
|
fuc: () {
|
||||||
|
_.triggerFullScreen(status: !_.isFullScreen.value);
|
||||||
|
widget.fullScreenCb?.call(!_.isFullScreen.value);
|
||||||
|
},
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
final List<Widget> list = [];
|
final List<Widget> list = [];
|
||||||
|
Reference in New Issue
Block a user