Created
January 20, 2018 18:24
-
-
Save hbaqai/e5e5b50cb0a2f28372aaeba55c2d4476 to your computer and use it in GitHub Desktop.
CruzHacks2018
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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