Skip to content

Instantly share code, notes, and snippets.

@jchang419
Created June 15, 2016 23:56
Show Gist options
  • Select an option

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

Select an option

Save jchang419/67f61083d81e71f15d0ed3a167b44045 to your computer and use it in GitHub Desktop.
publish failure
function rePublish() {
session.unpublish(publisher);
publisher.destroy();
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