Skip to content

Commit 56d9c99

Browse files
committed
Updated versioning to 2.8.2 and build new dist.
1 parent c4b2714 commit 56d9c99

8 files changed

+44
-37
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jPlayer",
3-
"version": "2.8.1",
3+
"version": "2.8.2",
44
"description": "The jQuery HTML5 Audio / Video Library. Allows you to create a media player with a consistent interface and experience across all browsers.",
55
"author": {
66
"name": "Mark J Panaghiston",

dist/add-on/jplayer.playlist.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
* http://www.opensource.org/licenses/MIT
88
*
99
* Author: Mark J Panaghiston
10-
* Version: 2.4.0
11-
* Date: 1st September 2014
10+
* Version: 2.4.1
11+
* Date: 19th November 2014
1212
*
1313
* Requires:
1414
* - jQuery 1.7.0+
15-
* - jPlayer 2.7.0+
15+
* - jPlayer 2.8.2+
1616
*/
1717

1818
/*global jPlayerPlaylist:true */
@@ -31,16 +31,22 @@
3131
this.options = $.extend(true, {
3232
keyBindings: {
3333
next: {
34-
key: 39, // RIGHT
34+
key: 221, // ]
3535
fn: function() {
3636
self.next();
3737
}
3838
},
3939
previous: {
40-
key: 37, // LEFT
40+
key: 219, // [
4141
fn: function() {
4242
self.previous();
4343
}
44+
},
45+
shuffle: {
46+
key: 83, // s
47+
fn: function() {
48+
self.shuffle();
49+
}
4450
}
4551
},
4652
stateClass: {

dist/add-on/jplayer.playlist.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/add-on/jquery.jplayer.inspector.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jplayer/jquery.jplayer.js

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
* http://opensource.org/licenses/MIT
88
*
99
* Author: Mark J Panaghiston
10-
* Version: 2.8.1
11-
* Date: 13th November 2014
10+
* Version: 2.8.2
11+
* Date: 19th November 2014
1212
*/
1313

1414
/* Support for Zepto 1.0 compiled with optional data module.
@@ -423,38 +423,33 @@
423423
// The current jPlayer instance in focus.
424424
$.jPlayer.focus = null;
425425

426-
// (fallback) The list of element node names to ignore with key controls.
426+
// The list of element node names to ignore with key controls.
427427
$.jPlayer.keyIgnoreElementNames = "A INPUT TEXTAREA SELECT BUTTON";
428428

429429
// The function that deals with key presses.
430430
var keyBindings = function(event) {
431-
432431
var f = $.jPlayer.focus,
433-
pageFocus = document.activeElement,
434432
ignoreKey;
435433

436434
// A jPlayer instance must be in focus. ie., keyEnabled and the last one played.
437435
if(f) {
438436
// What generated the key press?
439-
if(typeof pageFocus !== 'undefined') {
440-
if(pageFocus !== null && pageFocus.nodeName.toUpperCase() !== "BODY") {
437+
$.each( $.jPlayer.keyIgnoreElementNames.split(/\s+/g), function(i, name) {
438+
// The strings should already be uppercase.
439+
if(event.target.nodeName.toUpperCase() === name.toUpperCase()) {
441440
ignoreKey = true;
441+
return false; // exit each.
442442
}
443-
} else {
444-
// Fallback for no document.activeElement support.
445-
$.each( $.jPlayer.keyIgnoreElementNames.split(/\s+/g), function(i, name) {
446-
// The strings should already be uppercase.
447-
if(event.target.nodeName.toUpperCase() === name.toUpperCase()) {
448-
ignoreKey = true;
449-
return false; // exit each.
450-
}
451-
});
452-
}
443+
});
453444
if(!ignoreKey) {
454445
// See if the key pressed matches any of the bindings.
455446
$.each(f.options.keyBindings, function(action, binding) {
456447
// The binding could be a null when the default has been disabled. ie., 1st clause in if()
457-
if(binding && event.which === binding.key && $.isFunction(binding.fn)) {
448+
if(
449+
(binding && $.isFunction(binding.fn)) &&
450+
((typeof binding.key === 'number' && event.which === binding.key) ||
451+
(typeof binding.key === 'string' && event.key === binding.key))
452+
) {
458453
event.preventDefault(); // Key being used by jPlayer, so prevent default operation.
459454
binding.fn(f);
460455
return false; // exit each.
@@ -479,7 +474,7 @@
479474
$.jPlayer.prototype = {
480475
count: 0, // Static Variable: Change it via prototype.
481476
version: { // Static Object
482-
script: "2.8.1",
477+
script: "2.8.2",
483478
needFlash: "2.8.0",
484479
flash: "unknown"
485480
},
@@ -592,7 +587,7 @@
592587
// The parameter, f = $.jPlayer.focus, will be checked truethy before attempting to call any of these functions.
593588
// Properties may be added to this object, in key/fn pairs, to enable other key controls. EG, for the playlist add-on.
594589
play: {
595-
key: 32, // space
590+
key: 80, // p
596591
fn: function(f) {
597592
if(f.status.paused) {
598593
f.play();
@@ -602,30 +597,36 @@
602597
}
603598
},
604599
fullScreen: {
605-
key: 13, // enter
600+
key: 70, // f
606601
fn: function(f) {
607602
if(f.status.video || f.options.audioFullScreen) {
608603
f._setOption("fullScreen", !f.options.fullScreen);
609604
}
610605
}
611606
},
612607
muted: {
613-
key: 8, // backspace
608+
key: 77, // m
614609
fn: function(f) {
615610
f._muted(!f.options.muted);
616611
}
617612
},
618613
volumeUp: {
619-
key: 38, // UP
614+
key: 190, // .
620615
fn: function(f) {
621616
f.volume(f.options.volume + 0.1);
622617
}
623618
},
624619
volumeDown: {
625-
key: 40, // DOWN
620+
key: 188, // ,
626621
fn: function(f) {
627622
f.volume(f.options.volume - 0.1);
628623
}
624+
},
625+
loop: {
626+
key: 76, // l
627+
fn: function(f) {
628+
f._loop(!f.options.loop);
629+
}
629630
}
630631
},
631632
verticalVolume: false, // Calculate volume from the bottom of the volume bar. Default is from the left. Also volume affects either width or height.

dist/jplayer/jquery.jplayer.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)