mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-16 07:06:14 +08:00
fix: check initialization before playing
This commit is contained in:
@@ -208,6 +208,11 @@ class _VideoDetailPageState extends State<VideoDetailPage>
|
||||
|
||||
/// 未开启自动播放时触发播放
|
||||
Future<void> handlePlay() async {
|
||||
if (videoDetailController.videoUrl == null ||
|
||||
videoDetailController.audioUrl == null) {
|
||||
SmartDialog.showToast('not initialized');
|
||||
return;
|
||||
}
|
||||
videoDetailController.isShowCover.value = false;
|
||||
await videoDetailController.playerInit();
|
||||
plPlayerController = videoDetailController.plPlayerController;
|
||||
|
||||
Reference in New Issue
Block a user