A video editor kit
- Adjust speed rate
- Crop using presets
- Trim begining and end
let asset = Bundle.main.url(forResource: "HongKong", withExtension: "mp4")
.map(AVAsset.init)!
let outputUrl = ...
let controller = VideoEditorViewController(asset: asset, outputUrl: outputUrl)
let navigationController = UINavigationController(rootViewController: controller)
navigationController.modalPresentationStyle = .fullScreen
navigationController.navigationBar.barTintColor = .white
navigationController.navigationBar.shadowImage = UIImage()
present(navigationController, animated: true)
controller.onEditCompleted
.sink { [weak self] _ in
let item = AVPlayerItem(url: outputUrl)
self?.editedVideoPlayer.player?.replaceCurrentItem(with: item)
}
| Preset | Width / Height | | vertical| 3/4| | standard | 4/3 | | portrait | 9/16 | | square | 1/1 | | landscape | 16/9 | | instagram | 4/5 |
- Add Audio (mute) video control
- Seek when trimming
- Prevent trimming handler from going passed each other
- Trim: Prevent trimming handle from going passed each other
- Make dismiss button in Video Control bigger and higher
- Dark Theme