Skip to content

A handy playlist widget based on Yandex Audio, displaying tracks as a list

License

Notifications You must be signed in to change notification settings

Nomta/audio-player

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Audio Player

A handy playlist widget based on YandexAudio, displaying tracks as a list.
Удобный плей-лист виджет, основанный на YandexAudio, с отображением треков в виде списка.

Dependencies: YandexAudio.

Usage

  <script src="YandexAudio/index.min.js"></script>
  <script src="audio-player/index.min.js"></script>
  <script>
    var ap = new AudioPlayer({
      tracks: [
	      "one", 
	      "two", 
	      "three"
      ],
      pathName: 'audio/'
    });
  </script>

Options

Option Type Description
tracks Array An array of track names. Default: []
pathName String Path to files, must be ended with a slash. Default: ''
ext String File extension, default: '.mp3'
container Node Parent element for play list. Default: document.body
className String CSS class name for every track element and prefix for its children.
Default: ''
buttonText Array Text for playback control button, that must have two states.
Default: ['Play', 'Pause']

Global variables

Global variables are used:

  • ya is from YandexAudio: an audio player object that you can use to fine tune the player
  • currentTrack - link to the current playing track, an audio-track element

Browser Support

Firefox 15+ Chrome 18+ Safari 8+ Opera 18+ IE 10+

License

This project is available under the MIT license.

About

A handy playlist widget based on Yandex Audio, displaying tracks as a list

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published