-
Notifications
You must be signed in to change notification settings - Fork 38
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
Success and Error Callbacks swapped on iOS #1
Comments
I seem to be having a issue getting the callback from IOS. I will be testing this tonight. how did you get around this issue? |
@colonna-mike I haven't used this in a while. We were last using this plugin on iOS 8 on a Cordova/AngularJS project that never got released. However here is the function we had for creating thumbnails. It appears my original comment was incorrect as well. Sorry it's been a while, but I do remember having some issues with the callbacks, I just don't remember how we resolved it. The plugin did work well however. function _generateVideoThumbnail(videoPath, thumbnailPath) {
var deferred = $q.defer();
window.PKVideoThumbnail.createThumbnail(videoPath, thumbnailPath,
function(targetThumbnailPath) {
deferred.resolve(targetThumbnailPath);
},
function(error) {
deferred.resolve("");
});
return deferred.promise;
} |
Thanks Tim, The plugin is working on android but not on my iPad i trace it back to the
|
Figure it out, it's not the plugin its the way IOS is sending back the file path, once I adjusted for that that plugin works great... |
Cool, glad to hear. |
Glad you got it figured out. If you wouldn't mind sharing how you adjusted for the path, that would be great. Perhaps it is something that needs to be integrated into the plugin itself. |
wow I missed this sooo sorry. here's a snippet of my function ( better late than never) hope this helps someone
|
It looks as though the success and error callback function are swapped on iOS.
Your documentation has:
window.PKVideoThumbnail.createThumbnail ( sourceVideoPath, targetThumbnailPath, success, failure );
It seems to actually be this on iOS:
window.PKVideoThumbnail.createThumbnail ( sourceVideoPath, targetThumbnailPath, failure, success );
The text was updated successfully, but these errors were encountered: