sls/app/Actions/Interview/FinalizeRecordingAction.php
kushal.saha 121b4beaf8 feat(call recording): chuked recoding upload
- upload recording of call in chunks 
- recordings are merged on server side in jobs
- improve UI of the recording tab
2026-08-19 05:43:32 +00:00

39 lines
902 B
PHP

<?php
namespace App\Actions\Interview;
use App\Jobs\MergeRecordingChunksJob;
use App\Models\Interview;
class FinalizeRecordingAction
{
/**
* Finalize the recording session by dispatching the background merge job.
*
* @param Interview $interview
* @param string $sessionId
* @param int $totalChunks
* @param string|null $tempDir
* @param string|null $folderName
* @param int|null $duration
* @return void
*/
public function execute(
Interview $interview,
string $sessionId,
int $totalChunks = 0,
?string $tempDir = null,
?string $folderName = null,
?int $duration = null
): void {
MergeRecordingChunksJob::dispatch(
$interview->id,
$sessionId,
$tempDir,
$folderName,
$totalChunks,
$duration
);
}
}