Fix auto-record egress failing before LiveKit room exists.
Deploy Ladill Meet / deploy (push) Successful in 51s

Create rooms via the LiveKit API, retry egress when the room is missing, and resume server egress after the host connects when auto-record fell back to browser capture.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-04 09:53:44 +00:00
co-authored by Cursor
parent d2bf08ec45
commit 64df3d1eb1
6 changed files with 162 additions and 13 deletions
+19 -1
View File
@@ -23,7 +23,7 @@ class RecordingService
{
$active = $session->recordings()->where('status', 'recording')->first();
if ($active) {
return $active;
return $this->ensureServerEgress($session, $active);
}
$recording = Recording::create([
@@ -66,6 +66,24 @@ class RecordingService
return $this->captureMode($recording) === 'egress';
}
public function ensureServerEgress(Session $session, Recording $recording): Recording
{
if ($this->usesServerEgress($recording) || ! $this->egress->isAvailable()) {
return $recording;
}
$egressMeta = $this->egress->tryStart($session, $recording);
if ($egressMeta === null) {
return $recording;
}
$recording->update([
'metadata' => array_merge($recording->metadata ?? [], $egressMeta),
]);
return $recording->fresh();
}
public function stop(Recording $recording, string $actorRef): Recording
{
if ($recording->status !== 'recording') {