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

Improve videoautoplay detection #1963

Merged
merged 1 commit into from
Apr 30, 2016

Conversation

mfairchild365
Copy link
Contributor

videoautoplay detection can be flaky. 300ms is a long enough wait for many sites, however there are plenty of other sites where that number is too low. Rather than simply increasing the wait, this commit tries to address the problem by increasing the wait time to 1000ms while re-checking every 200ms to ensure the quickest result. While this might not be enough for every situation, it should cover many more situations.

videoautoplay detection can be flaky. 300ms is a long enough wait for many sites, however there are plenty of other sites where that number is too low. Rather than simply increasing the wait, this commit tries to address the problem by increasing the wait time to 1000ms while re-checking every 200ms to ensure the quickest result. While this might not be enough for every situation, it should cover many more situations.
@tmsdnl
Copy link

tmsdnl commented Apr 28, 2016

Any chance this is getting to master any time soon?

@ryanseddon ryanseddon merged commit 3bd5997 into Modernizr:master Apr 30, 2016
@ryanseddon
Copy link
Member

Thanks @mfairchild365 we'll see how this goes.

@tmsdnl
Copy link

tmsdnl commented May 2, 2016

@ryanseddon is there a plan to bump version as well?

skoolbus39 added a commit to skoolbus39/wdntemplates that referenced this pull request May 3, 2016
As it turns out, the videoautoplay Modernizr test is [is not entirely reliable](Modernizr/Modernizr#1095). @mfairchild365 has submitted [a pull request](Modernizr/Modernizr#1963) to Modernizr which has been merged. In the meantime, I've adjusted the hero content CSS. The video will always play if the videoautoplay test works. If the test fails, we'll fall back to media queries. Video will be shown for browser widths greater than 768px.
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.

3 participants