• Resolved cloudchan

    (@cloudchan)


    Dear Support,

    I have already installed “Copy Protection without Right Click” plugin to disable Right Click for all pages and posts successfully with no problem except the Player of All-in-One Video Gallery. I have also disabled the “Download Button” under “Player Control” options of “All-in-One Video Gallery” settings. And I have also put some scripts such as the following code to Snippet only in order to disable the Right Click on the Player of “All-in-One Video Gallery” . Nevertheless, I am still failed to make it work because I can still still use the Right Click on Player to download my video files.

    How can I disable the Right Click when I right-click the player of “All-in-One Video Gallery” ?


    add_action('wp_footer', function () {
    ?>
    <script>
    document.addEventListener('contextmenu', function (e) {
    e.preventDefault();
    });
    </script>
    <?php
    });

    Thanks for your help !

    Best Regards. Cloud

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support San Rosh

    (@sanrosh)

    Thanks for reaching out and for explaining the steps you’ve already taken in detail.

    In All-in-One Video Gallery, the video player can be initialized in two different modes:

    1. Iframe-based initialization (default)
    2. JavaScript-based initialization

    The issue you’re experiencing happens because right-click–blocking plugins and custom scripts cannot control the contents of an iframe due to browser security restrictions. As a result, any third-party script (including “Copy Protection without Right Click”) will not work on our iframe-based player, even though it works correctly elsewhere on your site.

    Solution:

    To allow your right-click–blocking script to work on our player, please switch the player to JavaScript-based initialization:

    1. Go to WordPress Admin → Video Gallery → Settings
    2. Open the Player tab
    3. Enable “Force JavaScript Based Initialization”
    4. Save the changes and clear any cache
    5. Check the player again

    Once this option is enabled, your existing right-click–disable scripts should start working on the player as expected.

    Additional Note (Recommended):

    Our PREMIUM version includes a built-in option to restrict right-click actions on the player, without relying on third-party plugins or custom scripts.
    You can see a working demo here:
    https://demo.plugins360.com/video/self-hosted-mp4/

    If you still notice any issues after switching to JavaScript-based initialization, please let us know and we’ll be happy to assist further.

    Thread Starter cloudchan

    (@cloudchan)

    Dear San,

    It works after enabling ““Force JavaScript Based Initialization”“.

    Thanks a lot for your reply & hints !

    I shall take a look for the  PREMIUM version i.

    Best REgards. Cloud

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.