To integrate InnoVideoConverteriOS into your Xcode project using CocoaPods, specify it in your Podfile
:
source 'https://github.com/mncinnovation/inno-video-converter-ios-podspec.git'
pod 'InnoVideoConverteriOS'
Init the class with configurations for the result video
let converter = InnoVideoConverter(videoSourcePath: "PATH",
videoResultName: "VideoResult")
let converter = InnoVideoConverter(videoSourcePath: "PATH",
videoResultName: "VideoResult",
convertResultVideoScale: CGSize(width: -2, height: 720),
tag: 0,
convertQuality: .medium,
convertResultVideoType: .mpeg4,
convertSpeed: .fast)
You can call convert method after initialization
converter.convert()
You can call cancel method for cancel the process
converter.cancel()
converter.delegate = self
Implement InnoVideoConverterDelegate
func innoVideoConverter(inProgressAtConverter converter: InnoVideoConverter, percentage: Int) {
// Progress while video is being converted
}
func innoVideoConverter(didSuccessAtConverter converter: InnoVideoConverter, videoPath: String) {
// Convert video is successful
}
func innoVideoConverter(beginExecuteAtConverter converter: InnoVideoConverter) {
// Video starts converting
}
func innoVideoConverter(didReceivedLogAtConverter converter: InnoVideoConverter, log: String) {
// Log while video is being converted
}
func innoVideoConverter(didErrorAtConverter converter: InnoVideoConverter, error: String) {
// Convert video failed and return error string
}