Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
JMM
Experienced
Topic Author
Posts: 154
Joined: 02 Aug 2021, 11:18

Preventing downloading of videos in galleries (non-embedded)

19 Jul 2023, 05:31

Hello, Karl,

I have a page (gallery) HERE, which contains a few MP4 videos, and their respective associated preview images.

The videos are hidden, and for each of the preview images, their links point to their respective videos:
Image
...you can't see it in the screenshot, but the MP4 filenames are at the end of the blue link.

Now, somewhere on one of my X3 sites, for 2 or 3 videos (not videos using <video>), I discovered that I could add ?autoplay=1 after the filename to have it automatically start playing (I can't remember where I used that trick, or in what situation.

Back to this gallery, I have downloading disabled on all my X3 sites, and my question here in this post is, am I able to prevent downloading of the videos in this gallery somehow, perhaps using something similar to the ?autoplay=1 trick?

Currently there are 2 ways that users can download these videos: 1.) by selecting Download using the 3 vertical-dots in the lower-right corner of playing videos, and 2.) by right-clicking on the playing video itself.

When embedding videos using <video>, I know that I can use controlsList="nodownload" to disable the Download option to be displayed with the 3 vertical-dots.  Is there a Custom CSS that I can add to this gallery to prevent the Download option being displayed with the 3 vertical-dots?

As for the users right-clicking the videos when they are open, the download (Save video as...) option in this case is controlled by the browser, so I would imagine that there is no way that I can prevent downloading by right-clicking, but I've visisted some sites over the years that prevented me from right-clicking on pages/images/videos altogether, so just wondering if X3 can prevent that too.  No big deal if it's not possible, or too difficult to prevent.

Thanks in advance & have a great day.

Regards,
John
Location: Burlington (Toronto-ish), Ontario, Canada
Self-hosted using Abyss Web Server:   AuroraWings.me   |   GalleryWings.com   |   PanAurora-Studio.com   |
Externally-hosted using LiteSpeed/Apache Web Server:   GenealogyWings.com/galleries   |
 
metallissimus
Experienced
Posts: 331
Joined: 17 Oct 2019, 06:54

Re: Preventing downloading of videos in galleries (non-embedded)

19 Jul 2023, 06:30

Under Settings > Advanced there is an option "Block image downloads". This prevents right click and also blocks video downloads.
www.danielbollinger.de – corporate photography
hochzeiten.danielbollinger.de – wedding photography
 
User avatar
JMM
Experienced
Topic Author
Posts: 154
Joined: 02 Aug 2021, 11:18

Re: Preventing downloading of videos in galleries (non-embedded)

19 Jul 2023, 07:43

Thanks, Daniel, but I already have image downloads blocked on all my sites since I first started using X3 a few years ago.  It's the video files that I was inquiring about blocking.  It's fine if I can't block the video downloads, I just thought I would ask.

Thanks anyway, sir, and have a great day.
Location: Burlington (Toronto-ish), Ontario, Canada
Self-hosted using Abyss Web Server:   AuroraWings.me   |   GalleryWings.com   |   PanAurora-Studio.com   |
Externally-hosted using LiteSpeed/Apache Web Server:   GenealogyWings.com/galleries   |
 
User avatar
JMM
Experienced
Topic Author
Posts: 154
Joined: 02 Aug 2021, 11:18

Re: Preventing downloading of videos in galleries (non-embedded)

19 Jul 2023, 07:44

Oh, I just read your reply again.  It doesn't seem to block videos, as all the videos in that gallery are downloadable.
Location: Burlington (Toronto-ish), Ontario, Canada
Self-hosted using Abyss Web Server:   AuroraWings.me   |   GalleryWings.com   |   PanAurora-Studio.com   |
Externally-hosted using LiteSpeed/Apache Web Server:   GenealogyWings.com/galleries   |
 
User avatar
JMM
Experienced
Topic Author
Posts: 154
Joined: 02 Aug 2021, 11:18

Re: Preventing downloading of videos in galleries (non-embedded)

19 Jul 2023, 07:56

Interesting... we are both correct  :slight_smile:.  If I unhide my videos, then X3 will prevent right-clicking and also remove download from the 3-vertical dots.  However, in order for me to get the 5 columns of videos across the full-width of the screen, without the hassle of setting the videos up using the Content tab, I have corresponding preview images for each video that is displayed 5 columns across the screen in grid-view, and each preview image opens up its corresponding MP4 file, instead of opening up the image.
Location: Burlington (Toronto-ish), Ontario, Canada
Self-hosted using Abyss Web Server:   AuroraWings.me   |   GalleryWings.com   |   PanAurora-Studio.com   |
Externally-hosted using LiteSpeed/Apache Web Server:   GenealogyWings.com/galleries   |
 
metallissimus
Experienced
Posts: 331
Joined: 17 Oct 2019, 06:54

Re: Preventing downloading of videos in galleries (non-embedded)

19 Jul 2023, 11:11

I don't have videos on my site, I just read the info about the setting. Sorry if my reply wasn't really of any help. It looks like the master himself is needed :)
www.danielbollinger.de – corporate photography
hochzeiten.danielbollinger.de – wedding photography
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Preventing downloading of videos in galleries (non-embedded)

20 Jul 2023, 00:06

As far as I can see, as long as you are opening mp4 files directly in new window, X3 can't and doesn't control them. Furthermore, you can't control a video when opening it directly in browser like this, because you can't assign ?parameters in the url?param1=false. And even if you could block downloads by CSS, you can't assign CSS to an MP4 file that opens directly in browser.

Normally, when embedding a video, you could use attributes as posted here.
Code
<video autoplay controls controlsList="nodownload"> ...
The controlsList="nodownload" will block download button, and autoplay will attempt to autoplay. Keep in mind, autoplay may work without this option, depending on various factors: Is it desktop or mobile? Does the video include audio? (audio may block autoplay). Was the video triggered specifically by a user click?

In your case, if you want to control videos, you would need to build a wrapper file video.html, with your own <video> embed code included, and then you could send videos to it like "video.html?src=path/to/video.mp4". It would require some basic javascript or PHP to get the query and populate the document <video> SRC. You might want to try the X3 Popup link target option, just to see what results that yields.
 
User avatar
JMM
Experienced
Topic Author
Posts: 154
Joined: 02 Aug 2021, 11:18

Re: Preventing downloading of videos in galleries (non-embedded)

21 Jul 2023, 01:57

Completely understood, no problem.  I'm in the process of converting that gallery to use block-grids with video tags, which solves the problem.

Thanks for your reply, and have a great day.
Location: Burlington (Toronto-ish), Ontario, Canada
Self-hosted using Abyss Web Server:   AuroraWings.me   |   GalleryWings.com   |   PanAurora-Studio.com   |
Externally-hosted using LiteSpeed/Apache Web Server:   GenealogyWings.com/galleries   |