forked from kou-kee/filen-drive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
113 lines (98 loc) · 2.37 KB
/
index.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
declare module "mp4box" {
interface MP4MediaTrack {
id: number
created: Date
modified: Date
movie_duration: number
movie_timescale: number
layer: number
alternate_group: number
volume: number
track_width: number
track_height: number
timescale: number
duration: number
bitrate: number
codec: string
language: string
nb_samples: number
}
interface MP4VideoData {
width: number
height: number
}
interface MP4VideoTrack extends MP4MediaTrack {
video: MP4VideoData
}
interface MP4AudioData {
sample_rate: number
channel_count: number
sample_size: number
}
interface MP4AudioTrack extends MP4MediaTrack {
audio: MP4AudioData
}
type MP4Track = MP4VideoTrack | MP4AudioTrack
export interface MP4Info {
duration: number
timescale: number
fragment_duration: number
isFragmented: boolean
isProgressive: boolean
hasIOD: boolean
brands: string[]
created: Date
modified: Date
tracks: MP4Track[]
audioTracks: MP4AudioTrack[]
mime: string
}
interface MP4Sample {
alreadyRead: number
chunk_index: number
chunk_run_index: number
cts: number
data: Uint8Array
degradation_priority: number
depends_on: number
description: any
description_index: number
dts: number
duration: number
has_redundancy: number
is_depended_on: number
is_leading: number
is_sync: boolean
number: number
offset: number
size: number
timescale: number
track_id: number
}
export type MP4ArrayBuffer = ArrayBuffer & { fileStart: number }
export interface MP4File {
onMoovStart?: () => void
onReady?: (info: MP4Info) => void
onError?: (e: string) => void
onSamples?: (id: number, user: any, samples: MP4Sample[]) => any
onSegment?: (id: number, user: any, buffer: ArrayBuffer, sampleNumber: number, last: boolean) => any
appendBuffer(data: MP4ArrayBuffer): number
start(): void
stop(): void
flush(): void
releaseUsedSamples(trackId: number, sampleNumber: number): void
setExtractionOptions(trackId: number, user: any, options: { nbSamples?: number; rapAlignment?: number }): void
initializeSegmentation(): void
}
export function createFile(): MP4File
export {}
}
declare module "mediasource" {
export class MediaElementWrapper {
constructor(elem: HTMLVideoElement)
}
}
declare module "videostream" {}
declare module "native-file-system-adapter" {
export * from "native-file-system-adapter/types/mod"
}