Open ludicch opened 11 years ago
the above works for me as a fix for the problem.
another issue i am unsure if this it's the way it's meant to be. in the buffer function in ASSTimeline.as
for (var i:int = _lastBufferIndex; i < captions.events.length; i++)
{
if ((captions.events[i].startSeconds - _currentTime) < BUFFER_LENGTH)
{
_captionsBuffer.push(renderer.render(captions, captions.events[i], _videoRect, _container, captions.events[i].startSeconds, animated));
_lastBufferIndex++;
// shoudnt this be 32 < (get....
// if you want to break after a too long loading loop the > is wrong
if (32 > (getTimer() - start)) break;
}
else
{
break;
}
}
this works better for me, i can increase the timer (32) and everything gets loaded, in the other case during runtime it only loads 1 subtitle per function-call.
You're correct in both cases.
hi, while searching for a error when displaying multiple captions at once i found a bug in the timeline function:
the error occurs because at the same time _captionsBuffer is spliced and i is increased. so every subtitle displayed, makes the loop skip the next entry in the _captionsBuffer.