Audio



The Audio standard function plays an audio file that is attached to a page, using the browser's built-in player.
The player starts as soon as enough has arrived and can skip to any point without downloading the whole file first. Like images and files, audio is attached to a single page but can be played on any other page.
Supported formats: MP3, M4A/AAC, Ogg, WAV, WebM and FLAC. Other formats are shown as a download link instead of a player.


##Audio (string [name], bool {loop})


  • Name: name [Required]
    • Type: string
    • Description: The name of the attached audio file. To play audio attached to another page, use "Page Name/file name".
  • Name: loop {Optional}
    • Type: bool
    • Description: Whether to start the audio again when it ends.
    • Default: false



Playing audio that is attached to the page:
##Audio(Interview.mp3)

Playing audio over and over:
##Audio(Theme.ogg, true)
##Audio(Theme.ogg, :loop=true)

Playing audio that is attached to another page:
##Audio(Some other Page/Interview.mp3)


Attach the audio file to the page while editing it, the same way as any other file. The "Copy Tag" button in the attachment list copies a ready-made Audio function for the file.


Video
Image
File
Function Calling Convention
Standard Function