Permalink
Browse files

New Feature: Enabled noConflict option for use with jQuery.noConflict…

…(true)
  • Loading branch information...
1 parent 068d2c5 commit 6332af91a1a70cf633aeb136aec8295a816f430c @thepag thepag committed Apr 13, 2011
@@ -2,19 +2,20 @@
* jPlayer Plugin for jQuery JavaScript Library
* http://www.happyworm.com/jquery/jplayer
*
- * Copyright (c) 2009 - 2010 Happyworm Ltd
+ * Copyright (c) 2009 - 2011 Happyworm Ltd
* Dual licensed under the MIT and GPL licenses.
* - http://www.opensource.org/licenses/mit-license.php
* - http://www.gnu.org/copyleft/gpl.html
*
* Author: Mark J Panaghiston
- * Version: 2.0.0
- * Date: 20th December 2010
+ * Version: 2.0.9
+ * Date: 13th April 2011
*
* FlashVars expected: (AS3 property of: loaderInfo.parameters)
- * id: (URL Encoded) Id of jPlayer instance
+ * id: (URL Encoded: String) Id of jPlayer instance
* vol: (Number) Sets the initial volume
- * muted: (Boolean) Sets the initial muted state
+ * muted: (Boolean in a String) Sets the initial muted state
+ * jQuery: (URL Encoded: String) Sets the jQuery var name. Used with: someVar = jQuery.noConflict(true);
*
* Compiled using: Adobe Flash CS4 Professional
* Jplayer.fla
@@ -59,9 +60,8 @@ package {
public function Jplayer() {
flash.system.Security.allowDomain("*");
- jQuery = "jQuery('#" + loaderInfo.parameters.id + "').jPlayer";
+ jQuery = loaderInfo.parameters.jQuery + "('#" + loaderInfo.parameters.id + "').jPlayer";
commonStatus.volume = Number(loaderInfo.parameters.vol);
- commonStatus.muted = Boolean(loaderInfo.parameters.muted);
commonStatus.muted = loaderInfo.parameters.muted == "true";
stage.scaleMode = StageScaleMode.NO_SCALE;
Binary file not shown.
Binary file not shown.
@@ -2,14 +2,14 @@
* jPlayer Plugin for jQuery JavaScript Library
* http://www.jplayer.org
*
- * Copyright (c) 2009 - 2010 Happyworm Ltd
+ * Copyright (c) 2009 - 2011 Happyworm Ltd
* Dual licensed under the MIT and GPL licenses.
* - http://www.opensource.org/licenses/mit-license.php
* - http://www.gnu.org/copyleft/gpl.html
*
* Author: Mark J Panaghiston
- * Version: 2.0.8
- * Date: 5th April 2011
+ * Version: 2.0.9
+ * Date: 13th April 2011
*/
(function($, undefined) {
@@ -192,8 +192,8 @@
$.jPlayer.prototype = {
count: 0, // Static Variable: Change it via prototype.
version: { // Static Object
- script: "2.0.8",
- needFlash: "2.0.0",
+ script: "2.0.9",
+ needFlash: "2.0.9",
flash: "unknown"
},
options: { // Instanced in $.jPlayer() constructor
@@ -226,6 +226,7 @@
// globalVolume: false, // Not implemented: Set to make volume changes affect all jPlayer instances
// globalMute: false, // Not implemented: Set to make mute changes affect all jPlayer instances
idPrefix: "jp", // Prefix for the ids of html elements created by jPlayer. For flash, this must not include characters: . - + * / \
+ noConflict: "jQuery",
errorAlerts: false,
warningAlerts: false
},
@@ -542,7 +543,12 @@
// Add the flash solution if it is being used.
if(this.flash.used) {
- var htmlObj, flashVars = 'id=' + escape(this.internal.self.id) + '&vol=' + this.options.volume + '&muted=' + this.options.muted;
+ var htmlObj,
+ 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.

0 comments on commit 6332af9

Please sign in to comment.