Skip to content

Instantly share code, notes, and snippets.

@jchang419
Created June 16, 2016 00:08
Show Gist options
  • Select an option

  • Save jchang419/a87a0188aaed55de77ddb20f126d1999 to your computer and use it in GitHub Desktop.

Select an option

Save jchang419/a87a0188aaed55de77ddb20f126d1999 to your computer and use it in GitHub Desktop.
function rePublish() {
session.unpublish(publisher);
// using initPublisher will work once
//publisher = OT.initPublisher();
session.publish(publisher, function(err) {
if (err) {
console.log(err);
} else {
console.log('republish');
}
});
console.log('switched camera');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment