7: hair check

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!-- 
  This example automatically connects to the camera when the page loads but waits for a button click to start recording (giving the user time to check thier hair :) )
-->

<html>
  <head>
    <script src='https://code.jquery.com/jquery-2.1.4.min.js' type='text/javascript'></script>
    <script src='//cameratag.com/api/v11/js/cameratag.min.js' type='text/javascript'></script>
    <link rel='stylesheet' href='//cameratag.com/static/11/cameratag.css'></link>

    <script>
      CameraTag.observe("DemoCamera", "initialized", function(){
        CameraTag.cameras["DemoCamera"].connect();
      })

      $(function(){
        $("#start_recording").click(function(){
          CameraTag.cameras["DemoCamera"].record();
        })  
      })
    </script>

  </head>
  <body>
    <button id="start_recording">START RECORDING</button>
    <camera id='DemoCamera' data-app-id='63f9c870-72c4-0130-04c5-123139045d73' data-record-on-connect='false'></camera>
  </body>
</html>