Skip to content

Commit

Permalink
fix: pubnub
Browse files Browse the repository at this point in the history
  • Loading branch information
0xcadams committed Apr 25, 2024
1 parent 0ab5fde commit 3295edc
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions examples/with-pubnub/src/app/actions.ts
Expand Up @@ -5,19 +5,15 @@ import { cookies } from "next/headers";

export const createLivestream = async () => {
try {
// const newStream = await createStream({
// name: "PubNub <> Livepeer Stream",
// });

// if (!newStream?.classes?.[0].streamKey) {
// return {
// success: false,
// error: "No stream key created.",
// } as const;
// }

cookies().set("stream-key", "26d5-g6vc-dnmq-umz6");
cookies().set("playback-id", "26d5m3zw80ejzby6");
if (process.env.STREAM_KEY && process.env.PLAYBACK_ID) {
cookies().set("stream-key", process.env.STREAM_KEY);
cookies().set("playback-id", "26d5m3zw80ejzby6");
} else {
return {
success: false,
error: "No stream key created.",
} as const;
}

revalidatePath("/");

Expand Down

0 comments on commit 3295edc

Please sign in to comment.