Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M"
crossorigin="anonymous">
<script src="https://unpkg.com/smile-to-unlock@latest/dist/smiletounlock.js"></script>
<style>
.embed-container {
position: relative;
padding-bottom: 56.25%;
height: 0;
overflow: hidden;
max-width: 100%;
}
.embed-container iframe,
.embed-container object,
.embed-container embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-12">
<div class='embed-container'>
<iframe src='https://www.youtube.com/embed/92GHdmnDiFE' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
<smile-to-unlock-hider></smile-to-unlock-hider>
<smile-to-unlock api-key="1fd73c6345e449ee8f8b0febc33cf300"></smile-to-unlock>
</div>
</div>
</div>
</div>
<script>
(function() {
var hider = document.querySelector('smile-to-unlock-hider');
var locker = document.querySelector('smile-to-unlock');
// This event is called when the user has clicked Smile To Unlock
hider.addEventListener("readyToSmile", function (ev) {
// Starts the locker full screen
locker.start();
// This event is sent when the user has smiled
locker.addEventListener("userSmiled", function (ev) {
console.log(ev.detail.score);
// Hide the hider so we show the content
hider.hide();
// End the locker so the camera is shutdown
locker.end();
})
})
})();
</script>
</body>
</html>