Skip to content

Commit

Permalink
test remove nearly all play function
Browse files Browse the repository at this point in the history
  • Loading branch information
orz12 committed Jul 23, 2024
1 parent 34dc921 commit 2cb4a7a
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions lib/plugin/pl_player/controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -884,24 +884,24 @@ class PlPlayerController {
/// 播放视频
/// TODO _duration.value丢失
Future<void> play({bool repeat = false, bool hideControls = true}) async {
if (_playerCount.value == 0) return;
// SmartDialog.showToast(
// (await audioSessionHandler.setActive(true)).toString());
// 播放时自动隐藏控制条
controls = !hideControls;
// repeat为true,将从头播放
if (repeat) {
// await seekTo(Duration.zero);
await seekTo(Duration.zero, type: "slider");
}
// if (_playerCount.value == 0) return;
// // SmartDialog.showToast(
// // (await audioSessionHandler.setActive(true)).toString());
// // 播放时自动隐藏控制条
// controls = !hideControls;
// // repeat为true,将从头播放
// if (repeat) {
// // await seekTo(Duration.zero);
// await seekTo(Duration.zero, type: "slider");
// }

// await _videoPlayerController?.play();
if (!playerStatus.playing) await _videoPlayerController?.playOrPause();

await getCurrentVolume();
await getCurrentBrightness();

playerStatus.status.value = PlayerStatus.playing;
// await getCurrentVolume();
// await getCurrentBrightness();
//
// playerStatus.status.value = PlayerStatus.playing;
// screenManager.setOverlays(false);
}

Expand Down

0 comments on commit 2cb4a7a

Please sign in to comment.