mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
fix(media-plugin): MediaPlugin.create promise never fires (#1220)
This commit is contained in:
parent
0c9eb8e1dd
commit
82d2ae8c4d
@ -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));
|
||||
});
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user