Skip to content

Instantly share code, notes, and snippets.

@DanyF-github
Created January 8, 2021 10:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DanyF-github/a34f38a8bdead0aac5f9ff12e43cd46e to your computer and use it in GitHub Desktop.
Save DanyF-github/a34f38a8bdead0aac5f9ff12e43cd46e to your computer and use it in GitHub Desktop.
// server/src/services/vonage/videoApi.js
...
const opentokSessionArgs = {
mediaMode: 'routed',
};
...
const createSession = () => {
return new Promise((resolve, reject) => {
opentok.createSession(opentokSessionArgs, (err, session) => {
if (err) {
reject(err);
} else {
resolve(session);
}
});
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment