Created
June 3, 2014 13:42
-
-
Save jasonblanchard/2a29a3bb89244ba5d9ea to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| <script> | |
| var apiKey = '<%= Rails.application.config.tokbox_api_key %>'; | |
| var sessionId = '<%= session_id %>'; | |
| var token = '<%= token %>'; | |
| var session = OT.initSession(apiKey, sessionId); | |
| session.on("streamCreated", function(event) { | |
| session.subscribe(event.stream); | |
| }); | |
| session.connect(token, function(error) { | |
| var publisher = OT.initPublisher(); | |
| session.publish(publisher); | |
| }); | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment