mardi 17 février 2015

How to host a video on a website while controlling the view count/view manner per user?


I am building a website where I want to display a video to my users, and make sure that the user can only watch it one time without any control over the video. I want to show the video to the user later after the user goes through some process, that second time the user should have control over the video. This means that:



  1. Controls should be disabled (the user can't pause, rewind, forward, etc..)

  2. It should not be possible to see the video again by refreshing the page

  3. The user should not be able to download the video to watch it again.

  4. The controls should be enabled again only after a sequence of steps are made by the user (e.g. clicking a button)


As for 1, I tried setting the controls attribute in html5's <video> element to false as shown here. But when you refer to an actual video the user can then be able to right click and show controls (e.g. http://ift.tt/1E3eFzb).


I think I'll handle 2 using JS flags or backend sessions, as long as I can have access to event listeners (e.g. video.onended).


3 is not possible using html5, 4 is possible but I can't hide the controls in the first place..


How do I do that? or should I use a third-party library?





Aucun commentaire:

Enregistrer un commentaire