Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ios/RemoteControls.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
6 changes: 5 additions & 1 deletion www/RemoteControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}