A multi-threaded non-blocking iOS 11+ plugin for toggling the device speaker and retrieving the current audio route.
Audio route will be: speaker, receiver or the actual name of the connected device such as "Bill's Airpods Pro".
Speaker.on(callbackHandler, errorHandler)
Speaker.off(callbackHandler, errorHandler)
Speaker.route(function(route) {
console.log(route)
}, function(e) {
console.log(e)
})