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

Properly handle muted and controls video attributes #18

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

f-elix
Copy link
Collaborator

@f-elix f-elix commented Oct 30, 2024

For some reason Svelte doesn't correctly handle those attributes (see sveltejs/svelte#6536). I don't know how we didn't catch this earlier, but this PR works around the issue.

Closes #9

@f-elix f-elix requested a review from nitriques October 30, 2024 14:31
export let controls = true;
export let el: HTMLVideoElement | undefined = undefined;

const updateAttribute = (attr: string, value: boolean) => {
Copy link
Member

Choose a reason for hiding this comment

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

Can we add a comment in the code about the issue with svelte please ? Thanks !

@f-elix f-elix requested a review from nitriques October 30, 2024 16:01
@f-elix f-elix force-pushed the felix/html-video-fix branch from 03559fc to c690f55 Compare November 1, 2024 14:10
@nitriques
Copy link
Member

Cc @vsylvestre same as your bug right ?

@f-elix
Copy link
Collaborator Author

f-elix commented Nov 28, 2024

By the way this is supposed to be fixed in Svelte 5

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.

The controls prop in HtmlVideo does not work
2 participants