OSDN Git Service

Version 0.6.184, fi x X.AudioSprite & X.Audio, add X.WMPAudio.
[pettanr/clientJs.git] / 0.6.x / js / 07_audio / 03_XSilverlightAudio.js
index 97582a7..ff2f7b5 100644 (file)
@@ -15,7 +15,7 @@
 var X_SLAudio,\r
        X_SLAudio_uid = 0;\r
 \r
-if( X[ 'Pulgin' ][ 'Silverlight' ] ){\r
+if( X_Pulgin_SILVER_LIGHT_VERSION ){\r
        \r
        X_TEMP.slaudioInit = function(){\r
                //\r
@@ -131,8 +131,6 @@ if( X[ 'Pulgin' ][ 'Silverlight' ] ){
                                                // 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
-                               \r
-                               this.autoplay && X_Timer_once( 16, this, this.actualPlay );\r
                                                break;\r
 \r
                                        case 'MediaEnded' :\r
@@ -253,7 +251,7 @@ if( X[ 'Pulgin' ][ 'Silverlight' ] ){
                                // もし kill 後に autoplayTimer で呼ばれても、_closed==true なので平気\r
                                if( this.error ) return;\r
                                if( !this.duration ){\r
-                                       this.autoplay = true;\r
+                                       this._playReserved = true;\r
                                        return;\r
                                };\r
                                \r
@@ -349,16 +347,14 @@ if( X[ 'Pulgin' ][ 'Silverlight' ] ){
                        \r
                        // SilverlightAudio.pause\r
                        actualPause : function(){\r
-                               if( this.error /*  || !this.playing */ ) return;\r
+                               if( this.error ) return;\r
                                \r
                                this._lastUserAction = 'pause';\r
-                               this.seekTime = this.getActualCurrentTime();\r
                                this.playing  = false;\r
                                this._paused  = true;\r
                                this._ended   = false;\r
                                \r
                                this[ '_rawObject' ].pause();\r
-                               //this.disatcher[ 'dispatch' ]( 'pause' );\r
                        },\r
 \r
                        getActualCurrentTime : function(){\r
@@ -366,6 +362,8 @@ if( X[ 'Pulgin' ][ 'Silverlight' ] ){
                        },\r
                        \r
                        afterUpdateState : function( result ){\r
+                               var end, halfway;\r
+                               \r
                                if( result & 3 ){ // seek\r
                        this.actualPlay();\r
                                } else\r