Check progress of video views

Hi guys,

I m trying to understand how to check the progress of the time a user is watching a certain video on my platform.

For instance, if a video I uploaded is 4:00 min, I want to flag an icon when the user watch at least 2 Min.

How can I check this time progress?

Thank you!

Hi @gianlucabiancardi96,

You can use custom code to call bubble backend apis achieve this task as follows:

html

<script>
    // Get video element
    const video = document.getElementById('courseVideo');

    // Save progress periodically
    video.addEventListener('timeupdate', () => {
        saveProgress(video.currentTime);
    });

    // Clear progress on video end
    video.addEventListener('ended', () => {
        saveProgress(0); // Reset progress to 0
    });
</script>

Alternatively, you can use local storage for progress tracking, depending on your specific needs.

Let me know if you need further assistance!

Best regards,
Abdullah

you’d likely be best served by using a dedicated video service like mux - very affordable and the api is great. it gives you everything you need and is much better for video than bubble.

bubble storage is expensive (I use filestack + s3)
bubble video playback is very jumpy (I use mux as cdn and video playback optimizer - with mux you can get video as smooth as instagram feed)