Documentation

Audio Playlist

Description

The Audio Playlist module allows users to create a list of sounds and to play them.

Note: It is recommended to use files with 64 kb/s bitrate or higher. Files with lower quality could have difficulties with reproduction.

Properties

The list starts with the common properties. Learn more about them by visiting the Modules description section. The other available properties are described below.

Property name Description
Items This property stores audio items.
Property name Description
Name Name of the audio track that is displayed in the list.
Mp3 This property serves for uploading an audio file in the MP3 format into the module.
Ogg This property serves for uploading an audio file in the OGG format into the module.
Stop playing This property stops the audio.
Enable audio speed controller This property activates the option to change the speed of the playing audio.
Lang attribute This property allows defining the language for this module (different than the language of the lesson).
Speech texts Sets the values of speech texts - predefined phrases providing additional context while using the module in the Text To Speech mode. Speech texts are always read using the content's default language.

Supported commands

Command name Params Description
play --- Plays the sound if it is not playing already.
stop --- Stops the sound.
pause --- Pauses the sound.
hide --- Hides the module if it is visible.
show --- Shows the module if it is hidden.
jumpTo index (type int)
startPlaying (type boolean)
Moves to the indicated audio track.
previous --- Changes selected audio to the previous one, if available.
next --- Changes the audio track to the next one, if available.
setPlaybackRate value (type string) Sets the playback rate to the given value.

Events

The Audio Playlist module sends the ValueChanged type of events to the Event Bus.

When the user changes the audio.

Field name Description
Value next
Item Index of current audio item.
Source Module's ID.
Score N/A

When the playback time changes.

Field name Description
Value Current time (in the MM.SS format).
Item Index of the current audio item.
Source Module's ID.
Score N/A

When the audio playback is finished.

Field name Description
Value end
Item Index of the current audio item.
Source Module's ID.
Score N/A

When the audio playback is playing.

Field name Description
Value playing
Item Index of the current audio item.
Source Module's ID.
Score N/A

When the audio playback is paused.

Field name Description
Value pause
Item Index of the current audio item.
Source Module's ID.
Score N/A

CSS Classes

Class name Description
wrapper-addon-audio-playlist Styles for the container that keeps all the elements.
addon-audio-playlist-controls Styles for the wrapper that keeps the audio control buttons.
audio-playlist-prev-btn Styles for the button that switches to the previous audio.
audio-playlist-next-btn Styles for the button that switches to the next audio.
audio-playlist-play-pause-btn Common styles for buttons that allow for playing/pausing the audio.
audio-playlist-play-btn Styles for the button that allows playing the audio.
audio-playlist-pause-btn Styles for the button that allows stopping the audio.
audio-playlist-timer Styles the layer that includes the information about the audio's time.
audio-playlist-bar Styles for the element showing the progress of the playback.
audio-playlist-bar--fill Styles for the layer that visualizes the progress of the playback.
audio-playlist-bar--ball Styles for the indicator that visualizes the progress of the playback.
audio-playlist-max-time Styles for the text showing the duration of the playback.
audio-playlist-volume-btn Styles for the button that enables the volume control.
addon-audio-playlist-items Styles for the container that keeps the audio items.
addon-audio-playlist-item Style for the audio item.
addon-audio-playlist-item--name Styles for the audio item's title.
addon-audio-playlist-item--selected Styles for the audio that is marked.
addon-audio-playlist-item--button Styles for the audio item's control buttons.
addon-audio-playlist-item--button-playing Styles for the button that shows the playing audio.
addon-audio-playlist-volume-wrapper Styles for the container that stores the volume control button.
addon-audio-playlist-volume-wrapper--expanded Styles for the opened volume container.
addon-audio-playlist-volume-bar Styles for the element showing the volume level.
addon-audio-playlist-volume-bar--hidden Styles for the hidden layer which visualizes the volume level.
addon-audio-playlist-volume-bar--fill Styles for the layer which visualizes the volume level.
audio-speed-controller Styles for the element that changes the audio playback rate.