You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched for existing issues that already report this problem, without success.
Stencil Version
4.7.0
Current Behavior
When trying to use the controlsList attribute on an <video> element in a Stencil component, TypeScript raises an error indicating that the attribute is not recognized in the VideoHTMLAttributes<HTMLVideoElement> type definition.
Expected Behavior
The <video> element should accept the controlsList attribute without TypeScript throwing an error. This attribute is a standard part of the HTML5 specification, allowing for better control over the user's access to video features like downloading.
Create a Stencil component with a <video> element.
Attempt to use controlsList="nodownload" as an attribute.
Observe the TypeScript error as shown above.
import{Component,h}from'@stencil/core';
@Component({tag: 'video-player',shadow: true,})exportclassVideoPlayer{render(){return(<videoclass="video-player"controlsautoplaycontrolsList='nodownload'preload="metadata"><sourcesrc="https://raw.githubusercontent.com/mdn/learning-area/refs/heads/main/html/multimedia-and-embedding/video-and-audio-content/rabbit320.mp4"type="video/mp4"/>
Your browser does not support the video tag.
</video>);}}
Currently I'm using this workaround to prevent ts from throwing that error, but would love to have it fix:
<videoclass="video-player"controlsautoplay{...({controlsList: 'nodownload'}asany)}preload="metadata"><sourcesrc="https://raw.githubusercontent.com/mdn/learning-area/refs/heads/main/html/multimedia-and-embedding/video-and-audio-content/rabbit320.mp4"type="video/mp4"/>
Your browser does not support the video tag.
</video>
Code Reproduction URL
n/a
Additional Information
No response
The text was updated successfully, but these errors were encountered:
@buddyeorl thank you for filing the issue. Unfortunately our team currently has a lot of competing priorities and we are not sure when we can take a look at this. We would appreciate any support on a potential bug fix. We are happy to help on technical questions.
prior to this commit, using the `controlslist` attribute in a `video`
or `audio` element would result in a type checking error. with this
commit, we allow the attribute to take one of three values:
- nodownload
- nofullscreen
- noremoteplayback
note that at the time of this writing, only chromium browsers support
this attribute. it is the responsibilty of end users to determine if
using this attribute is appropraite for their projects.
fixes: stenciljs#6015
Prerequisites
Stencil Version
4.7.0
Current Behavior
When trying to use the
controlsList
attribute on an<video>
element in a Stencil component, TypeScript raises an error indicating that the attribute is not recognized in theVideoHTMLAttributes<HTMLVideoElement>
type definition.Expected Behavior
The
<video>
element should accept thecontrolsList
attribute without TypeScript throwing an error. This attribute is a standard part of the HTML5 specification, allowing for better control over the user's access to video features like downloading.System Info
Steps to Reproduce
Steps to reproduce:
<video>
element.controlsList="nodownload"
as an attribute.Currently I'm using this workaround to prevent ts from throwing that error, but would love to have it fix:
Code Reproduction URL
n/a
Additional Information
No response
The text was updated successfully, but these errors were encountered: