Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Version bump

  • Loading branch information...
commit 59cdccdc3a466b77b123a3ff584ec479a4b9b1f3 1 parent d2c5d3f
@petebrowne petebrowne authored
View
17 app/assets/javascripts/mediaelement_rails/mediaelementplayer.js
@@ -32,6 +32,17 @@ if (typeof jQuery != 'undefined') {
defaultAudioWidth: 400,
// default if the user doesn't specify
defaultAudioHeight: 30,
+
+ // default amount to move back when back key is pressed
+ defaultSeekBackwardInterval: function(media) {
+ return (media.duration * 0.05);
+ },
+
+ // default amount to move forward when forward key is pressed
+ defaultSeekForwardInterval: function(media) {
+ return (media.duration * 0.05);
+ },
+
// width of audio player
audioWidth: -1,
// height of audio player
@@ -113,7 +124,7 @@ if (typeof jQuery != 'undefined') {
}
// 5%
- var newTime = Math.max(media.currentTime - (media.duration * 0.05), 0);
+ var newTime = Math.max(media.currentTime - player.options.defaultSeekBackwardInterval(media), 0);
media.setCurrentTime(newTime);
}
}
@@ -131,7 +142,7 @@ if (typeof jQuery != 'undefined') {
}
// 5%
- var newTime = Math.min(media.currentTime + (media.duration * 0.05), media.duration);
+ var newTime = Math.min(media.currentTime + player.options.defaultSeekForwardInterval(media), media.duration);
media.setCurrentTime(newTime);
}
}
@@ -967,7 +978,7 @@ if (typeof jQuery != 'undefined') {
for (var j=0, jl=keyAction.keys.length; j<jl; j++) {
if (e.keyCode == keyAction.keys[j]) {
e.preventDefault();
- keyAction.action(player, media);
+ keyAction.action(player, media, e.keyCode);
return false;
}
}
View
2  lib/mediaelement_rails/version.rb
@@ -1,3 +1,3 @@
module MediaelementRails
- VERSION = "0.3.2"
+ VERSION = '0.4.0'
end
Please sign in to comment.
Something went wrong with that request. Please try again.