• Resolved BX12

    (@b-p)


    Apparently the Google Chrome browser adds/overlays a Download button (via three dots on right) to the WordPress audio player (audio block). This needs to be disabled, removed, blocked forever! This does not happen with Firefox or Edge. Does anyone know how to block Chrome from doing this using CSS in theme or a script on the post/page?

    • This topic was modified 4 years, 6 months ago by Jan Dembowski.
Viewing 10 replies - 1 through 10 (of 10 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Please provide a link to a page on your site where we can see this. Thanks. Note: Your link will be public and we will not later remove it.

    Thread Starter BX12

    (@b-p)

    Hi Steve, Thank you for your quick reply.
    Here’s a perfect example at WordPress.com/support/… You’ll see the WordPress audio player at the top of the page. Looking at it in Chrome, you’ll see three horizontal dots on the right that open to a Download button. Then looking at it in Firefox or Edge, there are no dots, no download button. You’ll also see that the color changes.
    I want to know how to block/prevent/band/whatever Chrome from adding/overlaying this download button on my sites globally or by post/page.
    Your help is much appreciated.
    Brad

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    This is not a WordPress thing; it’s something Chrome adds to the HTML5 audio player. I suggest asking in one of the various Chrome support forums.

    https://www.google.com/search?q=chrome+disable+download+link+audio+player

    Thread Starter BX12

    (@b-p)

    About your link, I already found all that. None provide a fix.
    Thank you for your reply.

    Thread Starter BX12

    (@b-p)

    Here’s the fix.

    Add this controlsList="nodownload as shown below.

    <figure class="wp-block-audio alignright"><audio controls src="https://www.YOUR-WEBSITE.com/wp-content/uploads/YOUR-MUSIC.mp3" controlsList="nodownload"></audio></figure>

    The editor will then prompt you to convert to an HTML block. You can do this before adding the code if you want.

    • This reply was modified 4 years, 6 months ago by BX12.
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Thanks for sharing!

    Thread Starter BX12

    (@b-p)

    Steve, Absolutely.

    Thread Starter BX12

    (@b-p)

    To disable and prevent right-click download, add this to the post/page’s “Body Scripts” section.

    <script>
    (function($){
      $(document).on('contextmenu', 'audio', function() {
          return false;
      })
    })(jQuery);
    </script>
    

    Awesome! Just what I was looking for. Thanks for sharing the solution @b-p.

    Thread Starter BX12

    (@b-p)

    @candicer.
    ??
    Brad @b-p

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Remove WordPress audio player Download button added by Chrome’ is closed to new replies.