Skip to main content

daravel_livekit 1.12.0 copy "daravel_livekit: ^1.12.0" to clipboard
daravel_livekit: ^1.12.0 copied to clipboard

LiveKit server SDK for Daravel. Access tokens with video grants, the room service (rooms, participants, data) and verified webhooks.

Daravel

daravel_livekit #

English · Bahasa Indonesia

LiveKit's server SDK for Daravel: the access tokens WebRTC clients join rooms with, the room service (rooms, participants, data messages) and verified webhooks. It speaks the protocol of LiveKit's PHP SDK, so a Laravel and a Daravel application share one LiveKit server.

dart pub add daravel_livekit
Application.configure(basePath: '.').withLivekit() // LIVEKIT_URL, LIVEKIT_API_KEY, LIVEKIT_API_SECRET

final token = await Livekit.token(
  identity: user.uuid,
  name: user.name,
  video: VideoGrant(roomJoin: true, room: 'class-7a', roomAdmin: isTeacher),
).toJwt();

await Livekit.rooms.createRoom('class-7a', maxParticipants: 40);

router.post('/livekit/webhook', (request) async {
  final event = await Livekit.webhook(request); // 401 unless LiveKit signed it
  // event.event == 'room_finished', event.room?.name, ...
  return Response.noContent();
});
  • Tokens with LiveKit's claims and grants; each room service call signed with a short token carrying only the grant it needs.
  • Webhooks checked as LiveKit's SDKs check them (signature, expiry, issuer, the body's SHA-256), with no switch to skip it.
  • Tested against a LiveKit server and against LiveKit's PHP SDK.

Documentation: https://github.com/daravel-dev/daravel/blob/main/docs/guide/livekit.md.

License and trademarks #

MIT. "Laravel" is a trademark of Laravel Holdings Inc.; "Dart" is a trademark of Google LLC; LiveKit is a trademark of LiveKit, Inc. Daravel is an independent project, not affiliated with or endorsed by any of them.

0
likes
0
points
0
downloads

Documentation

Documentation

Publisher

verified publisherframework.daravel.dev

Weekly Downloads

LiveKit server SDK for Daravel. Access tokens with video grants, the room service (rooms, participants, data) and verified webhooks.

Homepage
Repository (GitHub)
View/report issues

Topics

#livekit #webrtc #video #server #backend

License

unknown (license)

Dependencies

crypto, daravel

More

Packages that depend on daravel_livekit