/// <reference types="node" />
/******************************************************************************************
 * Repository: https://github.com/kolserdav/werift-sfu-react.git
 * File name: record.ts
 * Author: Sergey Kolmiller
 * Email: <uyem.ru@gmail.com>
 * License: MIT
 * License text: See in LICENSE file
 * Copyright: kolserdav, All rights reserved (c)
 * Create Date: Wed Aug 24 2022 14:14:09 GMT+0700 (Krasnoyarsk Standard Time)
 ******************************************************************************************/
import * as werift from 'werift';
import { MessageType, SendMessageArgs } from '../types/interfaces';
import DB from '../core/db';
import Settings from './settings';
import RTC from '../core/rtc';
import WS from '../core/ws';
declare class RecordVideo extends DB {
    settings: Settings;
    cloudPath: string;
    videosPath: string;
    private dirPath;
    intervals: Record<string, NodeJS.Timer>;
    mediaRecorders: Record<string, Record<string, werift.MediaRecorder>>;
    startTimes: Record<string, Record<string, number>>;
    videoSettings: Record<string, Record<string, {
        width: number;
        height: number;
    }>>;
    seconds: Record<string, number>;
    private times;
    private rtc;
    private ws;
    constructor({ settings, rtc, ws, cloudPath, prisma, }: {
        settings: Settings;
        rtc: RTC;
        ws: WS;
        cloudPath: string;
        prisma: DB['prisma'];
    });
    private getCurrentTime;
    private setHandlers;
    private getConnId;
    getVideoSettingsHandler({ id, data: { userId, width, height }, }: SendMessageArgs<MessageType.GET_VIDEO_SETTINGS>): void;
    private changeEndTime;
    private getChunkName;
    private stopStreamRecord;
    private checkIsMuted;
    private checkVideoPlayed;
    private getMediaRecorderId;
    private getMediaRecorderKeys;
    private startStreamRecord;
    recordVideo({ roomId, id }: {
        roomId: string | number;
        id: number | string;
    }): Promise<void>;
    private cleanRoomRecord;
    private stopRecord;
    handleVideoRecord(args: SendMessageArgs<MessageType.GET_RECORD>): Promise<void>;
}
export default RecordVideo;
//# sourceMappingURL=recordVideo.d.ts.map