فهرست منبع

Revert "Add missing await" (#1740)

Neeraj Gupta 1 سال پیش
والد
کامیت
8ebb593642
1فایلهای تغییر یافته به همراه4 افزوده شده و 8 حذف شده
  1. 4 8
      lib/ui/viewer/file/video_widget_new.dart

+ 4 - 8
lib/ui/viewer/file/video_widget_new.dart

@@ -252,14 +252,10 @@ class _VideoWidgetNewState extends State<VideoWidgetNew>
 
   void _setVideoController(String url) {
     if (mounted) {
-      setState(() async {
-        try {
-          await player.setPlaylistMode(PlaylistMode.single);
-          controller = VideoController(player);
-          await player.open(Media(url), play: _isAppInFG);
-        } catch (e, s) {
-          _logger.severe("failed to set video url", e, s);
-        }
+      setState(() {
+        player.setPlaylistMode(PlaylistMode.single);
+        controller = VideoController(player);
+        player.open(Media(url), play: _isAppInFG);
       });
     }
   }