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

Fix if-statement in readURL #2263

Merged
merged 1 commit into from
Oct 25, 2018
Merged

Fix if-statement in readURL #2263

merged 1 commit into from
Oct 25, 2018

Conversation

mbotsch
Copy link
Contributor

@mbotsch mbotsch commented Oct 24, 2018

Corrected a nested if statement in readURL() that caused slide(indexh,indexv) to be called even when the current slide equals the target slide pointed to by the read URL.

In the uncorrected version, any slide switch triggers a call to slide(h,v), which calls writeURL(), which triggers readURL(), which then erroneously triggers slide(h,v) a second time.

As a consequence, updateBackground() is called twice (from slide(h,v)) for each slide change. When using background videos the first call starts the video. The second call first stops the video (through stopEmbeddedContent(previousBackground)) and then tries to restarts it again. This unfortunate start-stop-start combination in most cases does not start the background video, but triggers the following error (on Ubuntu 18.04 w/ chromium browser):

"Uncaught (in promise) DOMException: The play() request was interrupted by a call to pause()."

Correcting the if-statement in readURL fixes the issue.

called even when the current slide is the target slide.
@hakimel
Copy link
Owner

hakimel commented Oct 25, 2018

Good catch thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants