diff --git a/mobile/lib/ui/tools/editor/video_editor_page.dart b/mobile/lib/ui/tools/editor/video_editor_page.dart index 5370b501e..c84dfec09 100644 --- a/mobile/lib/ui/tools/editor/video_editor_page.dart +++ b/mobile/lib/ui/tools/editor/video_editor_page.dart @@ -29,19 +29,16 @@ class _VideoEditorPageState extends State { final _isExporting = ValueNotifier(false); final double height = 60; - late final VideoEditorController _controller = VideoEditorController.file( - widget.ioFile, - minDuration: const Duration(seconds: 1), - maxDuration: const Duration(seconds: 10), - ); + late final VideoEditorController _controller; @override void initState() { super.initState(); - _controller - .initialize(aspectRatio: 9 / 16) - .then((_) => setState(() {})) - .catchError( + _controller = VideoEditorController.file( + widget.ioFile, + minDuration: const Duration(seconds: 1), + ); + _controller.initialize().then((_) => setState(() {})).catchError( (error) { // handle minumum duration bigger than video duration error Navigator.pop(context); @@ -186,50 +183,8 @@ class _VideoEditorPageState extends State { height: 200, margin: const EdgeInsets.only(top: 10), child: Column( - children: [ - const TabBar( - tabs: [ - Row( - mainAxisAlignment: - MainAxisAlignment.center, - children: [ - Padding( - padding: EdgeInsets.all(5), - child: Icon( - Icons.content_cut, - ), - ), - Text('Trim'), - ], - ), - Row( - mainAxisAlignment: - MainAxisAlignment.center, - children: [ - Padding( - padding: EdgeInsets.all(5), - child: Icon(Icons.video_label), - ), - Text('Cover'), - ], - ), - ], - ), - Expanded( - child: TabBarView( - physics: - const NeverScrollableScrollPhysics(), - children: [ - Column( - mainAxisAlignment: - MainAxisAlignment.center, - children: _trimSlider(), - ), - _coverSelection(), - ], - ), - ), - ], + mainAxisAlignment: MainAxisAlignment.center, + children: _trimSlider(), ), ), ValueListenableBuilder( diff --git a/mobile/pubspec.lock b/mobile/pubspec.lock index c0bc4947e..5057efbce 100644 --- a/mobile/pubspec.lock +++ b/mobile/pubspec.lock @@ -2487,10 +2487,11 @@ packages: video_editor: dependency: "direct main" description: - name: video_editor - sha256: "263be52e052118389f372f055f59c2fda5c7beecfdb706b899d2e05be8740c22" - url: "https://pub.dev" - source: hosted + path: "." + ref: HEAD + resolved-ref: "1eeb18e2b1ce36bd8ca70178c0d4b485e9982257" + url: "https://github.com/prateekmedia/video_editor.git" + source: git version: "3.0.0" video_player: dependency: "direct main" diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yaml index 1debd48c7..6e498d5b6 100644 --- a/mobile/pubspec.yaml +++ b/mobile/pubspec.yaml @@ -162,7 +162,9 @@ dependencies: uni_links: ^0.5.1 url_launcher: ^6.0.3 uuid: ^3.0.7 - video_editor: ^3.0.0 + video_editor: + git: + url: https://github.com/prateekmedia/video_editor.git video_player: git: url: https://github.com/ente-io/packages.git