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

Respect user preference for reduced motion when autoplaying #1532

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jramke
Copy link

@jramke jramke commented Dec 12, 2024

Related:

closes #1479

Description:

I already opened an issue and now had time to dig into the code.
When a user has reduced motion settings enabled in their system preferences, the player should respect this setting and not autoplay videos, regardless of the autoplay attribute value. This aligns with accessibility best practices and user preferences for reduced motion.

As a dev we could handle this with a simple check as @ianmiller347 already mentioned in the issue for example. But i think it would be a good practice to implement this directly so it works out of the box.

If the user prefers reduced motion and its autoplaying we throw during the play and not attemptAutoplay method because the auto-play-failed event is triggered by the play-fail event. Maybe i overlooked something and this could be improved.

Ready?

Yes

Anything Else?

No

Review Process:

@jramke jramke changed the title fix: autoplay for reduced motion Respect user preference for reduced motion when autoplaying Dec 12, 2024
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.

Autoplay doesn't respect prefers-reduced-motion setting
1 participant