From: itozyun Date: Sun, 5 Oct 2014 11:55:02 +0000 (+0900) Subject: Version 0.6.90, performance fix for HTML5Audio & rename SilverLight -> Silverlight. X-Git-Url: http://git.osdn.jp/view?a=commitdiff_plain;h=05ae2ffbbca8b1bdb4c3fcbfdd4e1708c0485360;p=pettanr%2FclientJs.git Version 0.6.90, performance fix for HTML5Audio & rename SilverLight -> Silverlight. --- diff --git a/0.6.x/js/02_plugin/00_XPlugin.js b/0.6.x/js/02_plugin/00_XPlugin.js index 5df17a4..d7e2032 100644 --- a/0.6.x/js/02_plugin/00_XPlugin.js +++ b/0.6.x/js/02_plugin/00_XPlugin.js @@ -58,9 +58,9 @@ X.Pulgin = { FlashEnabled : X_Pulgin_FLASH_ENABLED, - SilverLight : X_Pulgin_SILVER_LIGHT_VERSION, + Silverlight : X_Pulgin_SILVER_LIGHT_VERSION, - SilverLightEnabled : X_Pulgin_SILVER_LIGHT_ENABLED, + SilverlightEnabled : X_Pulgin_SILVER_LIGHT_ENABLED, Unity : X_Pulgin_UNITY_VERSION, diff --git a/0.6.x/js/06_audio/00_XAudio.js b/0.6.x/js/06_audio/00_XAudio.js index b4cb185..3727959 100644 --- a/0.6.x/js/06_audio/00_XAudio.js +++ b/0.6.x/js/06_audio/00_XAudio.js @@ -1,7 +1,7 @@ X.Audio = { HTML5 : 1, Flash : 2, - SilverLight : 3, + Silverlight : 3, Unity : 4, WMP : 5, RealPlayer : 6, diff --git a/0.6.x/js/06_audio/01_XHTML5Audio.js b/0.6.x/js/06_audio/01_XHTML5Audio.js index efbae42..5bea55f 100644 --- a/0.6.x/js/06_audio/01_XHTML5Audio.js +++ b/0.6.x/js/06_audio/01_XHTML5Audio.js @@ -137,8 +137,6 @@ if( window.HTMLAudioElement ){ { proxy : null, - xnodeAudio : null, - rawAudio : null, _closed : true, _lastUserAction : '', @@ -156,21 +154,23 @@ if( window.HTMLAudioElement ){ if( option.startTime ) this._startTime = option.startTime; if( option.volume ) this._volume = option.volume; - this.xnodeAudio = new X.EventDispatcher( this.rawAudio = X_Audio_rawAudio || new Audio( source ) )//X.Dom.Node.create( 'audio', { src : source } ).appendToRoot();//( X.Dom.Node._systemNode ); - .listen( [ + this._rawObject = X_Audio_rawAudio || new Audio( source );//X.Dom.Node.create( 'audio', { src : source } ).appendToRoot();//( X.Dom.Node._systemNode ); + + this.listen( [ 'loadstart', 'load', 'progress', 'suspend', 'abort', 'error', 'emptied', 'stalled', 'play', 'pause', 'loadedmetadata', 'loadeddata', 'waiting', 'playing', 'canplay', 'canplaythrough', 'seeking', 'seeked', 'timeupdate', 'ended', - 'ratechange', 'durationchange', 'volumechange' ], this, this.handleEventProxy ); + 'ratechange', 'durationchange', 'volumechange' ], this.handleEventProxy ); + if( X_Audio_rawAudio ){ X_Audio_rawAudio.src = source; X_Audio_rawAudio.load(); // 要る? X_Audio_rawAudio = null; }; - document.body.appendChild( this.rawAudio ); + //document.body.appendChild( this._rawObject ); - this.rawAudio.volume = this._volume; - this.rawAudio.autoplay = false; + this._rawObject.volume = this._volume; + this._rawObject.autoplay = false; option.autoplay && X.Timer.once( 100, this, this.play ); this.listenOnce( X.Event.KILL_INSTANCE ); @@ -180,8 +180,6 @@ if( window.HTMLAudioElement ){ switch( e.type ){ case X.Event.KILL_INSTANCE : - this.xnodeAudio.unlisten(); - this.xnodeAudio.kill(); // と同じく