[READ ONLY MIRROR] Open Source TikTok alternative built on AT Protocol github.com/sprksocial/client
flutter atproto video dart
10
fork

Configure Feed

Select the types of activity you want to include in your feed.

Revert "fix(editor): don't crash with unsupported video format"

This reverts commit 34020d4eaa159f025e6a0efc48207b9439e7ccc1.

+1 -45
-32
lib/src/core/pro_video_editor/ui/video_editor_grounded_page.dart
··· 194 194 onToggleMute: _onToggleMute, 195 195 onAddSound: _showAudioSelectionBottomSheet, 196 196 onToggleFullscreen: _openFullscreenPreview, 197 - onBeforeExport: _checkCanExport, 198 197 ); 199 198 200 199 // Update clip duration and thumbnails after first frame ··· 472 471 if (selectedTrack != null) { 473 472 setState(() {}); 474 473 } 475 - } 476 - 477 - /// Checks if the video can be exported. 478 - /// Returns true if export is allowed, false otherwise. 479 - Future<bool> _checkCanExport() async { 480 - final videoPath = _video.file?.path; 481 - final isUnsupportedFormat = 482 - videoPath != null && videoPath.toLowerCase().endsWith('.mov') && videoPath.contains('image_picker'); 483 - 484 - if (isUnsupportedFormat) { 485 - if (mounted) { 486 - await showDialog<void>( 487 - context: context, 488 - builder: (context) => AlertDialog( 489 - title: const Text('Export Not Supported'), 490 - content: const Text( 491 - 'This video format cannot be exported due to compatibility issues. ' 492 - 'Please try recording or selecting a different video.', 493 - ), 494 - actions: [ 495 - TextButton( 496 - onPressed: () => Navigator.pop(context), 497 - child: const Text('OK'), 498 - ), 499 - ], 500 - ), 501 - ); 502 - } 503 - return false; 504 - } 505 - return true; 506 474 } 507 475 508 476 /// Generates the final video based on the given [parameters].
+1 -13
lib/src/core/pro_video_editor/ui/widgets/common/video_editor_configs_builder.dart
··· 36 36 required VoidCallback onToggleMute, 37 37 required VoidCallback onAddSound, 38 38 required VoidCallback onToggleFullscreen, 39 - Future<bool> Function()? onBeforeExport, 40 39 List<AudioTrack> audioTracks = const [], 41 40 VideoEditorConfigs videoEditorConfigs = const VideoEditorConfigs( 42 41 initialMuted: true, ··· 112 111 bottom: false, 113 112 child: VideoEditorHeader( 114 113 onBack: editor.closeEditor, 115 - onNext: () { 116 - // Check if export is allowed before proceeding 117 - if (onBeforeExport != null) { 118 - onBeforeExport().then((canExport) { 119 - if (canExport) { 120 - editor.doneEditing(); 121 - } 122 - }); 123 - } else { 124 - editor.doneEditing(); 125 - } 126 - }, 114 + onNext: editor.doneEditing, 127 115 ), 128 116 ), 129 117 ),