Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
masquefotos
Experienced
Topic Author
Posts: 140
Joined: 20 May 2011, 05:38

video player

12 Dec 2017, 14:32

Hello.
How can I remove the download link of the video player?
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: video player

12 Dec 2017, 22:02

masquefotos wrote:How can I remove the download link of the video player?
This is actually the browser and not X3. However, I see from this post that one can use a new attribute controlsList="nodownload", although I am not sure it works in all browsers.
Code
<video controls controlsList="nodownload">
  <source src="file.mp4" type="video/mp4">
</video>
I will look into this for next release. In the meantime, if you want to prevent right-click on video elements, you would have to add something like this to settings > custom > custom javascript:
Code
function x3_load(){
  $('body').on('contextmenu', 'video', function(e){
    return false;
  });
}
 
User avatar
masquefotos
Experienced
Topic Author
Posts: 140
Joined: 20 May 2011, 05:38

Re: video player

14 Jan 2018, 11:14

Thanks Karl for the new update
But the download button keeps showing up
Captura de pantalla 2018-01-14 18.11.04.png
Captura de pantalla 2018-01-14 18.11.04.png (730 Bytes) Viewed 13692 times
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: video player

14 Jan 2018, 22:58

masquefotos wrote:Thanks Karl for the new update
But the download button keeps showing up
Captura de pantalla 2018-01-14 18.11.04.png
Yes, sorry, this feature is still pending. In X3.24.3 we added block download for right-click on video, but we did not include a fix to remove the native html5 player download button for the video. To be honest, I forgot  :tired_face: :zipper_mouth: You can hack fix it:

1. Open /app/templates/d0/04/bd64c82959c74ad96030eed1b38adb44f11c884c77d15a0c11fcdf6d7e58.php in a text editor.

2. Find the line:
Code
echo "\t<video width=\"100%\" preload=\"metadata\" class=\"x3-style-frame\" controls>
3. Change it to:
Code
echo "\t<video width=\"100%\" preload=\"metadata\" class=\"x3-style-frame\" controls controlsList="nodownload">
4. Click SAVE anywhere in panel to force refresh of page templates when your website loads.
 
User avatar
masquefotos
Experienced
Topic Author
Posts: 140
Joined: 20 May 2011, 05:38

Re: video player

15 Jan 2018, 10:35

I have done what you told me and now I do not upload the videos  :scream:
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: video player

15 Jan 2018, 23:05

Sorry my mistake. "Quotes" needs to be escaped like this:
Code
echo "\t<video width=\"100%\" preload=\"metadata\" class=\"x3-style-frame\" controls controlsList=\"nodownload\">
 
User avatar
masquefotos
Experienced
Topic Author
Posts: 140
Joined: 20 May 2011, 05:38

Re: video player

16 Jan 2018, 08:47

I do not know what I'm doing wrong but it can be downloaded again
I will wait for the new update
Gracias Karl
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: video player

16 Jan 2018, 12:17

masquefotos wrote:I do not know what I'm doing wrong but it can be downloaded again
I will wait for the new update
Gracias Karl
Did you edit the code as in my last reply, and then click SAVE in settings to refresh page cache? Do you have a link to one of your pages with video?
 
User avatar
masquefotos
Experienced
Topic Author
Posts: 140
Joined: 20 May 2011, 05:38

Re: video player

16 Jan 2018, 18:09

 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: video player

17 Jan 2018, 01:36

I thought you meant for the GALLERY section, but these videos are custom embedded in your CONTENT section. If you are embedding videos with the <video> tag in your custom content, you will also need to include the controlsList="nodownload" attribute inside the video tag:
Code
<video width="100%" preload="metadata" controls controlsList="nodownload">
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: video player

18 Aug 2018, 04:07

In new X3.25.0, we have now added [controlsList="nodownload"] to videos when "block image" is enabled.
www.photo.gallery/blog/photo-gallery-X3-25/ | forum