Documentation

Audio Playlist

Description

The Audio Playlist addon allows users to create a list of sounds and play them. This addon works on all common browsers.

Note: It's recommended to use files with bitrate 64 kb/s 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 serves for storing audio items.
Property name Description
Name Audio name displays in the list.
Mp3 This property serves for uploading an audio file in MP3 format into the module.
Ogg This property serves for uploading an audio file in OGG format into the module. It's needed for all common browsers.
Note: It's important to put 2 different format files if you want your audio to work on all common browsers. If you don't have a file in OGG format, you can use this MP3 to OGG converter. In Safari browser, the file size is limited ( ~4mb ).
Stop playing This property disables auto-playing.
Enable audio speed controller This property activates the option to change the speed of playing audio.
Lang attribute This property allows defining the language for this addon (different than the language of the lesson).
Speech texts This text will be read by the Text To Speech addon after a user performs an action. List of speech texts: Play, Pause, Previous audio, Next audio, Audio speed controller, Volume level, Timer, Audio item.

Supported commands

Command name Params Description
play --- Plays the sound if not playing already.
stop --- Stops the sound.
pause --- Pauses the sound.
show --- Shows the module.
hide --- Hides the module and stops the sound.
jumpTo index (type int)
startPlaying (type boolean)
Sets selected audio correct with the index.
previous --- Changes selected audio to the previous one.
next --- Changes selected audio to the next one.
setPlaybackRate value (type string) Sets the playback rate correctly with the value.

Events

The Audio Playlist addon sends the ValueChanged type of events to the Event Bus.
When a user changes the audio.

Field name Description
Value next
Item Index of current audio item
Source Addon ID
Score N/A

When a playback time changes.

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

When audio playback is finished.

Field name Description
Value end
Item Index of current audio item
Source Addon ID
Score N/A

When audio playback is playing.

Field name Description
Value playing
Item Index of current audio item
Source Addon ID
Score N/A

When audio playback is paused.

Field name Description
Value pause
Item Index of current audio item
Source Addon ID
Score N/A

CSS Classes

Class name Description
wrapper-addon-audio-playlist Styles for a container keep all elements.
addon-audio-playlist-controls Styles for a wrapper that keeps audio control buttons.
audio-playlist-prev-btn Styles for a button that supports picking previous audio.
audio-playlist-next-btn Styles for a button that supports picking the next audio.
audio-playlist-play-pause-btn Common styles for buttons that handle play or pause audio.
audio-playlist-play-btn Styles for a button that supports starting to play audio
audio-playlist-pause-btn Styles for a button that supports stopping audio
audio-playlist-timer Styles A layer that includes information about audio time.
audio-playlist-bar Styles for an element show the progress of the playback.
audio-playlist-bar--fill Styles for a layer that visualizes the progress of the playback.
audio-playlist-bar--ball Styles for a point that visualizes the progress of the playback.
audio-playlist-max-time Styles for a text showing the duration of the playback.
audio-playlist-volume-btn Styles for a button that allows volume control.
addon-audio-playlist-items Styles for a container that keeps audio items.
addon-audio-playlist-item Style for an audio item.
addon-audio-playlist-item--name Styles for an audio item title.
addon-audio-playlist-item--selected Styles for an audio which is marked.
addon-audio-playlist-item--button Styles for an audio item control buttons.
addon-audio-playlist-item--button-playing Styles for a button that shows playing audio.
addon-audio-playlist-volume-wrapper Styles for a container that keeps the volume control button.
addon-audio-playlist-volume-wrapper--expanded Styles for an opened volume container.
addon-audio-playlist-volume-bar Styles for an element show the volume level.
addon-audio-playlist-volume-bar--hidden Styles for a hidden layer which visualizes the volume level
addon-audio-playlist-volume-bar--fill Styles for a layer which visualizes the volume level.
audio-speed-controller Styles for an element that changes audio playback rate.