Video Gallery: How to hide Download button in player

Want to keep your Video Gallery player a little cleaner — or simply prefer visitors to watch your videos on the website rather than download them?

By default, the player includes a Download button, and there’s currently no built-in setting to hide it. But you can easily remove it with a small Custom JS tweak.

Just add the following script to the Custom JS field on the Settings tab of your widget:

util.waitForElement('.es-playlist-player-view-player-wrap').then(player => {
  new MutationObserver(() => {
    const video = player.querySelector('.es-media-video-player video:not([data-processed])');
    if (!video) return;
    video.setAttribute('controlsList', 'nodownload');
    video.setAttribute('data-processed', '');
  }).observe(player, {
    childList: true,
    subtree: true
  });
});

Note: Custom JS doesn’t function in the preview mode, so you can check the result right on your website or through the Share Link


Before:


After:


Folks, was this solution helpful? Let us know in the comments below :wink:

2 Likes