# Audio (H5P.Audio)

An audio player. On its own it suits a listening task beside other content; in a page, a book or on a card it is a part.

- `files` is the recording: a file beside the source (`.mp3`, `.m4a`, `.wav`, `.ogg`) or a web address of one.
- `playerMode` `"full"` shows the full controls, `"minimalistic"` a play button.

## Example

```json
{
  "type": "H5P.Audio",
  "params": { "files": [{ "path": "river.mp3" }], "playerMode": "full" }
}
```

<!-- Generated by `h5p-author schema --markdown` from the pinned pack. Do not edit by hand. -->

## Fields of H5P.Audio 1.5

The example is `type` and `params` alone, and `params` holds the fields below. A source also names its own `title`, `language`, `license` and `authors`, all four required: the build refuses a source that leaves out any of them. The author's name and the licence are the user's: ask for what they have not given. For a name they skip, write the one you know them by, or "Unknown"; for a licence they skip, `U`.

- `files` audio files, required — Source files
- `playerMode` one of "minimalistic" | "full" | "transparent" = "minimalistic" — Player mode: Select the layout of the player.
- `fitToWrapper` boolean = false; only when playerMode is "minimalistic" or playerMode is "full" — Fit to wrapper
- `controls` boolean = true; only when playerMode is "full" — Enable controls
- `autoplay` boolean — Enable autoplay

4 interface texts are left out: they come from the libraries' translations. `h5p-author schema H5P.Audio --all` lists them, for a source to set one.

<!-- End of the generated section. -->
