-
Notifications
You must be signed in to change notification settings - Fork 2
/
env.d.ts
36 lines (30 loc) · 951 Bytes
/
env.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* eslint-disable @typescript-eslint/triple-slash-reference */
/// <reference types="vite/client" />
/// <reference types="vite-plugin-svgr/client" />
/// <reference types="navigation-api-types" />
interface HTMLVideoElement {
captureStream: () => MediaStream
mozCaptureStream: () => MediaStream
}
interface RecordInfoBase {
startDateTime: number // new Date().getTime()
stopDateTime: number
resultBlobURL: string
streamInfo: StreamInfo
isMP4: boolean
highFrameRec?: boolean
audioBlobURL?: string
}
interface HighFPSRecordInfo extends RecordInfoBase {
highFrameRec?: true
audioBlobURL: string
}
interface LowFPSRecordInfo extends RecordInfoBase {
highFrameRec?: false // Set the type to 'false' for highFrameRec
audioBlobURL?: undefined // Set the type to 'undefined' for audioBlobURL
}
type RecordInfo = HighFPSRecordInfo | LowFPSRecordInfo
interface MediaRecorder {
tempBlobURL?: string
recordInfo?: RecordInfo
}