π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Use video_widget_media_kit.dart instead of video_widget_media_kit_new.dart
AmanRajSinghMourya0c3b751b3099
diff --git a/mobile/lib/ui/viewer/file/video_widget.dart b/mobile/lib/ui/viewer/file/video_widget.dartindex e530ee925d..2f7ef84d00 100644--- a/mobile/lib/ui/viewer/file/video_widget.dart+++ b/mobile/lib/ui/viewer/file/video_widget.dart@@ -14,8 +14,8 @@ import "package:photos/service_locator.dart";import "package:photos/services/video_preview_service.dart";import "package:photos/theme/colors.dart";import "package:photos/ui/common/loading_widget.dart";-import "package:photos/ui/notification/toast.dart";-import "package:photos/ui/viewer/file/video_widget_media_kit_new.dart";+import "package:photos/ui/notification/toast.dart";+import "package:photos/ui/viewer/file/video_widget_media_kit.dart";import "package:photos/ui/viewer/file/video_widget_native.dart";import "package:photos/utils/standalone/data.dart";@@ -171,7 +171,7 @@ class _VideoWidgetState extends State<VideoWidget> {onFinalFileLoad: widget.onFinalFileLoad,);}- return VideoWidgetMediaKitNew(+ return VideoWidgetMediaKit(widget.file,key: mediaKitKey,tagPrefix: widget.tagPrefix,diff --git a/mobile/lib/ui/viewer/file/video_widget_media_kit.dart b/mobile/lib/ui/viewer/file/video_widget_media_kit.dartindex 26c0f9054d..80b9f438ca 100644--- a/mobile/lib/ui/viewer/file/video_widget_media_kit.dart+++ b/mobile/lib/ui/viewer/file/video_widget_media_kit.dart@@ -36,6 +36,7 @@ class VideoWidgetMediaKit extends StatefulWidget {final void Function() onStreamChange;final File? preview;final bool selectedPreview;+ final Function({required int memoryDuration})? onFinalFileLoad;const VideoWidgetMediaKit(this.file, {@@ -45,6 +46,7 @@ class VideoWidgetMediaKit extends StatefulWidget {required this.onStreamChange,this.preview,required this.selectedPreview,+ this.onFinalFileLoad,super.key,});@@ -313,6 +315,13 @@ class _VideoWidgetMediaKitState extends State<VideoWidgetMediaKit>}player.open(Media(url), play: _isAppInFG);});+ int duration = controller!.player.state.duration.inSeconds;+ if (duration == 0) {+ duration = 10;+ }+ widget.onFinalFileLoad?.call(+ memoryDuration: duration,+ );}}}diff --git a/mobile/lib/ui/viewer/file/video_widget_media_kit_new.dart b/mobile/lib/ui/viewer/file/video_widget_media_kit_new.dartindex 63f7946ace..8a3fae3b43 100644--- a/mobile/lib/ui/viewer/file/video_widget_media_kit_new.dart+++ b/mobile/lib/ui/viewer/file/video_widget_media_kit_new.dart@@ -34,7 +34,6 @@ class VideoWidgetMediaKitNew extends StatefulWidget {final void Function() onStreamChange;final File? preview;final bool selectedPreview;- final Function({required int memoryDuration})? onFinalFileLoad;const VideoWidgetMediaKitNew(this.file, {@@ -44,7 +43,6 @@ class VideoWidgetMediaKitNew extends StatefulWidget {required this.onStreamChange,this.preview,required this.selectedPreview,- this.onFinalFileLoad,super.key,});@@ -261,13 +259,6 @@ class _VideoWidgetMediaKitNewState extends State<VideoWidgetMediaKitNew>}player.open(Media(url), play: _isAppInFG);});- int duration = controller!.player.state.duration.inSeconds;- if (duration == 0) {- duration = 10;- }- widget.onFinalFileLoad?.call(- memoryDuration: duration,- );}}}