X-Git-Url: http://git.osdn.jp/view?p=pettanr%2FclientJs.git;a=blobdiff_plain;f=0.6.x%2Fjs%2F07_audio%2F03_XSilverlightAudio.js;fp=0.6.x%2Fjs%2F07_audio%2F03_XSilverlightAudio.js;h=09fa4cd936952e3d8ffdc22e9761e62ec61bad69;hp=ea3dad7d003fc381caf8a7990d1ed4066a964457;hb=66ccef8a1fdd3994dd3c75dcfede668ea55f1d2e;hpb=4e4ab3be10850546063d4a4b93250ed142bb8cd2 diff --git a/0.6.x/js/07_audio/03_XSilverlightAudio.js b/0.6.x/js/07_audio/03_XSilverlightAudio.js index ea3dad7..09fa4cd 100644 --- a/0.6.x/js/07_audio/03_XSilverlightAudio.js +++ b/0.6.x/js/07_audio/03_XSilverlightAudio.js @@ -53,7 +53,7 @@ if( X_Plugin_SILVER_LIGHT_VERSION ){ _lastState : '', _interval : 0, // setInterval timer id - 'Constructor' : function( disatcher, source, option ){ + 'Constructor' : function( dispatcher, source, option ){ !X_SLAudio_uid && X_TEMP.slaudioInit(); /* @@ -61,7 +61,7 @@ if( X_Plugin_SILVER_LIGHT_VERSION ){ * http://www.atmarkit.co.jp/fdotnet/dotnettips/902slobjcallfromjs/slobjcallfromjs.html * このページのサンプルは sl5+firefox32 環境で動いている。xaml を js から利用する形ではなく、.xap を sl4 以下で作るのがよさそう. */ - this.disatcher = disatcher || this; + this.dispatcher = dispatcher || this; this._source = source; // X.Audio._slOnload_ は不可 this._onload = 'XAudioSilverlightOnLoad' + ( ++X_SLAudio_uid ); @@ -122,7 +122,7 @@ if( X_Plugin_SILVER_LIGHT_VERSION ){ if( this.playing ){ //X_Timer_once( 16, this, this.actualPlay ); } else { - this.disatcher[ 'dispatch' ]( X_EVENT_ERROR ); // open failed + this.dispatcher[ 'dispatch' ]( X_EVENT_ERROR ); // open failed this[ 'kill' ](); }; break; @@ -130,7 +130,7 @@ if( X_Plugin_SILVER_LIGHT_VERSION ){ case 'MediaOpened' : // http://msdn.microsoft.com/ja-jp/library/bb979710(VS.95).aspx this.duration = this[ '_rawObject' ][ 'NaturalDuration' ][ 'Seconds' ] * 1000; - this.disatcher[ 'asyncDispatch' ]( X_EVENT_READY ); + this.dispatcher[ 'asyncDispatch' ]( X_EVENT_READY ); break; case 'MediaEnded' : @@ -157,10 +157,10 @@ if( X_Plugin_SILVER_LIGHT_VERSION ){ case 'Opening' : switch( this._lastUserAction ){ case 'play' : - this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_WAITING ); + this.dispatcher[ 'dispatch' ]( X_EVENT_MEDIA_WAITING ); break; case 'seek' : - this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_SEEKING ); + this.dispatcher[ 'dispatch' ]( X_EVENT_MEDIA_SEEKING ); break; case 'pause' : break; @@ -177,7 +177,7 @@ if( X_Plugin_SILVER_LIGHT_VERSION ){ this.playing = false; this._ended = true; this._paused = false; - this.disatcher[ 'dispatch' ]( X_EVENT_ERROR ); + this.dispatcher[ 'dispatch' ]( X_EVENT_ERROR ); this[ 'kill' ](); break; @@ -195,7 +195,7 @@ if( X_Plugin_SILVER_LIGHT_VERSION ){ //this.seekTime = 0; this._ended = true; this._paused = false; - //this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_ENDED ); + //this.dispatcher[ 'dispatch' ]( X_EVENT_MEDIA_ENDED ); //this.setCurrentTime( this.startTime ); break; case 'pause': @@ -214,7 +214,7 @@ if( X_Plugin_SILVER_LIGHT_VERSION ){ //this.playing = true; this._ended = false; this._paused = false; - this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_PLAYING ); + this.dispatcher[ 'dispatch' ]( X_EVENT_MEDIA_PLAYING ); break; // stop() @@ -230,7 +230,7 @@ if( X_Plugin_SILVER_LIGHT_VERSION ){ 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(); if( this._onload ){ @@ -297,7 +297,7 @@ if( X_Plugin_SILVER_LIGHT_VERSION ){ delete this._interval; return X_CALLBACK_UN_LISTEN; }; - this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_PLAYING ); + this.dispatcher[ 'dispatch' ]( X_EVENT_MEDIA_PLAYING ); }, _onEnded : function(){ @@ -315,7 +315,7 @@ if( X_Plugin_SILVER_LIGHT_VERSION ){ console.log( ' > ' + time ); this._ended && this[ '_rawObject' ].play(); this._ended = false; - this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_WAITING ); + this.dispatcher[ 'dispatch' ]( X_EVENT_MEDIA_WAITING ); this._timerID = X_Timer_once( X_Audio_getEndTime( this ) - time, this, this._onEnded ); return; }; @@ -331,16 +331,16 @@ if( X_Plugin_SILVER_LIGHT_VERSION ){ if( this.autoLoop ){ console.log( '========= loop?' ); - 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 ) ){ console.log( '========== loopした' ); this.looped = true; - this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_LOOPED ); + this.dispatcher[ 'dispatch' ]( X_EVENT_MEDIA_LOOPED ); this.actualPlay(); }; } else { console.log( '========= pause' ); this.actualPause(); - this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_ENDED ); + this.dispatcher[ 'dispatch' ]( X_EVENT_MEDIA_ENDED ); }; }; },