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 even if autoplay is set to false #104

Open
ghost opened this issue Dec 10, 2021 · 0 comments
Open

Autoplay even if autoplay is set to false #104

ghost opened this issue Dec 10, 2021 · 0 comments

Comments

@ghost
Copy link

ghost commented Dec 10, 2021

Describe the bug
When calculating the property canAutoplay of env, the can-autoplay library from

export async function getEnv(config: Config): Promise<IEnv> {
starts the player in function startPlayback, even if config.autoplay is set to false. The reason is, getEnv is run on init and starts the video player.

This leads to unexpected video playback and throws an error in Safari, where Safari blocks autoplay.

To Reproduce
Steps to reproduce the behavior:

  1. Clone master branch
  2. Set autoplay to false
  3. Put console.logs in can-autoplay library

Expected behavior
Ultimately, .init should not playback video if autoplay is set to false.
In calculating getEnv object, can-autoplay should not playback the video.

Screenshots
image

Desktop (please complete the following information):

  • OS Windows 10
  • Browser Edge
  • Version 96.0.1054.43
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

0 participants