import type { RecordingAdapter } from '../ports/outbound/recording-adapter.port'; import type { RecordingStartOptions, RecordingStatus } from '../types/recording.types'; import type { Logger } from '../utils/logger'; import { type RecordingEventName, type RecordingEventMap } from '../types/recording.types'; import { BaseService } from './base.service'; /** * Dependencies injected by the Session composition root. */ export interface RecordingServiceDeps { /** Whether the local user is allowed to start/stop recording. */ canControl: () => boolean; } /** * Recording service for session recording. * * Available to every participant whose session token includes the * "recording" feature. Any participant can read recording state * (`isRecording`, `getStatus()`, and the `Status` event); `canControl` * reports whether the local user is permitted to start/stop. The backend * is the authority on authorization and rejects unauthorized calls. */ export declare class RecordingService extends BaseService { private recordingAdapter; private deps; private eventHandlers; private unsubscribes; constructor(recordingAdapter: RecordingAdapter, deps: RecordingServiceDeps, logger: Logger); /** Whether the local user is allowed to start/stop recording. */ get canControl(): boolean; /** * Start recording the session. * @param options - Recording options (layout, audioOnly, resolution) * @returns Recording ID * @throws RecordingStartError if recording fails to start */ start(options?: RecordingStartOptions): Promise; /** * Stop the current session's recording. */ stop(): Promise; /** * Get the current session's recording status. * @returns Recording status (includes `file.objectKey` once stopped) */ getStatus(): Promise; /** * List all recordings for the current room. * * Returns one entry per recording, so a session that started/stopped * recording multiple times yields multiple results — each with its own * `recordingId` and `file.objectKey`. Useful for collecting download keys * without tracking recording IDs yourself. * * The result order is not guaranteed. To show the latest recording first, * sort client-side (e.g. by `duration` or a timestamp from your own records). * * @returns Recording statuses (unordered) */ list(): Promise; /** * Whether the room is currently being recorded. * * Sync read — backed by the provider's native room state, so it is cheap * to call from UI render paths and is correct for participants who join * after recording started. */ get isRecording(): boolean; /** Register an event handler for recording events. */ on(event: E, handler: RecordingEventMap[E]): void; /** Remove an event handler for recording events. */ off(event?: E, handler?: RecordingEventMap[E]): void; /** * Cleanup resources * @internal */ destroy(): void; private setupEventListeners; private emit; } //# sourceMappingURL=recording.service.d.ts.map