Permalink
Browse files

Added some real MP3s and updated plugins

  • Loading branch information...
1 parent 3422e35 commit 47b330223ba07667975872928d578e805a8a25aa @bensmithett committed Mar 22, 2012
View
@@ -31,13 +31,13 @@
<ul>
<li>
- <a href="sound1.mp3" class="sound" data-playin="player1">Play</a>
+ <a href="http://2.s3.envato.com/files/22104282/preview.mp3" class="sound" data-playin="player1">Play</a>
</li>
<li>
- <a href="sound2.mp3" class="sound" data-playin="player1">Play</a>
+ <a href="http://3.s3.envato.com/files/22101687/preview.mp3" class="sound" data-playin="player1">Play</a>
</li>
<li>
- <a href="sound3.mp3" class="sound" data-playin="player1">Play</a>
+ <a href="http://2.s3.envato.com/files/21705540/preview.mp3" class="sound" data-playin="player1">Play</a>
</li>
</ul>
@@ -51,24 +51,25 @@
<ul>
<li>
- <a href="sound4.mp3" class="sound" data-playin="player2">Play</a>
+ <a href="http://0.s3.envato.com/files/22098921/preview.mp3" class="sound" data-playin="player2">Play</a>
</li>
<li>
- <a href="sound5.mp3" class="sound" data-playin="player2">Play</a>
+ <a href="http://0.s3.envato.com/files/22095689/preview.mp3" class="sound" data-playin="player2">Play</a>
</li>
<li>
- <a href="sound6.mp3" class="sound" data-playin="player2">Play</a>
+ <a href="http://3.s3.envato.com/files/21752821/preview.mp3" class="sound" data-playin="player2">Play</a>
</li>
</ul>
</div>
</div>
- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
- <script>window.jQuery || document.write('<script src="/lib/jquery-1.7.0.min.js"><\/script>')</script>
- <script src="/lib/mediaelement.min.js"></script>
- <script src="/mediaelement_playlist.js"></script>
+ <script src="//code.jquery.com/jquery-1.7.2.min.js"></script>
+ <script>window.jQuery || document.write('<script src="/lib/jquery-1.7.2.min.js"><\/script>')</script>
+ <!--<script src="/lib/mediaelement.min.js"></script>-->
+ <script src="/mediaelement_playlist_2.js"></script>
+ <!--
<script>
mediaElementPlaylist({
soundSelector: ".sound",
@@ -77,6 +78,7 @@
playerButtonSelector: ".audio-player a"
});
</script>
+-->
</body>
</html>
Oops, something went wrong.
Oops, something went wrong.
View
52 lib/mediaelement.min.js 100755 → 100644
Oops, something went wrong.
@@ -30,7 +30,7 @@ var mediaElementPlaylist;
mediaElement = new MediaElement(settings.audioElemID, {
enablePluginDebug: true,
- pluginPath: "/swf/mediaelement/",
+ pluginPath: "/plugins/",
success: function (mediaElement, audioElem) {
handleClicks(mediaElement, settings);
@@ -0,0 +1,55 @@
+/*global $: false, jQuery: false, document: false, window: false, MediaElement: false*/
+
+/*
+ var myPlaylist = new AudioPlaylist(settings);
+
+ settings = {
+ "sounds": ".sound",
+ "player": "#player"
+ }
+
+*/
+
+(function () {
+ var AudioPlaylist,
+ createAudioElement,
+ handleControlClick;
+
+ AudioPlaylist = function (settings) {
+ var $sounds = $(settings.sounds),
+ audioElement = createAudioElement();
+
+ $sounds.on("click.audioAction", { audioElement: audioElement }, handleClick);
+ };
+
+ createAudioElement = function () {
+ return document.body.appendChild(document.createElement("audio"));
+ };
+
+ handleClick = function (e) {
+ var audioElement = e.data.audioElement;
+
+ e.preventDefault();
+
+ console.log(audioElement.constructor);
+ };
+
+ // Add global
+ window.AudioPlaylist = AudioPlaylist;
+}());
+
+
+
+
+
+
+
+
+
+
+
+
+// Call on page:
+var myPlaylist = new AudioPlaylist({
+ "sounds": ".sound"
+});
Binary file not shown.
Binary file not shown.

0 comments on commit 47b3302

Please sign in to comment.