Sending headphone events back to javascript #781
-
Hello, I'm trying to access the javascript in the main webview to call a method when a headphone is plugged in or pulled out. There is a webview method called "evaluateJavaScript", so something like: self.webView!.evaluateJavaScript("someMethod()") My ultimate goal is to get a message to the cordova webview from PluginRTCAudioController's audioRouteChangeListener method. Any advice appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, |
Beta Was this translation helpful? Give feedback.
Hi,
You can definitely use cordova-plugin-headsetdetection for that purpose, but I have experienced some difficulties with AirPods: their disconnection isn't always being recognized.