fix(tts-advanced): use promise-based API (#5131)

Co-authored-by: Daniel Kleebinder <daniel.kleebinder@gmail.com>
This commit is contained in:
Thomas Kemmer
2026-03-23 13:15:42 -07:00
committed by GitHub
co-authored by Daniel Kleebinder
parent 91743e7e03
commit fc67fb8174
@@ -62,8 +62,7 @@ export class TextToSpeechAdvanced extends AwesomeCordovaNativePlugin {
* @returns {Promise<any>} Returns a promise that resolves when the speaking finishes
*/
@Cordova({
successIndex: 1,
errorIndex: 2,
otherPromise: true
})
speak(textOrOptions: string | TTSOptions): Promise<any> {
return;
@@ -74,7 +73,9 @@ export class TextToSpeechAdvanced extends AwesomeCordovaNativePlugin {
*
* @returns {Promise<any>}
*/
@Cordova()
@Cordova({
otherPromise: true
})
stop(): Promise<any> {
return;
}
@@ -84,7 +85,9 @@ export class TextToSpeechAdvanced extends AwesomeCordovaNativePlugin {
*
* @returns {Promise<TTSVoice[]>}
*/
@Cordova()
@Cordova({
otherPromise: true
})
getVoices(): Promise<TTSVoice[]> {
return;
}