Is that possible to save the plays that a video (HTML5 based
) was played in a Database?
If yes, how?
I properly search for this answer, not so lucky.
Is that possible to save the plays that a video (HTML5 based
) was played in a Database?
If yes, how?
I properly search for this answer, not so lucky.
Two things you'll need. First you need to figure out your events. If you just want the play event, you can add an event listener.
Something like the following (not using jquery)
var _video = document.getElementById("video");
_video.addEventListener("playing", play_clicked, false);
function play_clicked() {
/* Put your tracking function here */
alert("play was clicked");
}
To track it, I would use some Analytics, Google Analytics is a good one.
Here are some links to help you along a bit further:
Previously Asked Question (with answer)
A page showing example of how to track all kinds of video events