diff --git a/src/javascript/add-on/jplayer.playlist.js b/src/javascript/add-on/jplayer.playlist.js
index 725caf06..0e674ea3 100644
--- a/src/javascript/add-on/jplayer.playlist.js
+++ b/src/javascript/add-on/jplayer.playlist.js
@@ -76,22 +76,22 @@
};
// Create a ready event handler to initialize the playlist
- $(this.cssSelector.jPlayer).bind($.jPlayer.event.ready, function() {
+ $(this.cssSelector.jPlayer).on($.jPlayer.event.ready, function() {
self._init();
});
// Create an ended event handler to move to the next item
- $(this.cssSelector.jPlayer).bind($.jPlayer.event.ended, function() {
+ $(this.cssSelector.jPlayer).on($.jPlayer.event.ended, function() {
self.next();
});
// Create a play event handler to pause other instances
- $(this.cssSelector.jPlayer).bind($.jPlayer.event.play, function() {
+ $(this.cssSelector.jPlayer).on($.jPlayer.event.play, function() {
$(this).jPlayer("pauseOthers");
});
// Create a resize event handler to show the title in full screen mode.
- $(this.cssSelector.jPlayer).bind($.jPlayer.event.resize, function(event) {
+ $(this.cssSelector.jPlayer).on($.jPlayer.event.resize, function(event) {
if(event.jPlayer.options.fullScreen) {
$(self.cssSelector.details).show();
} else {
@@ -100,19 +100,19 @@
});
// Create click handlers for the extra buttons that do playlist functions.
- $(this.cssSelector.previous).click(function(e) {
+ $(this.cssSelector.previous).on('click', function(e) {
e.preventDefault();
self.previous();
self.blur(this);
});
- $(this.cssSelector.next).click(function(e) {
+ $(this.cssSelector.next).on('click', function(e) {
e.preventDefault();
self.next();
self.blur(this);
});
- $(this.cssSelector.shuffle).click(function(e) {
+ $(this.cssSelector.shuffle).on('click', function(e) {
e.preventDefault();
if(self.shuffled && $(self.cssSelector.jPlayer).jPlayer("option", "useStateClassSkin")) {
self.shuffle(false);
@@ -121,7 +121,7 @@
}
self.blur(this);
});
- $(this.cssSelector.shuffleOff).click(function(e) {
+ $(this.cssSelector.shuffleOff).on('click', function(e) {
e.preventDefault();
self.shuffle(false);
self.blur(this);
@@ -229,7 +229,7 @@
$(this.cssSelector.playlist + " ul").slideUp(displayTime, function() {
var $this = $(this);
$(this).empty();
-
+
$.each(self.playlist, function(i) {
$this.append(self._createListItem(self.playlist[i]));
});
@@ -294,7 +294,7 @@
// Create live handlers that disable free media links to force access via right click
$(this.cssSelector.playlist).off("click", "a." + this.options.playlistOptions.freeItemClass).on("click", "a." + this.options.playlistOptions.freeItemClass, function(e) {
e.preventDefault();
- $(this).parent().parent().find("." + self.options.playlistOptions.itemClass).click();
+ $(this).parent().parent().find("." + self.options.playlistOptions.itemClass).trigger('click');
self.blur(this);
});
@@ -489,7 +489,7 @@
},
blur: function(that) {
if($(this.cssSelector.jPlayer).jPlayer("option", "autoBlur")) {
- $(that).blur();
+ $(that).trigger('blur');
}
}
};
diff --git a/src/javascript/add-on/jquery.jplayer.inspector.js b/src/javascript/add-on/jquery.jplayer.inspector.js
index e7a6cf89..020d87e8 100644
--- a/src/javascript/add-on/jquery.jplayer.inspector.js
+++ b/src/javascript/add-on/jquery.jplayer.inspector.js
@@ -23,12 +23,12 @@
idPrefix: "jplayer_inspector_",
visible: false
};
-
+
var methods = {
init: function(options) {
var self = this;
var $this = $(this);
-
+
var config = $.extend({}, $.jPlayerInspector.defaults, options);
$(this).data("jPlayerInspector", config);
@@ -42,30 +42,30 @@
config.eventResetId = config.idPrefix + "event_reset_" + $.jPlayerInspector.i;
config.updateId = config.idPrefix + "update_" + $.jPlayerInspector.i;
config.eventWindowId = config.idPrefix + "event_window_" + $.jPlayerInspector.i;
-
+
config.eventId = {};
config.eventJq = {};
config.eventTimeout = {};
config.eventOccurrence = {};
-
+
$.each($.jPlayer.event, function(eventName,eventType) {
config.eventId[eventType] = config.idPrefix + "event_" + eventName + "_" + $.jPlayerInspector.i;
config.eventOccurrence[eventType] = 0;
});
-
- var structure =
- '
'
+ '
'
+ '
'
+ '
jPlayer events that have occurred over the past 1 second: '
+ ' (Backgrounds: Never occurred Occurred before Occurred Multiple occurrences reset )
';
-
+
// MJP: Would use the next 3 lines for ease, but the events are just slapped on the page.
// $.each($.jPlayer.event, function(eventName,eventType) {
// structure += '
' + eventName + '
';
// });
-
+
var eventStyle = "float:left;margin:0 5px 5px 0;padding:0 5px;border:1px dotted #000;";
// MJP: Doing it longhand so order and layout easier to control.
structure +=
@@ -120,7 +120,7 @@
+ '
'
+ '
';
$(this).html(structure);
-
+
config.windowJq = $("#" + config.windowId);
config.statusJq = $("#" + config.statusId);
config.configJq = $("#" + config.configId);
@@ -131,8 +131,8 @@
$.each($.jPlayer.event, function(eventName,eventType) {
config.eventJq[eventType] = $("#" + config.eventId[eventType]);
config.eventJq[eventType].text(eventName + " (" + config.eventOccurrence[eventType] + ")"); // Sets the text to the event name and (0);
-
- config.jPlayer.bind(eventType + ".jPlayerInspector", function(e) {
+
+ config.jPlayer.on(eventType + ".jPlayerInspector", function(e) {
config.eventOccurrence[e.type]++;
if(config.eventOccurrence[e.type] > 1) {
config.eventJq[e.type].css("background-color","#ff9");
@@ -156,7 +156,7 @@
});
});
- config.jPlayer.bind($.jPlayer.event.ready + ".jPlayerInspector", function(e) {
+ config.jPlayer.on($.jPlayer.event.ready + ".jPlayerInspector", function(e) {
$this.jPlayerInspector("updateConfig");
});
@@ -169,22 +169,22 @@
} else {
$(this).text("Hide");
config.windowJq.show();
- config.updateJq.click();
+ config.updateJq.trigger('click');
}
config.visible = !config.visible;
- $(this).blur();
+ $(this).trigger('blur');
return false;
});
- config.eventResetJq.click(function() {
+ config.eventResetJq.on('click', function() {
$.each($.jPlayer.event, function(eventName,eventType) {
config.eventJq[eventType].css("background-color","#eee");
});
- $(this).blur();
+ $(this).trigger('blur');
return false;
});
- config.updateJq.click(function() {
+ config.updateJq.on('click', function() {
$this.jPlayerInspector("updateStatus");
$this.jPlayerInspector("updateConfig");
return false;
@@ -195,22 +195,22 @@
} else {
// config.updateJq.click();
}
-
+
$.jPlayerInspector.i++;
return this;
},
destroy: function() {
- $(this).data("jPlayerInspector") && $(this).data("jPlayerInspector").jPlayer.unbind(".jPlayerInspector");
+ $(this).data("jPlayerInspector") && $(this).data("jPlayerInspector").jPlayer.off(".jPlayerInspector");
$(this).empty();
},
updateConfig: function() { // This displays information about jPlayer's configuration in inspector
-
+
var jPlayerInfo = "
This jPlayer instance is running in your browser where: "
for(i = 0; i < $(this).data("jPlayerInspector").jPlayer.data("jPlayer").solutions.length; i++) {
var solution = $(this).data("jPlayerInspector").jPlayer.data("jPlayer").solutions[i];
- jPlayerInfo += " jPlayer's " + solution + " solution is";
+ jPlayerInfo += " jPlayer's " + solution + " solution is";
if($(this).data("jPlayerInspector").jPlayer.data("jPlayer")[solution].used) {
jPlayerInfo += " being used and will support:";
for(format in $(this).data("jPlayerInspector").jPlayer.data("jPlayer")[solution].support) {
@@ -247,7 +247,7 @@
} else {
jPlayerInfo += "
";
}
-
+
jPlayerInfo += "
status.src = '" + $(this).data("jPlayerInspector").jPlayer.data("jPlayer").status.src + "'
";
jPlayerInfo += "
status.media = { ";
@@ -282,9 +282,9 @@
+ " supplied: '" + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "supplied") + "', "
+ " preload: '" + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "preload") + "', "
-
+
+ " volume: " + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "volume") + ", "
-
+
+ " muted: " + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "muted") + ", "
+ " backgroundColor: '" + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "backgroundColor") + "', "
@@ -295,7 +295,7 @@
var cssSelector = $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "cssSelector");
for(prop in cssSelector) {
-
+
// jPlayerInfo += " " + prop + ": '" + cssSelector[prop] + "'," // This works too of course, but want to use option method for deep keys.
jPlayerInfo += " " + prop + ": '" + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "cssSelector." + prop) + "',"
}
@@ -305,7 +305,7 @@
jPlayerInfo += " }, "
+ " errorAlerts: " + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "errorAlerts") + ", "
-
+
+ " warningAlerts: " + $(this).data("jPlayerInspector").jPlayer.jPlayer("option", "warningAlerts") + " "
+ "});
";
@@ -333,6 +333,6 @@
return methods.init.apply( this, arguments );
} else {
$.error( 'Method ' + method + ' does not exist on jQuery.jPlayerInspector' );
- }
+ }
};
})(jQuery);
diff --git a/src/javascript/jplayer/jquery.jplayer.js b/src/javascript/jplayer/jquery.jplayer.js
index 0564889d..3e6a833b 100644
--- a/src/javascript/jplayer/jquery.jplayer.js
+++ b/src/javascript/jplayer/jquery.jplayer.js
@@ -87,7 +87,7 @@
options
);
var self = this;
- this.element.bind( "remove.jPlayer", function() {
+ this.element.on( "remove.jPlayer", function() {
self.destroy();
});
this._init();
@@ -473,9 +473,9 @@
$.jPlayer.keys = function(en) {
var event = "keydown.jPlayer";
// Remove any binding, just in case enabled more than once.
- $(document.documentElement).unbind(event);
+ $(document.documentElement).off(event);
if(en) {
- $(document.documentElement).bind(event, keyBindings);
+ $(document.documentElement).on(event, keyBindings);
}
};
@@ -505,7 +505,7 @@
defaultPlaybackRate: 1,
minPlaybackRate: 0.5,
maxPlaybackRate: 4,
- wmode: "opaque", // Valid wmode: window, transparent, opaque, direct, gpu.
+ wmode: "opaque", // Valid wmode: window, transparent, opaque, direct, gpu.
backgroundColor: "#000000", // To define the jPlayer div and Flash background color.
cssSelectorAncestor: "#jp_container_1",
cssSelector: { // * denotes properties that should only be required when video media type required. _cssSelector() would require changes to enable splitting these into Audio and Video defaults.
@@ -555,11 +555,11 @@
loop: false,
repeat: function(event) { // The default jPlayer repeat event handler
if(event.jPlayer.options.loop) {
- $(this).unbind(".jPlayerRepeat").bind($.jPlayer.event.ended + ".jPlayer.jPlayerRepeat", function() {
+ $(this).off(".jPlayerRepeat").on($.jPlayer.event.ended + ".jPlayer.jPlayerRepeat", function() {
$(this).jPlayer("play");
});
} else {
- $(this).unbind(".jPlayerRepeat");
+ $(this).off(".jPlayerRepeat");
}
},
nativeVideoControls: {
@@ -815,9 +815,9 @@
},
_init: function() {
var self = this;
-
+
this.element.empty();
-
+
this.status = $.extend({}, this.status); // Copy static to unique instance.
this.internal = $.extend({}, this.internal); // Copy static to unique instance.
@@ -848,7 +848,7 @@
this.formats = []; // Array based on supplied string option. Order defines priority.
this.solutions = []; // Array based on solution string option. Order defines priority.
this.require = {}; // Which media types are required: video, audio.
-
+
this.htmlElement = {}; // DOM elements created by jPlayer
this.html = {}; // In _init()'s this.desired code and setmedia(): Accessed via this[solution], where solution from this.solutions array.
this.html.audio = {};
@@ -857,7 +857,7 @@
this.aurora.formats = [];
this.aurora.properties = [];
this.flash = {}; // In _init()'s this.desired code and setmedia(): Accessed via this[solution], where solution from this.solutions array.
-
+
this.css = {};
this.css.cs = {}; // Holds the css selector strings
this.css.jq = {}; // Holds jQuery selectors. ie., $(css.cs.method)
@@ -899,7 +899,7 @@
}
}
});
-
+
// Create Aurora.js formats array
$.each(this.options.auroraFormats.toLowerCase().split(","), function(index1, value1) {
var format = value1.replace(/^\s+|\s+$/g, ""); //trim
@@ -950,7 +950,7 @@
// Register listeners defined in the constructor
$.each($.jPlayer.event, function(eventName,eventType) {
if(self.options[eventName] !== undefined) {
- self.element.bind(eventType + ".jPlayer", self.options[eventName]); // With .jPlayer namespace.
+ self.element.on(eventType + ".jPlayer", self.options[eventName]); // With .jPlayer namespace.
self.options[eventName] = undefined; // Destroy the handler pointer copy on the options. Reason, events can be added/removed in other ways so this could be obsolete and misleading.
}
});
@@ -1001,10 +1001,10 @@
this.internal.poster.jq = $("#" + this.internal.poster.id);
this.internal.poster.jq.css({'width': this.status.width, 'height': this.status.height});
this.internal.poster.jq.hide();
- this.internal.poster.jq.bind("click.jPlayer", function() {
+ this.internal.poster.jq.on("click.jPlayer", function() {
self._trigger($.jPlayer.event.click);
});
-
+
// Generate the required media elements
this.html.audio.available = false;
if(this.require.audio) { // If a supplied format is audio
@@ -1078,11 +1078,11 @@
// Set up the css selectors for the control and feedback entities.
this._cssSelectorAncestor(this.options.cssSelectorAncestor);
-
+
// If neither html nor aurora nor flash are being used by this browser, then media playback is not possible. Trigger an error event.
if(!(this.html.used || this.aurora.used || this.flash.used)) {
this._error( {
- type: $.jPlayer.error.NO_SOLUTION,
+ type: $.jPlayer.error.NO_SOLUTION,
context: "{solution:'" + this.options.solution + "', supplied:'" + this.options.supplied + "'}",
message: $.jPlayer.errorMsg.NO_SOLUTION,
hint: $.jPlayer.errorHint.NO_SOLUTION
@@ -1102,7 +1102,7 @@
flashVars = 'jQuery=' + encodeURI(this.options.noConflict) + '&id=' + encodeURI(this.internal.self.id) + '&vol=' + this.options.volume + '&muted=' + this.options.muted;
// Code influenced by SWFObject 2.2: http://code.google.com/p/swfobject/
- // Non IE browsers have an initial Flash size of 1 by 1 otherwise the wmode affected the Flash ready event.
+ // Non IE browsers have an initial Flash size of 1 by 1 otherwise the wmode affected the Flash ready event.
if($.jPlayer.browser.msie && (Number($.jPlayer.browser.version) < 9 || $.jPlayer.browser.documentMode < 9)) {
var objStr = '
';
@@ -1122,7 +1122,7 @@
} else {
var createParam = function(el, n, v) {
var p = document.createElement("param");
- p.setAttribute("name", n);
+ p.setAttribute("name", n);
p.setAttribute("value", v);
el.appendChild(p);
};
@@ -1175,12 +1175,12 @@
} else {
this.internal.video.jq.css({'width':'0px', 'height':'0px'}); // Using size 0x0 since a .hide() causes issues in iOS
}
- this.internal.video.jq.bind("click.jPlayer", function() {
+ this.internal.video.jq.on("click.jPlayer", function() {
self._trigger($.jPlayer.event.click);
});
}
}
-
+
// Add the Aurora.js solution if being used.
if(this.aurora.used) {
// Aurora.js player need to be created for each media, see setMedia function.
@@ -1228,13 +1228,13 @@
$.each(this.css.jq, function(fn, jq) {
// Check selector is valid before trying to execute method.
if(jq.length) {
- jq.unbind(".jPlayer");
+ jq.off(".jPlayer");
}
});
// Remove the click handlers for $.jPlayer.event.click
- this.internal.poster.jq.unbind(".jPlayer");
+ this.internal.poster.jq.off(".jPlayer");
if(this.internal.video.jq) {
- this.internal.video.jq.unbind(".jPlayer");
+ this.internal.video.jq.off(".jPlayer");
}
// Remove the fullscreen event handlers
this._fullscreenRemoveEventListeners();
@@ -1247,9 +1247,9 @@
this._destroyHtmlBridge();
}
this.element.removeData("jPlayer"); // Remove jPlayer data
- this.element.unbind(".jPlayer"); // Remove all event handlers created by the jPlayer constructor
+ this.element.off(".jPlayer"); // Remove all event handlers created by the jPlayer constructor
this.element.empty(); // Remove the inserted child elements
-
+
delete this.instances[this.internal.instance]; // Clear the instance on the static instance object
},
destroyRemoved: function() { // Destroy any instances that have gone away.
@@ -1348,7 +1348,7 @@
// Create the event listeners
// Only want the active entity to affect jPlayer and bubble events.
// Using entity.gate so that object is referenced and gate property always current
-
+
mediaElement.addEventListener("progress", function() {
if(entity.gate) {
if(self.internal.cmdsIgnored && this.readyState > 0) { // Detect iOS executed the command
@@ -1508,7 +1508,7 @@
// Create the event listeners
// Only want the active entity to affect jPlayer and bubble events.
// Using entity.gate so that object is referenced and gate property always current
-
+
player.on("progress", function() {
if(entity.gate) {
if(self.internal.cmdsIgnored && this.readyState > 0) { // Detect iOS executed the command
@@ -1588,7 +1588,7 @@
sp = 100;
cpr = cpa;
}
-
+
if(override) {
ct = 0;
cpr = 0;
@@ -1624,7 +1624,7 @@
sp = 100;
cpr = cpa;
}
-
+
if(override) {
ct = 0;
cpr = 0;
@@ -1692,7 +1692,7 @@
// Need to read original status before issuing the setMedia command.
var currentTime = this.status.currentTime,
- paused = this.status.paused;
+ paused = this.status.paused;
this.setMedia(this.status.media);
this.volumeWorker(this.options.volume);
@@ -1944,7 +1944,7 @@
}
},
setMedia: function(media) {
-
+
/* media[format] = String: URL of format. Must contain all of the supplied option's video or audio formats.
* media.poster = String: Video poster URL.
* media.track = Array: Of objects defining the track element: kind, src, srclang, label, def.
@@ -2012,7 +2012,7 @@
}
self.status.video = false;
}
-
+
supported = true;
return false; // Exit $.each
}
@@ -2381,7 +2381,7 @@
if(typeof cssSel === 'string') {
if($.jPlayer.prototype.options.cssSelector[fn]) {
if(this.css.jq[fn] && this.css.jq[fn].length) {
- this.css.jq[fn].unbind(".jPlayer");
+ this.css.jq[fn].off(".jPlayer");
}
this.options.cssSelector[fn] = cssSel;
this.css.cs[fn] = this.options.cssSelectorAncestor + " " + cssSel;
@@ -2389,7 +2389,7 @@
if(cssSel) { // Checks for empty string
this.css.jq[fn] = $(this.css.cs[fn]);
} else {
- this.css.jq[fn] = []; // To comply with the css.jq[fn].length check before its use. As of jQuery 1.4 could have used $() for an empty set.
+ this.css.jq[fn] = []; // To comply with the css.jq[fn].length check before its use. As of jQuery 1.4 could have used $() for an empty set.
}
if(this.css.jq[fn].length && this[fn]) {
@@ -2397,12 +2397,12 @@
e.preventDefault();
self[fn](e);
if(self.options.autoBlur) {
- $(this).blur();
+ $(this).trigger('blur');
} else {
- $(this).focus(); // Force focus for ARIA.
+ $(this).trigger('focus'); // Force focus for ARIA.
}
};
- this.css.jq[fn].bind("click.jPlayer", handler); // Using jPlayer namespace
+ this.css.jq[fn].on("click.jPlayer", handler); // Using jPlayer namespace
}
if(cssSel && this.css.jq[fn].length !== 1) { // So empty strings do not generate the warning. ie., they just remove the old one.
@@ -2781,7 +2781,7 @@
//get the change from last position to this position
deltaX = self.internal.mouse.x - event.pageX;
deltaY = self.internal.mouse.y - event.pageY;
- moved = (Math.floor(deltaX) > 0) || (Math.floor(deltaY)>0);
+ moved = (Math.floor(deltaX) > 0) || (Math.floor(deltaY)>0);
} else {
moved = true;
}
@@ -2812,13 +2812,13 @@
// undefine mouse
delete this.internal.mouse;
- this.element.unbind(namespace);
- this.css.jq.gui.unbind(namespace);
+ this.element.off(namespace);
+ this.css.jq.gui.off(namespace);
if(!this.status.nativeVideoControls) {
if(this.options.fullWindow && this.options.autohide.full || !this.options.fullWindow && this.options.autohide.restored) {
- this.element.bind(eventType, handler);
- this.css.jq.gui.bind(eventType, handler);
+ this.element.on(eventType, handler);
+ this.css.jq.gui.on(eventType, handler);
this.css.jq.gui.hide();
} else {
this.css.jq.gui.show();
@@ -3097,19 +3097,19 @@
}
},
_aurora_setAudio: function(media) {
- var self = this;
-
+ var self = this;
+
// Always finds a format due to checks in setMedia()
$.each(this.formats, function(priority, format) {
if(self.aurora.support[format] && media[format]) {
self.status.src = media[format];
self.status.format[format] = true;
self.status.formatType = format;
-
+
return false;
}
});
-
+
this.aurora.player = new AV.Player.fromURL(this.status.src);
this._addAuroraEventListeners(this.aurora.player, this.aurora);
@@ -3143,7 +3143,7 @@
}
this.status.waitForLoad = false;
this._aurora_checkWaitForPlay();
-
+
// No event from the player, update UI now.
this._updateButtons(true);
this._trigger($.jPlayer.event.play);
@@ -3153,11 +3153,11 @@
this.aurora.player.seek(time * 1000);
}
this.aurora.player.pause();
-
+
if(time > 0) { // Avoids a setMedia() followed by stop() or pause(0) hiding the video play button.
this._aurora_checkWaitForPlay();
}
-
+
// No event from the player, update UI now.
this._updateButtons(false);
this._trigger($.jPlayer.event.pause);
@@ -3167,7 +3167,7 @@
// The seek() sould be in milliseconds, but the only codec that works with seek (aac.js) uses seconds.
this.aurora.player.seek(percent * this.aurora.player.duration / 100); // Using seconds
}
-
+
if(!this.status.waitForLoad) {
this._aurora_checkWaitForPlay();
}
@@ -3233,7 +3233,7 @@
break;
case "rtmpv":
self._getMovie().fl_setVideo_rtmp(media[format]);
- break;
+ break;
}
self.status.src = media[format];
self.status.format[format] = true;
@@ -3419,7 +3419,7 @@
}
});
if(nativeEvent) {
- self.element.bind(eventType + ".jPlayer.jPlayerHtml", function() { // With .jPlayer & .jPlayerHtml namespaces.
+ self.element.on(eventType + ".jPlayer.jPlayerHtml", function() { // With .jPlayer & .jPlayerHtml namespaces.
self._emulateHtmlUpdate();
var domEvent = document.createEvent("Event");
domEvent.initEvent(eventName, false, true);
@@ -3445,7 +3445,7 @@
var self = this;
// Bridge event handlers are also removed by destroy() through .jPlayer namespace.
- this.element.unbind(".jPlayerHtml"); // Remove all event handlers created by the jPlayer bridge. So you can change the emulateHtml option.
+ this.element.off(".jPlayerHtml"); // Remove all event handlers created by the jPlayer bridge. So you can change the emulateHtml option.
// Remove the methods and properties
var emulated = $.jPlayer.emulateMethods + " " + $.jPlayer.emulateStatus + " " + $.jPlayer.emulateOptions;
diff --git a/src/javascript/popcorn/popcorn.jplayer.js b/src/javascript/popcorn/popcorn.jplayer.js
index 8eff0dac..e171e5aa 100644
--- a/src/javascript/popcorn/popcorn.jplayer.js
+++ b/src/javascript/popcorn/popcorn.jplayer.js
@@ -200,7 +200,7 @@
// Figure out how jPlayer will play it.
// This may not work properly when both audio and video is supplied. ie., A media player. But it should return truethy and jPlayer can figure it out.
-
+
var solution = srcObj.options.solution.toLowerCase().split(","), // Create the solution array, with prority based on the order of the solution string.
supplied = srcObj.options.supplied.toLowerCase().split(","); // Create the supplied formats array, with prority based on the order of the supplied formats string.
@@ -319,21 +319,21 @@
}
};
- myPlayer.bind($.jPlayer.event.loadstart, function() {
+ myPlayer.on($.jPlayer.event.loadstart, function() {
setTimeout(function() {
if(DEBUG) console.log('Trigger : loadeddata');
jPlayerObj._trigger($.jPlayer.event.loadeddata);
}, 0);
})
- .bind($.jPlayer.event.progress, function(event) {
+ .on($.jPlayer.event.progress, function(event) {
checkDuration(event);
checkCanPlayThrough(event);
})
- .bind($.jPlayer.event.timeupdate, function(event) {
+ .on($.jPlayer.event.timeupdate, function(event) {
checkDuration(event);
checkCanPlayThrough(event);
})
- .bind($.jPlayer.event.play, function() {
+ .on($.jPlayer.event.play, function() {
setTimeout(function() {
if(DEBUG) console.log('Trigger : playing');
jPlayerObj._trigger($.jPlayer.event.playing);
@@ -363,7 +363,7 @@
// Allow the swfPath to be set to local server. ie., If the jPlayer Plugin is local and already on the page, then you can also use the local SWF.
jpOptions.swfPath = jpOptions.swfPath || JPLAYER_SWFPATH;
- myPlayer.bind($.jPlayer.event.ready, function(event) {
+ myPlayer.on($.jPlayer.event.ready, function(event) {
if(event.jPlayer.flash.used) {
jPlayerFlashEventsPatch();
}
@@ -381,7 +381,7 @@
// Generate event handlers for all the standard HTML5 media events. (Except durationchange)
var bindEvent = function(name) {
- myPlayer.bind($.jPlayer.event[name], function(event) {
+ myPlayer.on($.jPlayer.event[name], function(event) {
if(DEBUG) console.log('Dispatched event: ' + name + (event && event.jPlayer ? ' (' + event.jPlayer.status.currentTime + 's)' : '')); // Must be after dispatch for some reason on Firefox/Opera
media.dispatchEvent(name);
});
@@ -407,21 +407,21 @@
}
}
- myPlayer.bind($.jPlayer.event.loadeddata, function(event) {
+ myPlayer.on($.jPlayer.event.loadeddata, function(event) {
if(DEBUG) console.log('Dispatched event: loadeddata' + (event && event.jPlayer ? ' (' + event.jPlayer.status.currentTime + 's)' : ''));
media.dispatchEvent('loadeddata');
ready = true;
});
if(DEBUG) console.log('Created CUSTOM event handler for: loadeddata');
- myPlayer.bind($.jPlayer.event.durationchange, function(event) {
+ myPlayer.on($.jPlayer.event.durationchange, function(event) {
duration = event.jPlayer.status.duration;
dispatchDurationChange();
});
if(DEBUG) console.log('Created CUSTOM event handler for: durationchange');
// The error event is a special case. Plus jPlayer error event assumes it is a broken URL. (It could also be a decoder error... Or aborted or a Network error.)
- myPlayer.bind($.jPlayer.event.error, function(event) {
+ myPlayer.on($.jPlayer.event.error, function(event) {
// Not sure how to handle the error situation. Popcorn does not appear to have the error or error.code property documented here: http://popcornjs.org/popcorn-docs/media-methods/
// If any error event happens, then something has gone pear shaped.