speakerOn()
Enable audio playback through the device speaker and disable modem communications.
This feature only applies to Lightning-based iPads when connected to a kiosk over the audio jack.
Since the Aila SDK communicates over the audio jack, this function enables audio output to be played through the Apple device's built-in speaker. Communication between Aila Hardware and the SDK will not function as long as the speaker is enabled. This will cause the kiosk illumination to stop after 10 seconds. This function may block for up to 1 second, depending on hardware and iOS version.
AilaCordovaPlugin.speakerOn()
Returns
Promise that resolves when speaker mode is enabled.
Example
AilaCordovaPlugin.speakerOn()
.then(() => {
playAudioFile();
});
The System Sound Services API (AudioServicesCreateSystemSoundID, AudioServicesPlaySystemSound, etc) does not respect audio route overrides. Sound played using System Sound Services will not play over the speaker.
APIs that do respect audio route overrides (e.g. AVAudioPlayer) should be used instead.