Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use millisecond precision when switching between chapters #26

Open
benzimmer opened this issue Jan 23, 2017 · 2 comments
Open

Use millisecond precision when switching between chapters #26

benzimmer opened this issue Jan 23, 2017 · 2 comments

Comments

@benzimmer
Copy link
Contributor

Currently switching chaptermarks while playing disregards milliseconds and might switch marks too early or too late.

@benzimmer
Copy link
Contributor Author

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.

@alexander-heimbuch
Copy link

alexander-heimbuch commented Sep 21, 2017

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.

marcelgo added a commit that referenced this issue Jan 28, 2021
Theme for Wirtschaftskammer Österreich [ #176484389 ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants