vilicvane / cordova-plugin-tts

Cordova Text-to-Speech Plugin (Maintainer WANTED!)
177 stars 137 forks source link

Start or Stop does not return promises #72

Open manishoswal opened 6 years ago

manishoswal commented 6 years ago

@maolion The new promise implementation does not return promise back to the native call. The console doesn't print in success or failure.

 this.tts.speak('Hello World').then(() => 
  console.log('Success')
).catch((reason: any) => 
console.log(reason)
);
beevelop commented 6 years ago

I can confirm this happening with the currently available npm release. The issue should be solved by: https://github.com/vilic/cordova-plugin-tts/commit/dee3ea9ddb718ba0c428475664dc13f6cdb005eb#diff-84cfeb87388afa9c3deab81a3022fb7b

Unfortunately this change has not yet been release to npm. The maintainers of this plugin need to release the latest changes on npm to restore compatibility with the current Cordova versions.

For now, you should be able to workaround this issue by adding the plugin straight from the repository (instead of npm):

cordova plugin add https://github.com/vilic/cordova-plugin-tts
manishoswal commented 6 years ago

@beevelop - Thanks for the reply but i already tried that. Not sure why is it not returning promise.

claudiozam commented 6 years ago

Hi @maolion / @beevelop I have the same problem.

cordova plugin add https://github.com/vilic/cordova-plugin-tts did not work...

Do you have a solution?

Thanks

beevelop commented 6 years ago

@manishoswal Did you clean your node_modules and plugins folder prior to reinstalling the plugin? Quite often Cordova doesn't pull it because it already exists (with the old version).