diff --git a/src/ios/RemoteControls.m b/src/ios/RemoteControls.m index 2914bfa..ff41484 100644 --- a/src/ios/RemoteControls.m +++ b/src/ios/RemoteControls.m @@ -36,7 +36,7 @@ - (void)updateMetas:(CDVInvokedUrlCommand*)command // check whether cover path is present if (![cover isEqual: @""]) { // cover is remote file - if ([cover hasPrefix: @"http://"] || [cover hasPrefix: @"https://"]) { + if ([cover hasPrefix: @"http://"] || [cover hasPrefix: @"https://"] || [cover hasPrefix: @"data:"]) { NSURL *imageURL = [NSURL URLWithString:cover]; NSData *imageData = [NSData dataWithContentsOfURL:imageURL]; image = [UIImage imageWithData:imageData]; diff --git a/www/RemoteControls.js b/www/RemoteControls.js index 0ed7ba0..9cb0687 100644 --- a/www/RemoteControls.js +++ b/www/RemoteControls.js @@ -21,9 +21,13 @@ remoteControls.updateMetas = function(success, fail, params) { cordova.exec(success, fail, 'RemoteControls', 'updateMetas', params); }; +remoteControls.bindAction = function (callbackId) { + cordova.exec(callbackId, callbackId, 'RemoteControls', 'bindAction', []); +}; + remoteControls.receiveRemoteEvent = function(event) { var ev = document.createEvent('HTMLEvents'); ev.remoteEvent = event; ev.initEvent('remote-event', true, true, arguments); document.dispatchEvent(ev); -} \ No newline at end of file +}