added force end transmition for dispatchers

This commit is contained in:
PxlLoewe
2025-05-30 22:47:02 -07:00
parent eaedd78202
commit 6950e24e54
13 changed files with 179 additions and 100 deletions

View File

@@ -2,7 +2,7 @@ import { getServerSession } from "api/auth/[...nextauth]/auth";
import { ROOMS } from "_data/livekitRooms";
import { AccessToken } from "livekit-server-sdk";
import { NextRequest } from "next/server";
import { prisma } from "@repo/db";
import { getPublicUser, prisma } from "@repo/db";
/* if (!process.env.LIVEKIT_API_KEY) throw new Error("LIVEKIT_API_KEY not set");
if (!process.env.LIVEKIT_API_SECRET)
@@ -38,8 +38,13 @@ export const GET = async (request: NextRequest) => {
roomJoin: true,
canPublish: true,
canSubscribe: true,
canUpdateOwnMetadata: true,
});
at.attributes = {
publicId: user.publicId,
};
const token = await at.toJwt();
return Response.json({ token });