daravel_livekit 1.16.0
daravel_livekit: ^1.16.0 copied to clipboard
LiveKit server SDK for Daravel. Access tokens with video grants, the room service (rooms, participants, data) and verified webhooks.
Changelog #
1.14.0 #
- Added:
RoomServiceClientretries a Twirp call whose connection failed before it was sent, or that LiveKit answered 502 or 503, up toretries(2) more times with exponential backoff and jitter fromretryDelay(200 ms); timeouts and other answers are final.backoff(attempt)is public. - Added:
Livekit.webhookremembers each event id in the application's cache formaxAgeplus the skew and refuses a repeat with 401, so a captured webhook replayed inside the window is refused too. - Added
LivekitWebhookReceiver.maxAge(Livekit.webhook(request, maxAge:), five minutes, 30 s of skew): an event whosecreated_atis older, or in the future, is a 401, closing the replay window a token's lifetime left open;nullkeeps only the token check. - Fixed: an empty API secret no longer signs or verifies anything (
LivekitToken.toJwt,LivekitToken.verifyandLivekitWebhookReceiver.receivethrowStateError); with HS256 an empty key verified tokens signed with an empty key, so webhooks could be forged by anyone knowing the API key. Boot fails whenLIVEKIT_API_KEYis set butLIVEKIT_API_SECRETis not.
1.12.0 #
- First release:
LivekitTokenandVideoGrant(access tokens with LiveKit's claims),RoomServiceClient(rooms, participants, data messages over Twirp, each call with a 10-minute token carrying only its grant),LivekitWebhookReceiver(signature, expiry, issuer and body SHA-256, always checked),withLivekit()and theLivekitfacade.