-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathMediaCapabilitiesAPI.res
More file actions
82 lines (69 loc) · 1.86 KB
/
Copy pathMediaCapabilitiesAPI.res
File metadata and controls
82 lines (69 loc) · 1.86 KB
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
@@warning("-30")
type hdrMetadataType =
| @as("smpteSt2086") SmpteSt2086
| @as("smpteSt2094-10") SmpteSt209410
| @as("smpteSt2094-40") SmpteSt209440
type colorGamut =
| @as("p3") P3
| @as("rec2020") Rec2020
| @as("srgb") Srgb
type transferFunction =
| @as("hlg") Hlg
| @as("pq") Pq
| @as("srgb") Srgb
type mediaDecodingType =
| @as("file") File
| @as("media-source") MediaSource
| @as("webrtc") Webrtc
type mediaEncodingType =
| @as("record") Record
| @as("webrtc") Webrtc
/**
[See MediaCapabilities on MDN](https://developer.mozilla.org/docs/Web/API/MediaCapabilities)
*/
@editor.completeFrom(MediaCapabilities)
type mediaCapabilities = {}
type audioConfiguration = {
mutable contentType: string,
mutable channels?: string,
mutable bitrate?: int,
mutable samplerate?: int,
mutable spatialRendering?: bool,
}
type videoConfiguration = {
mutable contentType: string,
mutable width: int,
mutable height: int,
mutable bitrate: int,
mutable framerate: float,
mutable hasAlphaChannel?: bool,
mutable hdrMetadataType?: hdrMetadataType,
mutable colorGamut?: colorGamut,
mutable transferFunction?: transferFunction,
mutable scalabilityMode?: string,
}
type mediaConfiguration = {
mutable video?: videoConfiguration,
mutable audio?: audioConfiguration,
}
type mediaDecodingConfiguration = {
...mediaConfiguration,
@as("type") mutable type_: mediaDecodingType,
}
type mediaCapabilitiesInfo = {
mutable supported: bool,
mutable smooth: bool,
mutable powerEfficient: bool,
}
type mediaCapabilitiesDecodingInfo = {
...mediaCapabilitiesInfo,
mutable configuration?: mediaDecodingConfiguration,
}
type mediaEncodingConfiguration = {
...mediaConfiguration,
@as("type") mutable type_: mediaEncodingType,
}
type mediaCapabilitiesEncodingInfo = {
...mediaCapabilitiesInfo,
mutable configuration?: mediaEncodingConfiguration,
}