Prerequisites
To get the most out of this guide, you’ll need to:
Use the SDK
Now that you have the SDK installed and initialized, you can use it in your app.
Let’s create a stream.
Try it yourself
Learn how to create your first stream using the Livepeer Javascript SDK.
Prerequisites
Install the SDK
npm install livepeer
yarn add livepeer
pnpm install livepeer
bun install livepeer
Initialize the SDK
import { Livepeer } from "livepeer";
const livepeer = new Livepeer({
apiKey: "<api-key>", // Your API key
});
Use the SDK
import { Livepeer } from "livepeer";
const livepeer = new Livepeer({
apiKey: "<api-key>",
});
const main = async () => {
const { stream } = await livepeer.stream.create({
name: "Hello from JS SDK!",
});
console.log(stream);
};
main();
Try it yourself
Was this page helpful?