\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
\r
X_HTMLAudio_volumeFix = X_UA[ 'Chrome' ],\r
/*\r
// 8:duration 取得済\r
// :timeupdate イベントで durationFixは完了\r
_durationFixPhase : X_HTMLAudio_durationFix ? 1 : 0,\r
- _lastCurrentTime : 0,\r
+ _lastCurrentTime : 0, // ms\r
\r
_shortPlayFixON : false,\r
_shortPlayFixTime : 0,\r
\r
if( !raw ) return;\r
\r
- //e.type !== 'timeupdate' && console.log( ' > ' + e.type );\r
+ // e.type !== 'timeupdate' && console.log( ' > ' + e.type );\r
\r
switch( e.type ){\r
\r
if( ( now = this.getActualCurrentTime() ) === this._lastCurrentTime ){\r
eventType = X_EVENT_MEDIA_WAITING;\r
} else\r
+ if( X_HTMLAudio_playStartFix && ( now < this._lastCurrentTime ) ){\r
+ eventType = X_EVENT_MEDIA_WAITING;\r
+ //console.log( '@Firefox44.0.2 !! ' + now + ' / ' + this._lastCurrentTime );\r
+ // Firefox44.0.2 で音声の再生開始に難あり...\r
+ // 20回程度 currentTime の更新に失敗する....\r
+ this.actualPlay();\r
+ } else\r
if( this.playing ){\r
end = X_Audio_getEndTime( this ) + this._shortPlayFixTime;\r
- \r
- console.log( now + ' / ' + end );// Firefox44.0.2 で音声の再生開始に難あり...\r
- \r
+\r
+ //console.log( '@ ' + now + ' / ' + this._lastCurrentTime + ' / ' + end );// Firefox44.0.2 で音声の再生開始に難あり...\r
+\r
if( ( 0 + end <= 0 + now ) || // 0+ なぜか iem9 で必要,,,\r
( now < this._lastCurrentTime && now < 2000 ) ){\r
//( ( X_HTMLAudio_endedFixAOSP2 || X_HTMLAudio_endedFixAOSP4 ) && ( now < this._lastCurrentTime && now < 1000 ) ) ){\r
end = X_Audio_getEndTime( this );\r
begin = X_Audio_getStartTime( this, end, true );\r
\r
- this._lastCurrentTime = begin / 1000;\r
+ this._lastCurrentTime = begin;\r
\r
if( this._shortPlayFixON ){\r
this._shortPlayFixTime = ( 1000 < end - begin ) ? 200 : 400;\r
\r
// iOS で duration が 0 の時に触ると error\r
// 0 or 8\r
- if( !( this._durationFixPhase % 8 ) && this.duration ) raw.currentTime = this._lastCurrentTime;\r
+ if( !( this._durationFixPhase % 8 ) && this.duration ) raw.currentTime = this._lastCurrentTime / 1000;\r
\r
console.log( '[HTMLAudio] play ' + begin + ' -> ' + end + ' crt:' + ( raw.currentTime | 0 ) + ' last:' + this._lastCurrentTime );\r
\r
getActualCurrentTime : function(){\r
return ( X_HTMLAudio_currentTimeFix ?\r
X_Timer_now() - this._currentFixStart + this._currentFixBegin :\r
- this._seekingFixON ? this._lastCurrentTime * 1000 :\r
+ this._seekingFixON ? this._lastCurrentTime :\r
this[ '_rawObject' ].currentTime * 1000 | 0 );\r
},\r
/*\r