fix(media-plugin): MediaPlugin.create promise never fires (#1220)

This commit is contained in:
Vasilis Koutsopoulos 2017-03-23 00:53:55 +02:00 committed by Ibby Hadeed
parent 0c9eb8e1dd
commit 82d2ae8c4d

View File

@ -14,7 +14,7 @@ export class MediaObject {
* @param src {string} A URI containing the audio content.
* @param onStatusUpdate {Function} A callback function to be invoked when the status of the file changes
*/
constructor(private _objectInstnace: any) {}
constructor(private _objectInstance: any) {}
/**
* Get the current amplitude of the current recording.
@ -256,7 +256,8 @@ export class MediaPlugin {
// Creates a new media object
// Resolves with the media object
// or rejects with the error
const instance = new Media(src, () => resolve(new Media(instance)), reject, onStatusUpdate);
const instance = new Media(src, resolve, reject, onStatusUpdate);
return resolve(new MediaObject(instance));
});
}