Erster Commit

This commit is contained in:
2026-08-22 08:40:29 +02:00
commit 875477d425
1961 changed files with 930336 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
import { TrackSource } from "@livekit/protocol";
function trackSourceToString(source) {
switch (source) {
case TrackSource.CAMERA:
return "camera";
case TrackSource.MICROPHONE:
return "microphone";
case TrackSource.SCREEN_SHARE:
return "screen_share";
case TrackSource.SCREEN_SHARE_AUDIO:
return "screen_share_audio";
default:
throw new TypeError(`Cannot convert TrackSource ${source} to string`);
}
}
function claimsToJwtPayload(grant) {
var _a;
const claim = { ...grant };
if (Array.isArray((_a = claim.video) == null ? void 0 : _a.canPublishSources)) {
claim.video.canPublishSources = claim.video.canPublishSources.map(trackSourceToString);
}
return claim;
}
export {
claimsToJwtPayload,
trackSourceToString
};
//# sourceMappingURL=grants.js.map