Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. Installation Problems
  3. Remove download button from HTML5 video player

Remove download button from HTML5 video player

Scheduled Pinned Locked Moved Installation Problems
2 Posts 2 Posters 1.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Elsa Leguevaques
    wrote on last edited by
    #1

    Hello,

    I am showing videos and I love the html5 player that comes with laytheme. However I need to remove the download button. I found this code online:
    <video oncontextmenu="return false;" id="myVideo" autoplay controls controlsList="nodownload">
    <source src="uploads/videos/<?php echo $vid;?>" type="video/mp4">
    </video>

    as well as this other tip: "Just add controlsList="nodownload" in your video tag."

    But I haven't been able to locate where to add any of them.
    I tried Customize CSS and add HTML in the page before and after my video but what happened is it added an empty player, either after my video or actually deleting my video.

    Also, I am now posting from my personal account, I have lost the Laytheme Forum password to my professional account and haven't been able to retrieve it (I have tried the password reset many times)

    Thank you for your help!

    1 Reply Last reply
    0
    • RichardR Offline
      RichardR Offline
      Richard
      Global Moderator
      wrote on last edited by
      #2

      Dear @Elsa-Leguevaques

      Try adding the following code:

      <script>
          window.laytheme.on("newpageshown", function(layoutObj, type, obj){
              jQuery('video').attr('controlslist',"nodownload");
              
          });
      </script>
      

      Within the "custom <head> content" of Lay Options - Custom CSS & HTML
      Screen Shot 2020-09-14 at 2.51.54 PM.png

      Best :)
      Richard

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      I also code custom websites or custom Lay features.
      šŸ’æ Email me here: šŸ’æ
      info@laytheme.com

      Before you post:
      1. When using a WordPress Cache plugin, disable it or clear your cache.
      2. Update Lay Theme and all Lay Theme Addons
      3. Disable all Plugins
      4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

      This often solves issues you might run into

      When you post:
      1. Post a link to where the problem is
      2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
      3. If the problem is difficult to explain, post screenshots / link to a video to explain it
      Online Users
      Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
      laytheme.com
      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Recent
      • Tags
      • Popular
      • Users
      • Search