jonataslaw / jonataslaw/VideoCompress
final thumbnailFile = await VideoCompress.getFileThumbnail(widget.filePath); on iOS, some file can't callback result.
- Dominant language
- Swift
- Stars
- 262
- Forks
- 344
- PR merge metrics
- No merged PRs in 30d
Description
private func getFileThumbnail(_ path: String,_ quality: NSNumber,_ position: NSNumber,_ result: FlutterResult) {
let fileName = Utility.getFileName(path)
let url = Utility.getPathUrl("\(Utility.basePath())/\(fileName).jpg")
Utility.deleteFile(path)
if let bitmap = getBitMap(path,quality,position,result) {
guard (try? bitmap.write(to: url)) != nil else {
return result(FlutterError(code: channelName,message: "getFileThumbnail error",details: "getFileThumbnail error"))
}
result(Utility.excludeFileProtocol(url.absoluteString))
}
// I need to add code to fix it when bitmap is nil:
else{
result(FlutterError(code: channelName,message: "getFileThumbnail error",details: "getFileThumbnail error"))
}
}
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.