feat: increased turn cred duration, and fixed gateway crashing

This commit is contained in:
=
2025-03-09 21:15:10 +05:30
parent f68602280e
commit b055cda64d
2 changed files with 53 additions and 39 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
import crypto from "node:crypto";
const TURN_TOKEN_TTL = 60 * 60 * 1000; // 24 hours in milliseconds
const TURN_TOKEN_TTL = 24 * 60 * 60 * 1000; // 24 hours in milliseconds
export const getTurnCredentials = (id: string, authSecret: string, ttl = TURN_TOKEN_TTL) => {
const timestamp = Math.floor((Date.now() + ttl) / 1000);
const username = `${timestamp}:${id}`;