瀏覽代碼

Refactor pause logic in VidPlayerController and fix frame navigation bug

gavin.chen 1 年之前
父節點
當前提交
547b9e26d6
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/view/player/controller_old.dart

+ 1 - 1
lib/view/player/controller_old.dart

@@ -185,7 +185,7 @@ class VidPlayerControllerNoSharing extends ChangeNotifier
   /// [index] frame index
   Future<bool> gotoFrame(int index) async {
     if (index < 0 || index >= totalFramesCount) return false;
-
+    if (index == currentFrameIndex) return true;
     _frameIndex = index;
     _updateFrame();
     return true;