Skip to content
Browse files

Added support for audio elements as well as video

  • Loading branch information...
1 parent cf435c5 commit 7c26b2548b39aad6cf19d406eb552e88bf973237 @noahadler committed Nov 30, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 media_timestamp.js
View
4 media_timestamp.js
@@ -10,7 +10,7 @@ jQuery(document).ready(function() {
// use a slight delay to make sure everything else has executed already
setTimeout(function() {
- var player = new MediaElementPlayer(jQuery('video')[0]);
+ var player = new MediaElementPlayer(jQuery('video,audio')[0]);
player.media.play();
@@ -61,7 +61,7 @@ jQuery(document).ready(function() {
'left': (time*parseInt(timerail_width)*1.0/duration)+'px',
'bottom': '-14px'});
- jQuery(this).replaceWith('<a href="#" onclick="jQuery(\'video\')[0].player.setCurrentTime('+time+');return false;" class="timestamp" timestamp="' + time + '">' + index + '</a>');
+ jQuery(this).replaceWith('<a href="#" onclick="jQuery(\'video,audio\')[0].player.setCurrentTime('+time+');return false;" class="timestamp" timestamp="' + time + '">' + index + '</a>');
});
});
}, 500);

0 comments on commit 7c26b25

Please sign in to comment.
Something went wrong with that request. Please try again.