mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-18 08:06:21 +08:00
Revert "feat: 新增未播放的初始态;黑屏后仍可随播放状态显示出播放器"
This reverts commit 7b5e695a7b.
This commit is contained in:
@@ -46,7 +46,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
late BangumiIntroController bangumiIntroController;
|
late BangumiIntroController bangumiIntroController;
|
||||||
late String heroTag;
|
late String heroTag;
|
||||||
|
|
||||||
Rx<PlayerStatus> playerStatus = PlayerStatus.none.obs;
|
PlayerStatus playerStatus = PlayerStatus.playing;
|
||||||
double doubleOffset = 0;
|
double doubleOffset = 0;
|
||||||
|
|
||||||
final Box<dynamic> localCache = GStorage.localCache;
|
final Box<dynamic> localCache = GStorage.localCache;
|
||||||
@@ -157,7 +157,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
|
|
||||||
// 播放器状态监听
|
// 播放器状态监听
|
||||||
void playerListener(PlayerStatus? status) async {
|
void playerListener(PlayerStatus? status) async {
|
||||||
playerStatus.value = status!;
|
playerStatus = status!;
|
||||||
if (status == PlayerStatus.completed) {
|
if (status == PlayerStatus.completed) {
|
||||||
shutdownTimerService.handleWaitingFinished();
|
shutdownTimerService.handleWaitingFinished();
|
||||||
bool notExitFlag = false;
|
bool notExitFlag = false;
|
||||||
@@ -387,13 +387,12 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
|||||||
Widget plPlayer = FutureBuilder(
|
Widget plPlayer = FutureBuilder(
|
||||||
future: _futureBuilderFuture,
|
future: _futureBuilderFuture,
|
||||||
builder: (BuildContext context, AsyncSnapshot snapshot) {
|
builder: (BuildContext context, AsyncSnapshot snapshot) {
|
||||||
if (snapshot.connectionState == ConnectionState.done) {
|
if (snapshot.hasData && snapshot.data['status']) {
|
||||||
return Obx(
|
return Obx(
|
||||||
() => !videoDetailController.autoPlay.value ||
|
() => !videoDetailController.autoPlay.value ||
|
||||||
plPlayerController == null ||
|
plPlayerController == null ||
|
||||||
plPlayerController!.videoController == null ||
|
plPlayerController!.videoController == null
|
||||||
playerStatus.value == PlayerStatus.none
|
? nil
|
||||||
? Text(playerStatus.value.toString())
|
|
||||||
: PLVideoPlayer(
|
: PLVideoPlayer(
|
||||||
controller: plPlayerController!,
|
controller: plPlayerController!,
|
||||||
videoIntroController:
|
videoIntroController:
|
||||||
|
|||||||
@@ -1,13 +1,9 @@
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
enum PlayerStatus { completed, playing, paused, none }
|
enum PlayerStatus { completed, playing, paused }
|
||||||
|
|
||||||
class PlPlayerStatus {
|
class PlPlayerStatus {
|
||||||
Rx<PlayerStatus> status = Rx(PlayerStatus.none);
|
Rx<PlayerStatus> status = Rx(PlayerStatus.paused);
|
||||||
|
|
||||||
bool get none {
|
|
||||||
return status.value == PlayerStatus.none;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool get playing {
|
bool get playing {
|
||||||
return status.value == PlayerStatus.playing;
|
return status.value == PlayerStatus.playing;
|
||||||
|
|||||||
Reference in New Issue
Block a user