OSDN Git Service

Version 0.6.218, Fix the bug of X.Net & X.Audio.
[pettanr/clientJs.git] / 0.6.x / js / 07_audio / 05_XWMPAudio.js
index 5ee0c80..cb750fb 100644 (file)
@@ -22,8 +22,8 @@ if( X_Plugin_WMP_VERSION ){ // IETester で 6.x は不可
                _seekDirection  : 0,
                        _timerID        : 0,
                        
-                       'Constructor' : function( disatcher, source, option ){
-                               this.disatcher   = disatcher || this;
+                       'Constructor' : function( dispatcher, source, option ){
+                               this.dispatcher   = dispatcher || this;
                                this._source     = source;
                                
                                if( 7 <= X_Plugin_WMP_VERSION ){
@@ -71,7 +71,7 @@ if( X_Plugin_WMP_VERSION ){ // IETester で 6.x は不可
                                                break;
 
                                        case X_EVENT_KILL_INSTANCE :
-                                               this.playing && this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_ENDED );
+                                               this.playing && this.dispatcher[ 'dispatch' ]( X_EVENT_MEDIA_ENDED );
                                                this.playing && this.actualPause();
                                            this.wmp.stop();
                                                this.xnodeObject[ 'kill' ]();
@@ -120,7 +120,7 @@ if( X_Plugin_WMP_VERSION ){ // IETester で 6.x は不可
                                                progress = this.wmp[ 'BufferingProgress' ];
                                                };
                                                if( progress < 100 ){
-                                                       this.disatcher[ 'dispatch' ]( { type : X_EVENT_PROGRESS, 'percent' : progress } );
+                                                       this.dispatcher[ 'dispatch' ]( { type : X_EVENT_PROGRESS, 'percent' : progress } );
                                                } else {
                                                        this._readyState = 2;
                                                        if( 7 <= X_Plugin_WMP_VERSION ){
@@ -128,7 +128,7 @@ if( X_Plugin_WMP_VERSION ){ // IETester で 6.x は不可
                                                        } else {
                                                        this.duration = this.wmp[ 'Duration' ] * 1000 | 0;
                                                        };
-                                                       this.disatcher[ 'dispatch' ]( X_EVENT_READY );
+                                                       this.dispatcher[ 'dispatch' ]( X_EVENT_READY );
                                                };
                                        } else
                                        // ended の判定
@@ -138,33 +138,33 @@ if( X_Plugin_WMP_VERSION ){ // IETester で 6.x は不可
                                // waiting
                                if( this._seekDirection ){
                                        if( this._seekDirection === 1 ? ( time < this._beginTime ) : ( this._lastCurrentTime <= time ) ){
-                                               this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_SEEKING );
+                                               this.dispatcher[ 'dispatch' ]( X_EVENT_MEDIA_SEEKING );
                                                return;
                                        };
                                        delete this._seekDirection;
                                };
                                if( time === this._lastCurrentTime ){
-                                       this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_WAITING );
+                                       this.dispatcher[ 'dispatch' ]( X_EVENT_MEDIA_WAITING );
                                        return;
                                };              
                                this._lastCurrentTime = time;
                                
                                // ended ではない
                                if( time - X_Audio_getEndTime( this ) < -50 ){
-                                       this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_PLAYING );
+                                       this.dispatcher[ 'dispatch' ]( X_EVENT_MEDIA_PLAYING );
                                        return;
                                };
                                
                                // ended
                                if( this.autoLoop ){
-                                       if( !( this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_BEFORE_LOOP ) & X_CALLBACK_PREVENT_DEFAULT ) ){
+                                       if( !( this.dispatcher[ 'dispatch' ]( X_EVENT_MEDIA_BEFORE_LOOP ) & X_CALLBACK_PREVENT_DEFAULT ) ){
                                                this.looped = true;
-                                               this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_LOOPED );
+                                               this.dispatcher[ 'dispatch' ]( X_EVENT_MEDIA_LOOPED );
                                                this.actualPlay();
                                        };
                                } else {
                                        this.actualPause();
-                                       this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_ENDED );
+                                       this.dispatcher[ 'dispatch' ]( X_EVENT_MEDIA_ENDED );
                                        delete this._timerID;
                                                        return X_CALLBACK_UN_LISTEN;
                                };