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