Skip to content

Commit

Permalink
fix(media): fix issue with create method
Browse files Browse the repository at this point in the history
closes #1333
  • Loading branch information
ihadeed committed Apr 14, 2017
1 parent d30b534 commit 6bba72d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/@ionic-native/plugins/media/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,7 @@ export class MediaPlugin {
// Creates a new media object
// Resolves with the media object
// or rejects with the error
const instance = new Media(src, resolve, reject, onStatusUpdate);
return resolve(new MediaObject(instance));
const instance = new Media(src, () => resolve(new MediaObject(instance)), reject, onStatusUpdate);
});

}
Expand Down

4 comments on commit 6bba72d

@sertal70
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I'm stuck with this issue in my project.

If I use version 3.5.0 of media plugin, which integrates this fix, my project doesn't work anymore (the Promise in create() is never resolved), if I force my project to use version 3.4.4 of media plugin (which doesn't contain this fix) everything works well.

What's the matter with this fix?

@ihadeed
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sertal70 sorry this fix was supposed to be reverted, please use an older version for now until I publish the next release (soon).

@sertal70
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @ihadeed, actually I already pulled version 3.4.4 in my project to go forward... let me know when it will be definitively fixed.

@ihadeed
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fixed in 3.6.1, but I haven't updated the docs yet.

Please sign in to comment.