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

Quality-of-life improvements for attempts to autoplay #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

roscoemcinerney
Copy link

@roscoemcinerney roscoemcinerney commented Jan 25, 2019

In response to https://developers.google.com/web/updates/2017/09/autoplay-policy-changes, some changes to HTMLVideo:

  • Use the promise returned by HTMLMediaElement.play() in modern browsers to better expose success or failure when calling vastplayer.startAd()
  • Set attribute "muted" on HTML5 video element when volume is set to 0, as modern browsers allow autoplay on explicitly muted videos even with low or zero Media Engagement Index - but not on videos with volume == 0.

@roscoemcinerney roscoemcinerney changed the title Quality-of-life improvement Quality-of-life improvements for attempts to autoplay Jan 25, 2019
Copy link
Owner

@minznerjosh minznerjosh left a comment

Choose a reason for hiding this comment

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

Thanks for doing this! Can you add unit tests for this change?

Copy link
Owner

@minznerjosh minznerjosh left a comment

Choose a reason for hiding this comment

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

Also, this codebase doesn't incorporate babel. (It's a bit old.) So we should only use ES5. I would also love to merge a PR that adds support for ES2018+ and incorporates babel into the build chain if you're up for doing that separately!

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.

2 participants