Webview APIs
When a webpage is opened within our mobile apps, it has access to some functionality that can be used if you know how to use JavaScript.
Please note, this won't work if you select the "open in web browser" option - links with that enabled will open in an isolated browser environment which our app can't manipulate. All links to third party websites should use that option, but they can't use our APIs.
All of the APIs are available in the "Aiir" namespace.
So for example, to stop the audio you would call this in your code:
Aiir.stopAudio();
There may be other APIs available which are undocumented. You use these at your own risk. They could change or be removed at any time.
Function name | Parameters | Returns |
---|---|---|
playAudio | None | Nothing |
pauseAudio | None | Nothing |
stopAudio | None | Nothing |
getAudioState | None | String, one of: stopped paused playing buffering |
isPlaying | None | Boolean, true if audio is playing |
share | body - string url - string |
Nothing |
playOnDemandAudio | Object, with these properties: audioUrl - string title - string description - string (optional) imageUrl - string (optional) |
Nothing |