X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=0.6.x%2Fjs%2F07_audio%2F03_XSilverlightAudio.js;h=ff2f7b56d27a0fa7b9452f19b0178d360599e233;hb=3c07e12e13272820cedf983e0d9fe46e5f0a4bd9;hp=97582a7d02e29896fa228e123b4661e63c7f9f48;hpb=86581b41630966e02d93bc37bc221c5fc55f5322;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 97582a7..ff2f7b5 100644 --- a/0.6.x/js/07_audio/03_XSilverlightAudio.js +++ b/0.6.x/js/07_audio/03_XSilverlightAudio.js @@ -15,7 +15,7 @@ var X_SLAudio, X_SLAudio_uid = 0; -if( X[ 'Pulgin' ][ 'Silverlight' ] ){ +if( X_Pulgin_SILVER_LIGHT_VERSION ){ X_TEMP.slaudioInit = function(){ // @@ -131,8 +131,6 @@ if( X[ 'Pulgin' ][ 'Silverlight' ] ){ // 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.autoplay && X_Timer_once( 16, this, this.actualPlay ); break; case 'MediaEnded' : @@ -253,7 +251,7 @@ if( X[ 'Pulgin' ][ 'Silverlight' ] ){ // もし kill 後に autoplayTimer で呼ばれても、_closed==true なので平気 if( this.error ) return; if( !this.duration ){ - this.autoplay = true; + this._playReserved = true; return; }; @@ -349,16 +347,14 @@ if( X[ 'Pulgin' ][ 'Silverlight' ] ){ // SilverlightAudio.pause actualPause : function(){ - if( this.error /* || !this.playing */ ) return; + if( this.error ) return; this._lastUserAction = 'pause'; - this.seekTime = this.getActualCurrentTime(); this.playing = false; this._paused = true; this._ended = false; this[ '_rawObject' ].pause(); - //this.disatcher[ 'dispatch' ]( 'pause' ); }, getActualCurrentTime : function(){ @@ -366,6 +362,8 @@ if( X[ 'Pulgin' ][ 'Silverlight' ] ){ }, afterUpdateState : function( result ){ + var end, halfway; + if( result & 3 ){ // seek this.actualPlay(); } else