From 19f98d13b6a9454373a7d1af57e83f49fa823174 Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Fri, 7 Jun 2024 16:48:14 +0200 Subject: [PATCH] fix(ios): add missing listeningState stopped cases (#95) --- ios/Plugin/Plugin.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ios/Plugin/Plugin.swift b/ios/Plugin/Plugin.swift index 99c9075..7e398e3 100644 --- a/ios/Plugin/Plugin.swift +++ b/ios/Plugin/Plugin.swift @@ -101,6 +101,7 @@ public class SpeechRecognition: CAPPlugin { if result!.isFinal { self.audioEngine!.stop() self.audioEngine?.inputNode.removeTap(onBus: 0) + self.notifyListeners("listeningState", data: ["status": "stopped"]) self.recognitionTask = nil self.recognitionRequest = nil } @@ -111,7 +112,7 @@ public class SpeechRecognition: CAPPlugin { self.audioEngine?.inputNode.removeTap(onBus: 0) self.recognitionRequest = nil self.recognitionTask = nil - + self.notifyListeners("listeningState", data: ["status": "stopped"]) call.reject(error!.localizedDescription) } })