Disable right-klick menu in embedded video

Is there a way (option) to disable the right-klick menu in an embedded video? This menu gives options for copying links.

if you do it in iframe… then try this.

Still the problem remains that visitors can click on the PeerTube word and go to your video…

I found a way to do this.

 Edit /var/www/peertube/peertube-latest/client/dist/standalone/videos/embed.html

 Add this before </head> :

 <style> .vjs-contextmenu-ui-menu { display: none !important; } </style>

Then restart peertube with:

 systemctl restart peertube

The Peertube embed video context menu (right-click) that allowed to Copy URL won’t show anymore.

As others have pointed out here and elsewhere this won’t prevent people from getting the URL. At least it won’t make it trivially easy without the Inspector.

You can add custom css directly in the admin interface (page /admin/config/edit-custom#advanced-configuration , at the end). No need to edit Peertube’s code.

Thanks, TIL.

However I’ve had to further edit the embed.html file in order to disable the second context menu, the browser’s right-click context menu.

I changed the body declaration into this:

<body id="custom-css" class="standalone-video-embed" oncontextmenu="return false" onselectstart="return false" ondragstart="return false">