Anywhere Mobility Studio Documentation

Control sub type LiteralHTML example

Play audio

To play audio on a page, set up the HTML5 audio tag via the LiteralHTML control. For the available options for this element, see w3schools Html5_Audio.

The audio files used in this example are part of the standard Portal.

Example

Audio Example

Setup

Audio Setup

The first LiteralHTML control uses the following expression:

"<audio controls='controls'><source src='Files/Media/sirene.wav' type='audio/mpeg' />Your browser does not support the audio element.</audio>"

The second LiteralHTML control with autoplay uses the following expression. This control is not visible in the user interface.

"<audio autoplay='autoplay'><source src='Files/Media/scanned.wav' type='audio/mpeg' />Your browser does not support the audio element.</audio>"