<!DOCTYPE html>
<html>
<head>
  <title>Hardware Setup Demo</title>

  <script src="//static.opentok.com/webrtc/v2.2/js/opentok.js"></script>

  <link rel="stylesheet" type="text/css" href="/css/opentok-hardware-setup.css">
  <script src="/js/opentok-hardware-setup.js"></script>

</head>
<body>

  <div>
    <div id="hardware-setup"></div>
  </div>

  <script type="text/javascript">

    var element = document.querySelector('#hardware-setup');

    var component = createOpentokHardwareSetupComponent(element, {
      insertMode: 'append'
    }, function(error) {
      if (error) {
        console.error('Error: ', error);
        document.querySelector('#hardware-setup').innerHTML = '<strong>Error getting ' +
          'devices</strong>: ' + error.message;
        return;
      }

      var button = document.createElement('button');
      button.onclick = component.destroy;
      button.appendChild(document.createTextNode('Destroy'));
      element.appendChild(button);

    });

  </script>

</body>
</html>

<!DOCTYPE html>
<html>
<head>
  <title>Hardware Setup Demo</title>

  <script src="//static.opentok.com/v2/js/opentok.js"></script>

  <link rel="stylesheet" type="text/css" href="css/opentok-hardware-setup.css">
  <script src="js/opentok-hardware-setup.js"></script>

</head>
<body>

  <div>
    <div id="hardware-setup"></div>
  </div>

  <script type="text/javascript">

    var element = document.querySelector('#hardware-setup');

    var component = createOpentokHardwareSetupComponent(element, {
      insertMode: 'append'
    }, function(error) {
      if (error) {
        console.error('Error: ', error);
        document.querySelector('#hardware-setup').innerHTML = '<strong>Error getting ' +
          'devices</strong>: ' + error.message;
        return;
      }

      var button = document.createElement('button');
      button.onclick = component.destroy;
      button.appendChild(document.createTextNode('Destroy'));
      element.appendChild(button);

    });

  </script>

</body>
</html>

Update to use the latest version of OpenTok.js
Update to use the latest version of OpenTok.js

... in index.html, plus other minor changes to the src paths.