Skip to content

Instantly share code, notes, and snippets.

@hbaqai
Created January 20, 2018 18:24
Show Gist options
  • Save hbaqai/e5e5b50cb0a2f28372aaeba55c2d4476 to your computer and use it in GitHub Desktop.
Save hbaqai/e5e5b50cb0a2f28372aaeba55c2d4476 to your computer and use it in GitHub Desktop.
CruzHacks2018
<!DOCTYPE HTML>
<html>
<body>
<script src="https://static.opentok.com/v2/js/opentok.js" charset="utf-8"></script>
<script charset="utf-8">
const apiKey = 'YOUR-API-KEY';
const sessionId = 'YOUR-SESSION-ID';
const token = 'YOUR-TOKEN';
const session = OT.initSession(apiKey, sessionId);
session.on({
streamCreated: (event) => {
session.subscribe(event.stream);
}
})
session.connect(token, (error) => {
const publisher = OT.initPublisher();
session.publish(publisher);
})
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment