Fix auto-record egress failing before LiveKit room exists.
Deploy Ladill Meet / deploy (push) Successful in 51s
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:
@@ -225,6 +225,45 @@ class MeetLiveKitEgressRecordingTest extends TestCase
|
||||
$this->assertTrue($config['force_path_style']);
|
||||
}
|
||||
|
||||
public function test_start_recording_retries_egress_for_active_browser_capture(): void
|
||||
{
|
||||
config(['meet.recordings.egress.enabled' => true]);
|
||||
|
||||
$egressMock = Mockery::mock(LiveKitEgressService::class);
|
||||
$egressMock->shouldReceive('isAvailable')->andReturn(true);
|
||||
$egressMock->shouldReceive('tryStart')->once()->andReturn([
|
||||
'egress_id' => 'EG_retry123',
|
||||
'egress_filepath' => 'recordings/session/recording.mp4',
|
||||
'capture_mode' => 'egress',
|
||||
'audio_only' => false,
|
||||
]);
|
||||
$this->app->instance(LiveKitEgressService::class, $egressMock);
|
||||
|
||||
[$session, $participant] = $this->liveSession();
|
||||
|
||||
$recording = Recording::create([
|
||||
'owner_ref' => $this->user->public_id,
|
||||
'session_id' => $session->id,
|
||||
'status' => 'recording',
|
||||
'layout' => 'gallery',
|
||||
'started_by_ref' => $this->user->public_id,
|
||||
'started_at' => now()->subMinute(),
|
||||
'metadata' => ['capture_mode' => 'browser'],
|
||||
]);
|
||||
|
||||
$this->withSession(["meet.participant.{$session->uuid}" => $participant->uuid])
|
||||
->actingAs($this->user)
|
||||
->postJson("/room/{$session->uuid}/recording/start")
|
||||
->assertOk()
|
||||
->assertJson([
|
||||
'recording_uuid' => $recording->uuid,
|
||||
'capture_mode' => 'egress',
|
||||
]);
|
||||
|
||||
$recording->refresh();
|
||||
$this->assertSame('egress', $recording->metadata['capture_mode']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array{0: Session, 1: Participant}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user