OSDN Git Service

Version 0.6.187, add Scroll-Indicator for X.UI.ScrollBox, bugfix of X.HTMLAudio.
[pettanr/clientJs.git] / 0.6.x / js / 07_audio / 01_XWebAudio.js
index 9fc97e7..7361e99 100644 (file)
@@ -1,8 +1,8 @@
 var X_Audio_constructor = 3.1 <= X_UA[ 'Safari' ] && X_UA[ 'Safari' ] < 4 ?
                                                                function( s, a ){
-                                                                       a = document.createElement( 'audio' );
-                                                                       a.src = s;
-                                                                       a.load();
+                                                                       //a = document.createElement( 'audio' );
+                                                                       //a.src = s;
+                                                                       //a.load();
                                                                        return a;
                                                                } :
                                                // Android1.6 + MobileOpera12 HTMLAudio はいるが呼ぶとクラッシュする
@@ -323,6 +323,8 @@ if( X_WebAudio_context ){
                                                // alert( 'タッチイベント以外での play! ' + ( e ? e.type : '' ) );
                                                return;
                                        };
+                                       // http://qiita.com/uupaa/items/e5856e3cb2a9fc8c5507
+                                       // iOS9 + touchstart で呼んでいた場合、 X_ViewPort['listenOnce']('pointerup',this,this.actualPlay())
                                        this.disatcher[ 'asyncDispatch' ]( X_EVENT_READY );
                                };
                                X_WebAudio_touchState = false;
@@ -369,7 +371,7 @@ if( X_WebAudio_context ){
                        
                                _sourceDispose : function(){
                            this.bufferSource.disconnect();
-                           delete this.bufferSource.onended;
+                           //delete this.bufferSource.onended;
                            delete this.bufferSource;
                        },
 
@@ -421,7 +423,7 @@ if( X_WebAudio_context ){
                                delete this.playing;
 
                    if( this.bufferSource ){
-                       if( this.bufferSource.onended ) delete this.bufferSource.onended;
+                       //if( this.bufferSource.onended ) delete this.bufferSource.onended;
                        
                        this.bufferSource.stop ? 
                                this.bufferSource.stop( 0 ) : this.bufferSource[ 'noteOff' ]( 0 );