Score:1

How can I modify/edit/change the media video controls?

fj flag

I was wondering how could I modify the controls from a media video. In my particular case, I want to remove the "Download" button from the controls, see: Screenshot of a video player with the control options opened

Score:1
fj flag

The easiest workaround I could find was:

  • Create a template on your custom theme for the video field such as file-video.html.twig.
  • Inside the template, create a video tag and place videos inside a <source />, then set a new attribute for the video tag called ControlsList with a value of nodownload, like this:
<video {{ attributes.setAttribute('controlsList', 'nodownload') }}>
  {% for file in files %}
    <source {{ file.source_attributes }} />
  {% endfor %}
</video>

You could also set the attribute manually: <video ControlsList='nodownload'/>

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.