Edit online

Audio File Player Form Control

The oxy_audio built-in form control is used for providing a mechanism to play audio clips.

The oxy_audio form control supports the following properties:

  • href - The absolute or relative location of a resource. This property is mandatory. Relative values are resolved relative to the CSS. If you have media resources relative to the XML document, you can specify their paths like this:
    oxy_audio(href, oxy_url(oxy_base-uri(), 'ex.mp3')), width, 400px)
  • width - Specifies the width of the content area using relative (em, ex), absolute (in, cm, mm, pt, pc, px), and percentage (followed by the % character) length units.
Example: oxy_audio Form Control
object {
    content:
        oxy_audio(
            href, 'resources/audio.mp3',
            width, 200px),
}
Tip: To insert a sample of the oxy_audio form control in a CSS file (or LESS file), invoke the Content Completion Assistant by pressing Ctrl + Space and select the oxy_audio code template.

To see more detailed examples and more information about how form controls work in Oxygen XML Editor, see the sample files in the following directory: [OXYGEN_INSTALL_DIR]/samples/form-controls.

Resources

For more information about form controls, watch our video demonstration: