sls/app/Http/Responses/Interview/RecordingFinalizedResponse.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

38 lines
977 B
PHP

<?php
namespace App\Http\Responses\Interview;
use Illuminate\Contracts\Support\Responsable;
use Illuminate\Http\JsonResponse;
class RecordingFinalizedResponse implements Responsable
{
/**
* Create a new response instance.
*
* @param string $sessionId
* @param string $message
*/
public function __construct(
protected string $sessionId,
protected string $message = 'Final recording chunk received. Video assembly queued in background.'
) {}
/**
* Create an HTTP response that represents the object.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\JsonResponse
*/
public function toResponse($request): JsonResponse
{
return response()->json([
'success' => true,
'is_final' => true,
'processing' => true,
'session_id' => $this->sessionId,
'message' => $this->message,
], 200);
}
}