Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
43 lines (31 sloc) 1008 Bytes
<!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>