0.0.2 • Published 1 year ago

daily-opentok-node v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

daily-opentok-node

This library is a drop-in replacement for the opentok npm package. This allows a user to create rooms in Daily using the same API. Use this as a first step towards migrating from OpenTok to Daily.

Install via npm:

npm install daily-opentok-node

When requiring the library in your project, change the following line:

const OpenTok = require("opentok");

to this:

const OpenTok = require("daily-opentok-node");

Also when creating a new OT object, replace any occurrences of the following code:

const OT = new OpenTok("openTokAPIKey", "openTokAPISecret");

with this:

const OT = new OpenTok("dailyApiKey");
await OT.getDomainID();

💡 Note: Daily’s authentication flow is a bit different than the OpenTok flow, so we have to include a call to getDomainID().