_lastState : '',\r
_interval : 0, // setInterval timer id\r
\r
- 'Constructor' : function( disatcher, source, option ){\r
+ 'Constructor' : function( dispatcher, source, option ){\r
!X_SLAudio_uid && X_TEMP.slaudioInit();\r
\r
/*\r
* http://www.atmarkit.co.jp/fdotnet/dotnettips/902slobjcallfromjs/slobjcallfromjs.html\r
* このページのサンプルは sl5+firefox32 環境で動いている。xaml を js から利用する形ではなく、.xap を sl4 以下で作るのがよさそう.\r
*/\r
- this.disatcher = disatcher || this;\r
+ this.dispatcher = dispatcher || this;\r
this._source = source;\r
// X.Audio._slOnload_ は不可\r
this._onload = 'XAudioSilverlightOnLoad' + ( ++X_SLAudio_uid );\r
if( this.playing ){\r
//X_Timer_once( 16, this, this.actualPlay );\r
} else {\r
- this.disatcher[ 'dispatch' ]( X_EVENT_ERROR ); // open failed\r
+ this.dispatcher[ 'dispatch' ]( X_EVENT_ERROR ); // open failed\r
this[ 'kill' ](); \r
};\r
break;\r
case 'MediaOpened' :\r
// http://msdn.microsoft.com/ja-jp/library/bb979710(VS.95).aspx\r
this.duration = this[ '_rawObject' ][ 'NaturalDuration' ][ 'Seconds' ] * 1000;\r
- this.disatcher[ 'asyncDispatch' ]( X_EVENT_READY );\r
+ this.dispatcher[ 'asyncDispatch' ]( X_EVENT_READY );\r
break;\r
\r
case 'MediaEnded' :\r
case 'Opening' :\r
switch( this._lastUserAction ){\r
case 'play' :\r
- this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_WAITING );\r
+ this.dispatcher[ 'dispatch' ]( X_EVENT_MEDIA_WAITING );\r
break;\r
case 'seek' :\r
- this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_SEEKING );\r
+ this.dispatcher[ 'dispatch' ]( X_EVENT_MEDIA_SEEKING );\r
break;\r
case 'pause' :\r
break;\r
this.playing = false;\r
this._ended = true;\r
this._paused = false;\r
- this.disatcher[ 'dispatch' ]( X_EVENT_ERROR );\r
+ this.dispatcher[ 'dispatch' ]( X_EVENT_ERROR );\r
this[ 'kill' ]();\r
break;\r
\r
//this.seekTime = 0;\r
this._ended = true;\r
this._paused = false;\r
- //this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_ENDED );\r
+ //this.dispatcher[ 'dispatch' ]( X_EVENT_MEDIA_ENDED );\r
//this.setCurrentTime( this.startTime );\r
break;\r
case 'pause':\r
//this.playing = true;\r
this._ended = false;\r
this._paused = false;\r
- this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_PLAYING );\r
+ this.dispatcher[ 'dispatch' ]( X_EVENT_MEDIA_PLAYING );\r
break;\r
\r
// stop()\r
break;\r
\r
case X_EVENT_KILL_INSTANCE :\r
- this.playing && this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_ENDED );\r
+ this.playing && this.dispatcher[ 'dispatch' ]( X_EVENT_MEDIA_ENDED );\r
this.playing && this.actualPause();\r
\r
if( this._onload ){\r
delete this._interval;\r
return X_CALLBACK_UN_LISTEN;\r
};\r
- this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_PLAYING );\r
+ this.dispatcher[ 'dispatch' ]( X_EVENT_MEDIA_PLAYING );\r
},\r
\r
_onEnded : function(){\r
console.log( ' > ' + time );\r
this._ended && this[ '_rawObject' ].play();\r
this._ended = false;\r
- this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_WAITING );\r
+ this.dispatcher[ 'dispatch' ]( X_EVENT_MEDIA_WAITING );\r
this._timerID = X_Timer_once( X_Audio_getEndTime( this ) - time, this, this._onEnded );\r
return;\r
};\r
\r
if( this.autoLoop ){\r
console.log( '========= loop?' );\r
- if( !( this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_BEFORE_LOOP ) & X_CALLBACK_PREVENT_DEFAULT ) ){\r
+ if( !( this.dispatcher[ 'dispatch' ]( X_EVENT_MEDIA_BEFORE_LOOP ) & X_CALLBACK_PREVENT_DEFAULT ) ){\r
console.log( '========== loopした' );\r
this.looped = true;\r
- this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_LOOPED );\r
+ this.dispatcher[ 'dispatch' ]( X_EVENT_MEDIA_LOOPED );\r
this.actualPlay();\r
};\r
} else {\r
console.log( '========= pause' );\r
this.actualPause();\r
- this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_ENDED );\r
+ this.dispatcher[ 'dispatch' ]( X_EVENT_MEDIA_ENDED );\r
};\r
};\r
},\r