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

perf(seek-bar): don't update play progress when document is hidden #5879

Merged
merged 4 commits into from
Mar 22, 2019

Conversation

gkatsev
Copy link
Member

@gkatsev gkatsev commented Mar 19, 2019

The seek bar updates on a 30ms interval to have a nice, smooth transition as time ticks forward. Unfortunately, IE11 has some performance issues with interval when the document is hidden. This doesn't appear to be an issue when using setTimeout but using a setTimeout was causing the play progress to appear very jerky in comparison.
Instead, we should just not update the play progress when the document is hidden. Besides solving the issue in IE11, it makes sense to do as no one could be seeing the progress bar. In addition, update() is now a no-op if the seek-bar element isn't visible.

Fixes #5575

Copy link
Contributor

@brandonocasey brandonocasey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, could probably use some doc comments, but other than that this file looks a lot better 👍

@gkatsev gkatsev merged commit 894dd9e into master Mar 22, 2019
@gkatsev gkatsev deleted the seekbar-perf-ie branch March 22, 2019 14:47
gkatsev pushed a commit that referenced this pull request Mar 28, 2019
…den (#5896)

Disable the live tracker on IE11 when the document is hidden to fix the slow down and eventual crashing of web pages on IE11.

After #5879 was completed, we noticed that live streams still have an issue. This is because the live tracker we have also uses setInterval. Unfortunately, just disabling setInterval in the live tracker was not enough. Instead, we decided the best course of action is to just disable the live tracker altogether.
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

3 participants