fix bug
This commit is contained in:
parent
4d14f1a80c
commit
647c9bb250
|
@ -441,9 +441,9 @@
|
|||
var keyBindings = function(event) {
|
||||
var f = $.jPlayer.focus,
|
||||
ignoreKey;
|
||||
|
||||
key_pressing[event.key] = true;
|
||||
// A jPlayer instance must be in focus. ie., keyEnabled and the last one played.
|
||||
if(f) {
|
||||
if(f && Object.keys(key_pressing).length==1) {
|
||||
// What generated the key press?
|
||||
$.each( $.jPlayer.keyIgnoreElementNames.split(/\s+/g), function(i, name) {
|
||||
// The strings should already be uppercase.
|
||||
|
@ -469,13 +469,13 @@
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
var key_pressing = {};
|
||||
$.jPlayer.keys = function(en) {
|
||||
var event = "keydown.jPlayer";
|
||||
// Remove any binding, just in case enabled more than once.
|
||||
$(document.documentElement).unbind(event);
|
||||
if(en) {
|
||||
$(document.documentElement).bind(event, keyBindings);
|
||||
$(document.documentElement).bind(event, keyBindings).bind("keyup.jPlayer", function(e){delete key_pressing[e.key]});
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -142,8 +142,8 @@ class AdBannersController < ApplicationController
|
|||
extra_before_html = ""
|
||||
extra_after_html = ""
|
||||
if has_jplayer
|
||||
extra_before_html = "<link href=\"/assets/ad_banner/jplayer.blue.monday.min.css\" rel=\"stylesheet\">"
|
||||
extra_after_html = "<script src=\"/assets/ad_banner/jquery.jplayer.min.js\"></script>"
|
||||
extra_before_html = ActionController::Base.helpers.stylesheet_link_tag("ad_banner/jplayer.blue.monday.min")
|
||||
extra_after_html = ActionController::Base.helpers.javascript_include_tag("ad_banner/jquery.jplayer")
|
||||
end
|
||||
{
|
||||
"extras" => {
|
||||
|
|
Loading…
Reference in New Issue