presents an age gate that users must pass before videos are playable.
<video id="video" src="movie.mp4" controls></video>
<script src="video.js"></script>
<script src="videojs-ageGate.js"></script>
<link href="videojs-ageGate.css" rel="stylesheet">
<script>
var player = videojs('video');
var minimumDate = new Date();
minimumDate.setFullYear(minimumDate.getFullYear() - 18);
player.ageGate({
minDate: minimumDate,
promptMessage: 'Please enter your birth date',
deniedMessage: 'Sorry, the content creator has limited views of this video to people aged 18 and older'
});
</script>
After failing the age gate, users can get another crack at it by simply reloading that page. That works for our needs, but the plugin should probably be configurable to make retrys harder?