mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-20 11:08:03 +08:00
mod: 详情页横屏布局(bug很多不要下载!)
This commit is contained in:
@@ -31,6 +31,7 @@ Box localCache = GStrorage.localCache;
|
||||
class PlPlayerController {
|
||||
Player? _videoPlayerController;
|
||||
VideoController? _videoController;
|
||||
void Function({bool? status})? triggerFullscreenCallback;
|
||||
|
||||
// 添加一个私有静态变量来保存实例
|
||||
static PlPlayerController? _instance;
|
||||
@@ -232,6 +233,11 @@ class PlPlayerController {
|
||||
// 播放顺序相关
|
||||
PlayRepeat playRepeat = PlayRepeat.pause;
|
||||
|
||||
void setTriggerFullscreenCallback(
|
||||
void Function({bool? status}) triggerFullscreenCallback) {
|
||||
this.triggerFullscreenCallback = triggerFullscreenCallback;
|
||||
}
|
||||
|
||||
void updateSliderPositionSecond() {
|
||||
int newSecond = _sliderPosition.value.inSeconds;
|
||||
if (sliderPositionSeconds.value != newSecond) {
|
||||
@@ -1001,6 +1007,9 @@ class PlPlayerController {
|
||||
}
|
||||
toggleFullScreen(false);
|
||||
}
|
||||
if (triggerFullscreenCallback != null) {
|
||||
triggerFullscreenCallback!(status: status);
|
||||
}
|
||||
}
|
||||
|
||||
void addPositionListener(Function(Duration position) listener) =>
|
||||
|
||||
Reference in New Issue
Block a user