Skip to content

Instantly share code, notes, and snippets.

@nfabian13
Created March 10, 2015 23:22
Show Gist options
  • Save nfabian13/b0364a207934f8112fa3 to your computer and use it in GitHub Desktop.
Save nfabian13/b0364a207934f8112fa3 to your computer and use it in GitHub Desktop.
Creating Object Session and Connecto to the session
var apiKey = '45173502';
var sessionId = "#{@room.session_id}"
var token = '#{@opentTok_token}';
// Create a session object
var session = OT.initSession(apiKey, sessionId);
// connect to the session
session.connect(token, function(error) {
if (error) {
console.log(error.message);
} else {
session.publish('myPublisherDiv', {width: 161, height: 121});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment