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

Autoplay resolving false in Edge 17 with muted check #27

Open
jjanssen opened this issue Aug 29, 2018 · 0 comments
Open

Autoplay resolving false in Edge 17 with muted check #27

jjanssen opened this issue Aug 29, 2018 · 0 comments

Comments

@jjanssen
Copy link

First of all thank you for having this package available. It makes detecting autoplay way easier than I expected at first. I have successfully implemented this within my project and cross-browser tested it along our supported range (IE11, last 2 Chrome/Safari/Firefox) with a muted video.

And the video snippet is formatted like this plain example (no additional scripting only verifying whether it can play):

<video  autoplay loop muted>
  <source src="http://myfancyvideo.com/video.mp4" type="video/mp4">
</video>

When looking Edge version 15 it gives an expected result true:
image

But when running the following in Edge 17 (v17.17134 to be specific):

canAutoPlay.video({ timeout: 1000, muted: true }).then(({ result }) => {
    console.log(result);
});

It will instantly return false and throws a DOM Exception:

code: 9,
message: "NotSupportedError"

When not checking it autoplay the muted video as expected. So after that I also ran the demo page in Edge and it gives the following results.

image

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

No branches or pull requests

1 participant