\r
// Opera Mobile 12 は 2回目以降の currentTime へのセットで currentTime が更新されなくなるため、タイマーを使用する\r
X_HTMLAudio_currentTimeFix = !!X_UA[ 'OperaMobile' ] || !!X_UA[ 'OperaTablet' ],\r
- // Firefox44.0.2 で音声の再生開始に難あり...\r
- X_HTMLAudio_playStartFix = X_UA[ 'Windows' ] && X_UA[ 'Gecko' ] === 44,\r
+ // Firefox44.0.2 で音声の再生開始に難あり... 49 でも確認, あるいはCGIで動的に生成しているmp3自体に問題があるのかも\r
+ X_HTMLAudio_playStartFix = X_UA[ 'Windows' ] && 44 <= X_UA[ 'Gecko' ],\r
\r
X_HTMLAudio_volumeFix = X_UA[ 'Chrome' ],\r
/*\r
\r
_seekingFixON : false,\r
\r
- 'Constructor' : function( disatcher, source, option ){\r
+ 'Constructor' : function( dispatcher, source, option ){\r
var raw;\r
\r
- this.disatcher = disatcher || this;\r
+ this.dispatcher = dispatcher || this;\r
this._src = source;\r
\r
if( X_HTMLAudio_shortPlayFix ){\r
},\r
\r
onDebug : function( e ){\r
- this.disatcher[ 'dispatch' ]( {\r
+ this.dispatcher[ 'dispatch' ]( {\r
type : X_EVENT_DEBUG,\r
'rawEvent' : e.type,\r
'current' : this[ '_rawObject' ].currentTime,\r
for( i = time = 0, l = buf && buf.length; i < l; ++i ){\r
time += buf[ 'end' ]( i ) - buf[ 'start' ]( i );\r
};\r
- this.disatcher[ 'dispatch' ]( { type : X_EVENT_PROGRESS, 'percent' : time * 1000 / this.duration * 100 } );\r
+ this.dispatcher[ 'dispatch' ]( { type : X_EVENT_PROGRESS, 'percent' : time * 1000 / this.duration * 100 } );\r
};\r
break;\r
\r
if( this._touchState === 1 ){\r
if( e.type === X_HTMLAudio_playTrigger ){\r
this._touchState = 2;\r
- this.disatcher[ 'asyncDispatch' ]( X_EVENT_MEDIA_WAIT_FOR_TOUCH );\r
+ this.dispatcher[ 'asyncDispatch' ]( X_EVENT_MEDIA_WAIT_FOR_TOUCH );\r
};\r
} else\r
if( ended ){\r
if( this.autoLoop ){\r
- if( !( this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_BEFORE_LOOP ) & X_CALLBACK_PREVENT_DEFAULT ) ){\r
+ if( !( this.dispatcher[ 'dispatch' ]( X_EVENT_MEDIA_BEFORE_LOOP ) & X_CALLBACK_PREVENT_DEFAULT ) ){\r
this.looped = true;\r
- this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_LOOPED );\r
+ this.dispatcher[ 'dispatch' ]( X_EVENT_MEDIA_LOOPED );\r
this.actualPlay( X_HTMLAudio_endedFixCWV && actualEnded, X_HTMLAudio_endedFixAOSP3 && actualEnded );\r
};\r
} else {\r
this.seekTime = 0;\r
delete this.playing;\r
- this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_ENDED );\r
+ this.dispatcher[ 'dispatch' ]( X_EVENT_MEDIA_ENDED );\r
};\r
} else\r
if( this._readyState === 1 && this.duration ){\r
this._readyState |= 2;\r
- this.disatcher[ 'asyncDispatch' ]( X_EVENT_READY );\r
+ this.dispatcher[ 'asyncDispatch' ]( X_EVENT_READY );\r
+ \r
+ // TODO 勝手に play する環境があるので pause() を実施\r
+ /*\r
+ if( !this.playing && !this.autoplay && !this._playReserved && !X_HTMLAudio_pauseFix ){\r
+ this.actualPause();\r
+ }; */\r
+ \r
console.log( '> Audio Loaded!! ' + e.type + ' d:' + ( this.duration | 0 ) );\r
} else\r
if( eventType ){\r
- this.disatcher[ 'dispatch' ]( eventType );\r
+ this.dispatcher[ 'dispatch' ]( eventType );\r
};\r
},\r
\r
this._endedFixON = true;\r
raw.src = this._src;\r
console.log( '△ onEndedFix の開始' );\r
- this.disatcher[ 'dispatch' ]( X_EVENT_MEDIA_WAITING );\r
+ this.dispatcher[ 'dispatch' ]( X_EVENT_MEDIA_WAITING );\r
};\r
};\r
\r