Skip to content

Existence of attributes in html video tags makes the attribute to be true. #3075

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

Closed

Conversation

kedarisetti
Copy link
Contributor

The correct way of setting/unsetting the tags in the html video element for 'looping', 'autoplay' and 'controls'
is to make the tag available (with any value) or removing it.

https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#boolean-attributes
https://stackoverflow.com/questions/14161516/html5-video-completely-hide-controls

@jasongrout
Copy link
Member

Is it not working for you? It seems to work fine for me as-is, without this change, i.e., setting loop to False in python disables looping.

We're using the actual DOM attributes, which are documented as being true or false, like https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/autoplay

For example, this disables the controls just fine for me without this change:

Video(value=b'https://upload.wikimedia.org/wikipedia/commons/4/40/Reaction_Diffusion_Varying.webm', format='url', controls=False)

@jasongrout
Copy link
Member

What browser and OS are you using?

@kedarisetti
Copy link
Contributor Author

#3074 fixes this issue for me. Therefore closing.

@kedarisetti kedarisetti deleted the bugfix/video_script branch February 20, 2021 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants