Skip to content

Autoplay resolving false in Edge 17 with muted check #27

@jjanssen

Description

@jjanssen

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions