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
Property name | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
Items |
This property serves for storing audio items.
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 option to change speed of playing audio. | ||||||||
Lang attribute | This property allows to define the language for this addon (different than the language of the lesson). | ||||||||
Speech texts | This texts will be read by 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 playback rate correct with the value. |
Events
The Audio Playlist addon sends ValueChanged type events to 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 keeps all elemnts. |
addon-audio-playlist-controls | Styles for a wrapper which 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 next audio. |
audio-playlist-play-pause-btn | Common styles for buttons that handling play or pause audio. |
audio-playlist-play-btn | Styles for a button that supports start playing audio |
audio-playlist-pause-btn | Styles for a button that supports stop playing audio |
audio-playlist-timer | Styles A layer which includes information about audio time. |
audio-playlist-bar | Styles for an element shows the progress of the playback. |
audio-playlist-bar--fill | Styles for a layer which visualizes the progress of the playback. |
audio-playlist-bar--ball | Styles for a point which visualizes the progress of the playback. |
audio-playlist-max-time | Styles for a text shows duration of the playback. |
audio-playlist-volume-btn | Styles for a button which allows volume control. |
addon-audio-playlist-items | Styles for a container which 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 which shows playing audio. |
addon-audio-playlist-volume-wrapper | Styles for a container which keeps volume control button. |
addon-audio-playlist-volume-wrapper--expanded | Styles for an opened volume container. |
addon-audio-playlist-volume-bar | Styles for an element shows 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 which changes audio playback rate. |