You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently came accross the (very probable) reason for this: The event the MediaElement (the thing that is responsible for playing the audio in the browser) sends during it plays and which we use to determine the current time and therefore the timing when to switch between chapters does not come in "regular" intervals but depends on how the browser implements the API (https://developer.mozilla.org/en-US/docs/Web/Events/timeupdate). Most of them seem to update with a 4hz frequency (so ~250+ms).
Currently I'm not sure if the effect it would have would be worth investing the time to fix it. Leaving this issue open though.
You are totally right that this highly depends on the browser implementation (especially iOS Safari is highly imprecise .). Don't know what audio element wrapper you folks using, we implemented this one: https://github.com/podlove/html5-audio-driver. At Podlove Player each chapters start is associated with a transformed timestamp up to milliseconds. On chapter interaction the currentTime of the chapter in milliseconds is set. This at least gives the media element the chance to start at chapters beginning in milliseconds but doesn't help you improving precision in switching chapters.
Currently switching chaptermarks while playing disregards milliseconds and might switch marks too early or too late.
The text was updated successfully, but these errors were encountered: