GitXplorerGitXplorer
d

dar-audio

public
1 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
25b04d1d0fa41e2b15b0ae9dee9e9c46a6637aa4

Update README.md

committed 10 years ago
Unverified
0b1dde851281623eac208024e75aec5f1015ccaf

gruntfile formatting

ddarrenmce committed 11 years ago
Unverified
ab3bf3da56c80eeda7c29c76dbbe03a7aa2d6021

updates for new version of templatizr

ddarrenmce committed 11 years ago
Unverified
64ee321fda13a263da22e15df82236831e62df8a

updated read me

ddarrenmce committed 11 years ago
Unverified
5db6b569377b9274bcb8ec770877dd086cf6e901

remove "window"

ddarrenmce committed 11 years ago
Unverified
7c3396ee2bb91c1ba8e3874634176db1f38ff1da

recompiled with correct version # (0.2.0)

ddarrenmce committed 11 years ago

README

The README file for this repository.

DarAudio

jQuery plugin for an HTML5 audio player with playlists.

Getting Started

Download the production version or the development version.

In your web page:

<script src="jquery.js"></script>
<script src="dist/daraudio.min.js"></script>
<script>
jQuery(function($) {
    $('#yourDiv').daraudio({
        defaultVolume: 0.5
        , playlistDef : [
            {
                name: "playlist1"
                , folder: "path\to\audio\root"
                , playList: "playlists\playlist1.json"
            }
            ,
            {
                name: "playlist2"
                , folder: "path\to\audio\root"
                , playList: [
                    {
                        Title: "Artist One - Song One"
                        , url: "song1.mp3"
                        , type: "audio/mpeg"
                    }
                    ,
                    {
                        Title: "Artist One - Song Two"
                        , url: "song2.mp3"
                        , type: "audio/mpeg"
                    }
                ]
            }
        ]
    });
</script>

Documentation

###Playlists:

option: playlistDef

  • name: The name of the playlist to be displayed in the dropdown.

  • folder: The audio root folder, this will be the context for the relative paths in the playlist.

  • playList: Either a string with the location of the .json file containing the playList data, or the actual array. ex. playList: "playlists\playlist1.json" OR playList: [{...}, {...}, ...]

    option: playList (array format)

    each playlist object(song) should have the following 3 key/values:

    • Title: The name of the track to be displayed.
    • url: The relative path for the audio file (based on the folder defined above)
    • type: The file type of the audio file. ("audio/mpeg", "audio/wav", "audio/oggl; codecs="vorbis""..)

Release History

0.1.0 - Initial release

0.2.0 - Added HTML templating (Jade)