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
It may be preferable to disable the download and fullscreen button an a video element (even though, in general, it's not hard for someone to script their way around this). In this case we can use controlsList when working with normal HTML.
Both things would be supported if the Video component forwarded these web properties, which is done for some other components (despite these being "web-only" properties!).
The workaround is to use a nativeId and set these properties using JavaScript, each render, because each render it will reset to the old way.
Solution
I think the preferred solution would be to at least allow forwarding these web only properties, just like how many other components have other types of Android or iOS only properties.
Thank you for filing this issue!
This comment acknowledges we believe this may be a bug and there’s enough information to investigate it.
However, we can’t promise any sort of timeline for resolution. We prioritize issues based on severity, breadth of impact, and alignment with our roadmap. If you’d like to help move it more quickly, you can continue to investigate it more deeply and/or you can open a pull request that fixes the cause.
Summary
It may be preferable to disable the
download
andfullscreen
button an a video element (even though, in general, it's not hard for someone to script their way around this). In this case we can usecontrolsList
when working with normal HTML.The other thing we may want to do is disable Picture-In-Picture, which can be achieved using the
disablePictureInPicture
attribute.Both things would be supported if the
Video
component forwarded these web properties, which is done for some other components (despite these being "web-only" properties!).The reason this doesn't work for video is because the
Video
element throws away unknown properties here:https://github.com/expo/expo/blob/main/packages/expo-av/src/ExponentVideo.web.tsx#L144
Despite the following invocations allowing it:
https://github.com/expo/expo/blob/main/packages/expo-av/src/Video.tsx#L355
https://github.com/expo/expo/blob/main/packages/expo-av/src/ExponentVideo.web.tsx#L40
Workaround
The workaround is to use a
nativeId
and set these properties usingJavaScript
, each render, because each render it will reset to the old way.Solution
I think the preferred solution would be to at least allow forwarding these web only properties, just like how many other components have other types of Android or iOS only properties.
What platform(s) does this occur on?
Web
Environment
Minimal reproducible example
https://snack.expo.dev/@derk-jan/web-video-controlslist
The text was updated successfully, but these errors were encountered: