• R/O
  • HTTP
  • SSH
  • HTTPS

clientJs: コミット

クライアント側 js 開発用


コミットメタ情報

リビジョンd3d95fb0bc2ab2f61c7f15746b2d64078ef39af8 (tree)
日時2016-02-12 14:25:44
作者itozyun <itozyun@user...>
コミッターitozyun

ログメッセージ

Version 0.6.212, bug fixes X.WebAudio.

変更サマリ

差分

--- a/0.6.x/js/07_audio/01_XWebAudio.js
+++ b/0.6.x/js/07_audio/01_XWebAudio.js
@@ -224,7 +224,7 @@ if( X_WebAudio_context ){
224224 _startPos : 0,
225225 _endPosition : 0,
226226 _startTime : 0,
227- _timerID : 0,
227+ //_timerID : 0,
228228 _interval : 0,
229229 audioBuffer : null,
230230 bufferSource : null,
@@ -354,8 +354,8 @@ if( X_WebAudio_context ){
354354 //console.log( '> use onended' );
355355 //this.bufferSource.onended = this._onended || ( this._onended = X_Closure_create( this, this._onEnded ) );
356356 //} else {
357- this._timerID && X_Timer_remove( this._timerID );
358- this._timerID = X_Timer_once( end - begin, this, this._onEnded );
357+ //this._timerID && X_Timer_remove( this._timerID );
358+ //this._timerID = X_Timer_once( end - begin, this, this._onEnded );
359359 //};
360360
361361 if( this.bufferSource.start ){
@@ -368,7 +368,8 @@ if( X_WebAudio_context ){
368368 this._startPos = begin;
369369 this._endPosition = end;
370370 this._startTime = X_WebAudio_context.currentTime * 1000;
371- this._interval = this._interval || X_Timer_add( 1000, 0, this, this._onInterval );
371+ // this._interval = this._interval || X_Timer_add( 1000, 0, this, this._onInterval );
372+ this._interval = this._interval || X_Timer_add( 100, 0, this, this._onEnded );
372373 },
373374
374375 _sourceDispose : function(){
@@ -377,17 +378,18 @@ if( X_WebAudio_context ){
377378 delete this.bufferSource;
378379 },
379380
381+ /*
380382 _onInterval : function(){
381383 if( !this.playing ){
382384 delete this._interval;
383385 return X_CALLBACK_UN_LISTEN;
384386 };
385387 this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_PLAYING );
386- },
387-
388+ }, */
389+
388390 _onEnded : function(){
389391 var time;
390- delete this._timerID;
392+ //delete this._timerID;
391393
392394 if( this.playing ){
393395 time = X_WebAudio_context.currentTime * 1000 - this._startTime - this._endPosition + this._startPos | 0;
@@ -397,9 +399,10 @@ if( X_WebAudio_context ){
397399 if( time < 0 ) return;
398400 } else {
399401 if( time < 0 ){
402+ this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_PLAYING );
400403 //console.log( '> onEnd crt:' + ( X_WebAudio_context.currentTime * 1000 ) + ' startTime:' + this._startTime +
401404 // ' from:' + this._startPos + ' to:' + this._endPosition );
402- this._timerID = X_Timer_once( -time, this, this._onEnded );
405+ // this._timerID = X_Timer_once( -time, this, this._onEnded );
403406 return;
404407 };
405408 };
@@ -409,6 +412,9 @@ if( X_WebAudio_context ){
409412 this.looped = true;
410413 this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_LOOPED );
411414 this.actualPlay();
415+ } else {
416+ delete this._interval;
417+ return X_CALLBACK_UN_LISTEN;
412418 };
413419 } else {
414420 this.actualPause();
@@ -420,8 +426,10 @@ if( X_WebAudio_context ){
420426 actualPause : function(){
421427 console.log( '[WebAudio] pause' );
422428
423- this._timerID && X_Timer_remove( this._timerID );
424- delete this._timerID;
429+ //this._timerID && X_Timer_remove( this._timerID );
430+ //delete this._timerID;
431+ this._interval && X_Timer_remove( this._interval );
432+ delete this._interval;
425433 delete this.playing;
426434
427435 if( this.bufferSource ){
--- a/0.6.x/js/07_audio/05_XWMPAudio.js
+++ b/0.6.x/js/07_audio/05_XWMPAudio.js
@@ -112,7 +112,7 @@ if( X_Plugin_WMP_VERSION ){ // IETester で 6.x は不可
112112 _onTimer : function(){
113113 var progress, time;
114114
115- // road 中の場合
115+ // load 中の場合
116116 if( this._readyState === 1 ){
117117 if( 7 <= X_Plugin_WMP_VERSION ){
118118 progress = this._wmp[ 'network' ][ 'downloadProgress' ];
旧リポジトリブラウザで表示