Store meet recordings on Ladill servers via browser upload.
Deploy Ladill Meet / deploy (push) Successful in 53s
Deploy Ladill Meet / deploy (push) Successful in 53s
Capture the meeting in the host browser, upload to Ladill storage on stop, and remove the LiveKit egress placeholder job. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Http\Controllers\Meet;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Participant;
|
||||
use App\Models\Recording;
|
||||
use App\Models\Session;
|
||||
use App\Services\Meet\ChatService;
|
||||
use App\Services\Meet\Media\MediaProviderInterface;
|
||||
@@ -254,9 +255,29 @@ class MeetingRoomController extends Controller
|
||||
abort_unless($participant->isHost(), 403);
|
||||
|
||||
$recording = $session->recordings()->where('status', 'recording')->firstOrFail();
|
||||
$this->recordings->stop($recording, $participant->user_ref ?? $participant->uuid);
|
||||
$recording = $this->recordings->stop($recording, $participant->user_ref ?? $participant->uuid);
|
||||
|
||||
return response()->json(['status' => 'processing']);
|
||||
return response()->json([
|
||||
'status' => 'processing',
|
||||
'recording_uuid' => $recording->uuid,
|
||||
]);
|
||||
}
|
||||
|
||||
public function uploadRecording(Request $request, Session $session, Recording $recording): JsonResponse
|
||||
{
|
||||
$participant = $this->currentParticipant($request, $session);
|
||||
abort_unless($participant->isHost(), 403);
|
||||
abort_unless($recording->session_id === $session->id, 404);
|
||||
|
||||
$maxKb = max(1, (int) config('meet.recordings.max_mb', 512)) * 1024;
|
||||
|
||||
$request->validate([
|
||||
'recording' => ['required', 'file', 'mimetypes:video/webm,video/mp4,video/x-matroska,video/quicktime', 'max:'.$maxKb],
|
||||
]);
|
||||
|
||||
$this->recordings->storeUpload($recording, $request->file('recording'));
|
||||
|
||||
return response()->json(['status' => 'ready', 'recording_uuid' => $recording->uuid]);
|
||||
}
|
||||
|
||||
public function lock(Request $request, Session $session): JsonResponse
|
||||
|
||||
@@ -52,7 +52,7 @@ class RecordingController extends Controller
|
||||
abort_unless(app(\App\Services\Meet\MeetBillingService::class)->storageIsAccessible($recording), 402, 'Recording storage billing is overdue. Top up your Ladill wallet to download this recording.');
|
||||
|
||||
return Storage::disk(config('meet.recordings.disk', 'local'))
|
||||
->download($recording->storage_path, $recording->session->room->title.'.mp4');
|
||||
->download($recording->storage_path, $recording->session->room->title.'.'.pathinfo($recording->storage_path, PATHINFO_EXTENSION));
|
||||
}
|
||||
|
||||
public function destroy(Request $request, Recording $recording): RedirectResponse
|
||||
|
||||
Reference in New Issue
Block a user