X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=0.6.x%2Fjs%2F07_audio%2F03_XSilverlightAudio.js;h=6999b81c96d89e68a01bc217c93ecee6bc5f7e91;hb=475df4df9670f042764a99c80d7716e994d28033;hp=a12ee10dc47c2900f0ef5ea25448797d2cb41c64;hpb=b722f049986136ce6f382557104f2ea9aabf797b;p=pettanr%2FclientJs.git diff --git a/0.6.x/js/07_audio/03_XSilverlightAudio.js b/0.6.x/js/07_audio/03_XSilverlightAudio.js index a12ee10..6999b81 100644 --- a/0.6.x/js/07_audio/03_XSilverlightAudio.js +++ b/0.6.x/js/07_audio/03_XSilverlightAudio.js @@ -45,7 +45,7 @@ if( X[ 'Pulgin' ][ 'SilverlightEnabled' ] ){ _lastState : '', _interval : 0, // setInterval timer id - Constructor : function( target, source, option ){ + 'Constructor' : function( target, source, option ){ !X_Audio_SLAudio_uid && X_TEMP.slaudioInit(); /* @@ -59,7 +59,7 @@ if( X[ 'Pulgin' ][ 'SilverlightEnabled' ] ){ this._source = source; // X.Audio._slOnload_ は不可 this._onload = 'XAudioSilverlightOnLoad' + ( ++X_Audio_SLAudio_uid ); - this._callback = window[ this._onload ] = X_Callback_create( this, this.onSLReady ); + this._callback = window[ this._onload ] = X_Closure_create( this, this.onSLReady ); this.xnodeObject = X_Node_body [ 'create' ]( 'object', { type : 'application/x-silverlight-2', @@ -86,7 +86,7 @@ if( X[ 'Pulgin' ][ 'SilverlightEnabled' ] ){ window[ this._onload ] = null; delete this._onload; - X_Callback_correct( this._callback ); + X_Closure_correct( this._callback ); delete this._callback; sender[ 'children' ][ 'add' ]( @@ -232,7 +232,7 @@ if( X[ 'Pulgin' ][ 'SilverlightEnabled' ] ){ // window への delete に ie5 は対応しないが、そもそも ie5 は Silverlight に非対応 window[ this._onload ] = null; delete this._onload; - X_Callback_correct( this._callback ); + X_Closure_correct( this._callback ); }; this.xnodeObject[ 'kill' ](); break; @@ -290,7 +290,7 @@ if( X[ 'Pulgin' ][ 'SilverlightEnabled' ] ){ _onInterval : function(){ if( !this.playing ){ delete this._interval; - return X_Callback_UN_LISTEN; + return X_CALLBACK_UN_LISTEN; }; this.target[ 'dispatch' ]( X_EVENT_MEDIA_PLAYING ); }, @@ -326,7 +326,7 @@ if( X[ 'Pulgin' ][ 'SilverlightEnabled' ] ){ if( this.autoLoop ){ console.log( '========= loop?' ); - if( !( this.target[ 'dispatch' ]( X_EVENT_MEDIA_BEFORE_LOOP ) & X_Callback_PREVENT_DEFAULT ) ){ + if( !( this.target[ 'dispatch' ]( X_EVENT_MEDIA_BEFORE_LOOP ) & X_CALLBACK_PREVENT_DEFAULT ) ){ console.log( '========== loopした' ); this.looped = true; this.target[ 'dispatch' ]( X_EVENT_MEDIA_LOOPED ); @@ -397,6 +397,12 @@ if( X[ 'Pulgin' ][ 'SilverlightEnabled' ] ){ X_Audio_BACKENDS.push( { backendName : 'Silverlight Audio', + canPlay : { + 'mp3' : true, + 'wma' : true, + 'wav' : true + }, + detect : function( proxy, source, ext ){ var ok = ext === 'mp3' || ext === 'wma' || ext === 'wav'; proxy[ 'asyncDispatch' ]( { type : X_EVENT_COMPLETE, canPlay : ok } );