Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] Spaces in filepath #108

Merged
merged 2 commits into from
Oct 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>9.0</string>
<string>11.0</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
end
2 changes: 2 additions & 0 deletions example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
Expand Down
7 changes: 5 additions & 2 deletions lib/domain/bloc/controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ class VideoEditorController extends ChangeNotifier {
TrimSliderStyle? trimStyle,
CoverSelectionStyle? coverStyle,
CropGridStyle? cropStyle,
}) : _video = VideoPlayerController.file(file),
}) : _video = VideoPlayerController.file(File(
/// https://github.com/flutter/flutter/issues/40429#issuecomment-549746165
Platform.isIOS ? Uri.encodeFull(file.path) : file.path,
)),
_maxDuration = maxDuration ?? Duration.zero,
cropStyle = cropStyle ?? CropGridStyle(),
coverStyle = coverStyle ?? CoverSelectionStyle(),
Expand Down Expand Up @@ -481,7 +484,7 @@ class VideoEditorController extends ChangeNotifier {
: "";
final String execute =
// ignore: unnecessary_string_escapes
" -i \'$videoPath\' ${customInstruction ?? ""} $filter ${_getPreset(preset)} $trim -y $outputPath";
" -i \'$videoPath\' ${customInstruction ?? ""} $filter ${_getPreset(preset)} $trim -y \"$outputPath\"";

// PROGRESS CALLBACKS
await FFmpegKit.executeAsync(
Expand Down