Auto-play videos, but with no download allowed
Posted: 16 Jun 2024, 02:41
- X3.32.0
- PHP 8.3.8
I have been holding off since last year posting this question, because I didn't know how to explain my question :thinking:.
First of all, on all my X3 sites, I have downloads disabled in Settings|Advanced.
On all my X3 sites, 99.9% of my content are images, but I do have a few videos.
In some of my galleries, I am using the <video> method in those galleries' Settings|Content field. I love this method as it is so customizable, and I am using this method for most of my videos.
On my X3 test site, I've created a folder HERE to help illustrate my question in this post.
The top item on the page is by using the Settings|Content method, and I can prevent downloads by adding nodownload to the controlslist:
Code
<video class="x3-style-frame" preload="metadata" controls controlslist="nodownload noplaybackrate" width="100%"
poster="{{path}}monkees_bars.png">
<source src="{{path}}monkees_no_audio.mp4" type="video/mp4">However, I have a very few galleries of videos where the Settings|Content method is not preferable, and where I wish to have images displayed normally, but when a user clicks on the picture it displays the video instead of the picture itself. I have been using this method successfully for the past year or more, and it basically works (almost) perfectly. I say almost, because I wish to be able to have the video automatically start playing when the picture is clicked on, which using some methods it works, but I also wish for those videos to not be downloadable.
So the requirements would be:
- start playing automatically when the picture is clicked on; and
- not to show the download selection when the video is playing
- (_self) with the #autoplay tag
- (popup window) with the #autoplay tag
- (X3 popup) with the #autoplay tag
- (X3 popup) with the ?autoplay tag
Of the 4 above methods, I would prefer to use the X3 popup method in #4. But although Download is not shown (as I wish), the video does not start playing automatically. And if I use #3, the video starts playing automatically (as I wish), but Download is shown.
Maybe the # and ? tags (or whatever they're called) are not the correct ones to use, and I should be using something different?
And maybe there's no way, when using X3 popup, to prevent the videos from being downloaded?
Thanks in advance.
Regards,
John