Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Record lesson as completed when user finishes watching vimeo video

I built a website in laravel 5 that have training lessons with videos about various subjects. I use vimeo as my video library. Can anybody tell me how does laracasts or udemy mark the lesson as completed when the user finishes watching a video? I tried to google it with no luck.

like image 884
rafiaTech Avatar asked Jul 29 '15 02:07

rafiaTech


People also ask

Can you track views on Vimeo?

To track detailed analytics on each of your videos, select the Stats tab which can give the access information about who is watching your video, where they're from, and what devices they use.

Can you add a link to the end of a Vimeo video?

To add an end screen to your Vimeo video: Go to the Interaction tools tab in your video settings and scroll down to select After video. Select the End screen dropdown menu now.

How do I stop videos from showing at the end of Vimeo?

All the options listed above can be found by navigating to your video's Settings > Interaction tools > After video. Open the End screen drop-down menu to choose your end screen.

Can you edit Vimeo videos?

To edit a video, you can either tap on the video itself or on the 3 dots near the video you would like to edit. 2. When tapping on the 3 dots, tap on Edit to proceed to the Vimeo Create Editor. You can also choose to download, share or delete your video.


1 Answers

Vimeo has an API that can fire a javascript event if the video ends, check developer guide on vimeo. In the OnFinish event you can do an ajax call that marks the video as watched. You can even use the onPlayProgress event and mark the video as watched when someone has watched a video for, let's say 90%, based on getCurrentTime() and getDuration()

Check this codepen for a detailed example on the API usage.

like image 81
KristofM Avatar answered Sep 20 '22 19:09

KristofM