• Colleagues, please tell me how to make sure that on the landing (Elementor pro) was placed a video file, when interacting with which, the user after 5 minutes of viewing – the content is blocked. The user is then asked to enter their email to continue viewing. After entering, viewing continues.

    According to the idea it is possible to realize a similar thing through the component: “Video”, filling in the “End Time”, and then by timer pop-up with a request for mail, and after sending mail, redirect the user to another page without the “End Time”. But that would be OK if the video from WordPress’ own site in the WordPress player didn’t keep going after clicking on the video. That is, “End Time” is actually just a pause, not the end of the video. “End Time” only works with a YouTube video, but there you can go to YouTube itself and watch the entire video without entering your email.

    You can, of course, pre-load the video from a hosting 5 minutes, but then you need some way to fake meta-data clip to the user the length of the clip displayed not as 5 minutes, but as its full length (the original file).

    Maybe someone came across plugins that solve this problem?

    • This topic was modified 1 year, 9 months ago by cokojiova.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The functionality you are describing requires a combination of video player customization and lead capture tools. To the best of my knowledge, there isn’t an out-of-the-box solution for this specific use-case, but you can try to achieve this functionality by combining different tools/plugins. Here’s a general approach to solving this:

    1. Custom Video Player: You may need a custom video player that supports events. A popular custom video player for WordPress is Video.js. You could use this to display your video and attach an event listener that is triggered after 5 minutes of playback. You might want to hide the video controls to ensure the user cannot just skip ahead.
    2. Lead Capture / Modal Popup: You will need a way to present the user with a lead capture form after the 5 minutes are up. There are many popup and lead capture plugins for WordPress, such as Popup Maker or Elementor’s Popup Builder, as you are using Elementor Pro.
    3. Combine Video Player with Lead Capture: You will need some custom JavaScript that ties the video player and the lead capture together. Specifically, you could write a script that listens for the video reaching the 5-minute mark, and when that happens, it triggers the lead capture popup.
    4. Email Capture and Continue Video: Once the user enters their email, you can use AJAX to store their email without refreshing the page, then programmatically continue the video where it left off or redirect them as needed.

    Remember that you should inform users that their email is required to view the full video content beforehand, in accordance with GDPR and other privacy laws.

    Here’s a rough idea of what the JavaScript might look like (this is just a starting point and you would need to tailor it to the specific video player and popup plugin you are using):

    document.addEventListener('DOMContentLoaded', function() {
      var videoPlayer = document.getElementById('my-video');
      
      videoPlayer.addEventListener('timeupdate', function() {
        if (videoPlayer.currentTime >= 300) { // 300 seconds is 5 minutes
          videoPlayer.pause();
          // Trigger your popup here
        }
      });
    });

    Because this approach is somewhat technical, if you are not comfortable with coding, you might consider hiring a developer or working with someone who has experience with WordPress development to help you implement this feature.

    Best regards,

    Christopher Amirian

    Thread Starter cokojiova

    (@cokojiova)

    @christopheramirian Thanks a lot, you’re super!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How do I restrict access to content?’ is closed to new replies.