Skip to content

Optionally prevent right-click context menu on video canvas#376

Closed
joneug wants to merge 1 commit into
polimediaupv:mainfrom
joneug:prevent-context-menu
Closed

Optionally prevent right-click context menu on video canvas#376
joneug wants to merge 1 commit into
polimediaupv:mainfrom
joneug:prevent-context-menu

Conversation

@joneug
Copy link
Copy Markdown

@joneug joneug commented Apr 24, 2025

This patch adds a configuration option to prevent the context menu that shows up when right-clicking into the video canvas. This makes downloading video files less straightforward.

This change is analogous to the following one in Opencast's bundled Paella player. Making this a core feature has the advantage that it can also be configured for, e.g., LMS plugins that bundle their own Paella player.

https://github.com/opencast/opencast/blob/8e7c5a3811b13472e2025944f0dfb76fde2f96a4/modules/engage-paella-player-7/src/js/PaellaOpencast.js#L256

This patch adds a configuration option to prevent the context
menu that shows up when right-clicking into the video canvas.
This makes downloading video files less straightforward.

This change is analogous to the following one in Opencast's
bundled Paella player. Making this a core feature has the advantage
that it can also be configured for, e.g., LMS plugins that bundle
their own Paella player.

https://github.com/opencast/opencast/blob/8e7c5a3811b13472e2025944f0dfb76fde2f96a4/modules/engage-paella-player-7/src/js/PaellaOpencast.js#L256
@joneug
Copy link
Copy Markdown
Author

joneug commented Apr 29, 2025

@ferserc1 Could you please review this pull request?

@ferserc1
Copy link
Copy Markdown
Collaborator

The right-click download only affects videos whose container is an HTML video. There are other types of canvas that do not use an HTML video, such as those based on WebGL (which is used for 360º videos). This pull request may interfere with these types of canvas.

The correct location to implement this function would be the es.upv.paella.videoCanvas plugin.

On the other hand, since the release of paella-core 2 we are not adding new features to paella-core 1. If you need this functionality in paella-core version 1, it is best to implement a canvas plugin that implements this option.

https://paellaplayer.upv.es/#/doc/canvas_plugin.md

For paella-core 2 I am going to implement this function in the HTML canvas plugin, because I find it quite interesting.

@ferserc1 ferserc1 closed this May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants