@@ -524,9 +524,9 @@ this.createjs = this.createjs || {};
524524 if ( ! s . hasEventListener ( "fileload" ) ) { continue ; }
525525
526526 var event = new createjs . Event ( "fileload" ) ;
527- event . src = item . src ,
528- event . id = item . id ,
529- event . data = item . data
527+ event . src = item . src ;
528+ event . id = item . id ;
529+ event . data = item . data ;
530530
531531 s . dispatchEvent ( event ) ;
532532 }
@@ -552,24 +552,39 @@ this.createjs = this.createjs || {};
552552 types :[ "sound" ] ,
553553 extensions :s . SUPPORTED_EXTENSIONS
554554 } ;
555- }
555+ } ;
556+
557+ /**
558+ * Deprecated in favor of {{#crossLink "Sound/registerPlugins"}}{{/crossLink}} with a single argument.
559+ * createjs.Sound.registerPlugins([createjs.WebAudioPlugin]);
560+ *
561+ * @method registerPlugin
562+ * @param {Object } plugin The plugin class to install.
563+ * @return {Boolean } Whether the plugin was successfully initialized.
564+ * @static
565+ * @deprecated
566+ */
567+ s . registerPlugin = function ( plugin ) {
568+ return s . _registerPlugin ( plugin ) ;
569+ } ;
556570
557571 /**
558572 * Register a Sound plugin. Plugins handle the actual playback of audio. The default plugins are
559573 * ({{#crossLink "WebAudioPlugin"}}{{/crossLink}} followed by {{#crossLink "HTMLAudioPlugin"}}{{/crossLink}}),
560574 * and are installed if no other plugins are present when the user attempts to start playback or register sound.
561575 * <h4>Example</h4>
562- * createjs.Sound.registerPlugin(createjs.FlashPlugin);
563576 * createjs.FlashPlugin.swfPath = "../src/SoundJS/";
577+ * createjs.Sound._registerPlugin(createjs.FlashPlugin);
564578 *
565579 * To register multiple plugins, use {{#crossLink "Sound/registerPlugins"}}{{/crossLink}}.
566580 *
567- * @method registerPlugin
581+ * @method _registerPlugin
568582 * @param {Object } plugin The plugin class to install.
569583 * @return {Boolean } Whether the plugin was successfully initialized.
570584 * @static
585+ * @private
571586 */
572- s . registerPlugin = function ( plugin ) {
587+ s . _registerPlugin = function ( plugin ) {
573588 s . pluginsRegistered = true ;
574589 if ( plugin == null ) {
575590 return false ;
@@ -584,8 +599,7 @@ this.createjs = this.createjs || {};
584599 } ;
585600
586601 /**
587- * Register a list of Sound plugins, in order of precedence. To register a single plugin, use
588- * {{#crossLink "Sound/registerPlugin"}}{{/crossLink}}.
602+ * Register a list of Sound plugins, in order of precedence. To register a single plugin, pass a single element in the array.
589603 *
590604 * <h4>Example</h4>
591605 * createjs.FlashPlugin.swfPath = "../src/SoundJS/";
@@ -599,7 +613,7 @@ this.createjs = this.createjs || {};
599613 s . registerPlugins = function ( plugins ) {
600614 for ( var i = 0 , l = plugins . length ; i < l ; i ++ ) {
601615 var plugin = plugins [ i ] ;
602- if ( s . registerPlugin ( plugin ) ) {
616+ if ( s . _registerPlugin ( plugin ) ) {
603617 return true ;
604618 }
605619 }
0 commit comments