Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Add Option to hide controls in Youtube Video Formatter.
Comment | File | Size | Author |
---|---|---|---|
#2 | media_youtube-controls_in_formatter-2637826-2.diff | 2.36 KB | jadsay |
Comments
Comment #2
jadsay CreditAttribution: jadsay commentedPatch applied
Comment #3
jadsay CreditAttribution: jadsay commentedComment #4
dgtlmoon CreditAttribution: dgtlmoon commentedHave you tried the option Hide progress bar and player controls at
/admin/structure/file-types/manage/video/file-display
?Comment #5
NicolasH CreditAttribution: NicolasH commentedChoosing Hide progress bar and player controls under
/admin/structure/file-types/manage/video/file-display
will set theautohide=1
property, but not thecontrols=0
one. Autohide will still show the controls when hovering over the video.Example of rendered HTML:
<iframe class="media-youtube-player" width="640" height="390" title="TEST VIDEO" src="//www.youtube.com/embed/C0DPdy98e4c?wmode=opaque&modestbranding=1&rel=0&showinfo=0&autohide=1" frameborder="0" allowfullscreen="">Video of TEST VIDEO</iframe>
With and option to completely hide the controls it would be:
<iframe class="media-youtube-player" width="640" height="390" title="TEST VIDEO" src="//www.youtube.com/embed/C0DPdy98e4c?wmode=opaque&modestbranding=1&rel=0&showinfo=0&autohide=1&controls=0" frameborder="0" allowfullscreen="">Video of TEST VIDEO</iframe>
Comment #6
mhmhartman CreditAttribution: mhmhartman commentedThe patch added in https://www.drupal.org/node/2637826#comment-10683468 still applies to the latest version and does the job. It would be nice to see this in future versions.
Comment #7
joseph.olstadCommitted to 7.x-3.x dev branch
Thanks!