Page 1 of 1

video player

Posted: 12 Dec 2017, 14:32
by masquefotos
Hello.
How can I remove the download link of the video player?

Re: video player

Posted: 12 Dec 2017, 22:02
by mjau-mjau
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;
  });
}

Re: video player

Posted: 14 Jan 2018, 11:14
by masquefotos
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 14700 times

Re: video player

Posted: 14 Jan 2018, 22:58
by mjau-mjau
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.

Re: video player

Posted: 15 Jan 2018, 10:35
by masquefotos
I have done what you told me and now I do not upload the videos  :scream:

Re: video player

Posted: 15 Jan 2018, 23:05
by mjau-mjau
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\">

Re: video player

Posted: 16 Jan 2018, 08:47
by masquefotos
I do not know what I'm doing wrong but it can be downloaded again
I will wait for the new update
Gracias Karl

Re: video player

Posted: 16 Jan 2018, 12:17
by mjau-mjau
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?

Re: video player

Posted: 16 Jan 2018, 18:09
by masquefotos

Re: video player

Posted: 17 Jan 2018, 01:36
by mjau-mjau
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">

Re: video player

Posted: 18 Aug 2018, 04:07
by mjau-mjau
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