Disable right-click on audio playlist similar to right-click [audio] shortcode?
-
Not sure if this is a css question, but here’s the situation:
I’m wondering if there’s a way to disable right-click/save on a song in an audio playlist. For example:This is the result I want:
When I right-click on an individual song posted inside an audio tag:
[audio mp3="songlocationandtitle"][/audio]
there’s NOT an option to save the song.This is the result I do NOT want:
When I right-click on an individual song within a playlist (shortcode) there’s an option to save the song.I’m using the Edin theme and examples for what I’ve described above are on this work in progress page:
The blog I need help with is: (visible only to logged in users)
-
Hi there, since the “right-click” is a function of the browser, the only way to do that would be to use Javascript, which cannot be used on the WordPress.com Premium plan. It could only be used on the Business plan. The other thing to consider is that this really isn’t a way to keep people from downloading the file since the file URL is contained in the HTML for the web page so anyone can view the source code and get the URL. A good number of web users know about that way of getting images and URLs.
-
thesacredpath,
Thanks so much for your response! I think I misstated my question. Both examples I gave allow for right-click, and I’m okay with allowing it.The difference is that – at least on a PC – when right-clicking on the playlist the menu provides an option to save the file, while right-clicking on the individual [audio] player, the menu does NOT give an option to save it. On my android phone, neither menu gives an option to save, just to share the link.
I’m mainly looking for a deterrent to make stealing too much work, and therefore not worth the trouble. :) I know I can’t make someone be ethical, but I can try to be – specifically, trying to prevent downloads I can’t count/pay royalties on. If someone is going to steal for the love of 99 cents, there’s not much I’ll be able to do about it.
I have a javascript player on my actual website, but some phones can’t display it, so I’ve embedded a wordpress.com page containing the playlist on web page as an alternative.
-
I think the browsers on most mobile devices do not give the option to save on the audio files.
There aren’t any built-in ways to limit downloads on a playlist. We can do a bit of styling changes via CSS, but we can’t change the functionality of the player/playlist.
With the WordPress.com Business plan upgrade, you are able to use plugins, and there are quite a few players out there and I’m sure some of them have more configuration options.
- The topic ‘Disable right-click on audio playlist similar to right-click [audio] shortcode?’ is closed to new replies.