forked from rescript-lang/experimental-rescript-webapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEncryptedMediaExtensionsAPI.res
More file actions
103 lines (91 loc) · 3.45 KB
/
EncryptedMediaExtensionsAPI.res
File metadata and controls
103 lines (91 loc) · 3.45 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
@@warning("-30")
open EventAPI
type mediaKeysRequirement =
| @as("not-allowed") NotAllowed
| @as("optional") Optional
| @as("required") Required
type mediaKeySessionType =
| @as("persistent-license") PersistentLicense
| @as("temporary") Temporary
type mediaKeySessionClosedReason =
| @as("closed-by-application") ClosedByApplication
| @as("hardware-context-reset") HardwareContextReset
| @as("internal-error") InternalError
| @as("release-acknowledged") ReleaseAcknowledged
| @as("resource-evicted") ResourceEvicted
type mediaKeyStatus =
| @as("expired") Expired
| @as("internal-error") InternalError
| @as("output-downscaled") OutputDownscaled
| @as("output-restricted") OutputRestricted
| @as("released") Released
| @as("status-pending") StatusPending
| @as("usable") Usable
| @as("usable-in-future") UsableInFuture
/**
This EncryptedMediaExtensions API interface provides access to a Key System for decryption and/or a content protection provider. You can request an instance of this object using the Navigator.requestMediaKeySystemAccess method.
[See MediaKeySystemAccess on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySystemAccess)
*/
@editor.completeFrom(MediaKeySystemAccess)
type mediaKeySystemAccess = {
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySystemAccess/keySystem)
*/
keySystem: string,
}
/**
This EncryptedMediaExtensions API interface the represents a set of keys that an associated HTMLMediaElement can use for decryption of media data during playback.
[See MediaKeys on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeys)
*/
@editor.completeFrom(MediaKeys)
type mediaKeys = {}
/**
This EncryptedMediaExtensions API interface is a read-only map of media key statuses by key IDs.
[See MediaKeyStatusMap on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeyStatusMap)
*/
@editor.completeFrom(MediaKeyStatusMap)
type mediaKeyStatusMap = {
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeyStatusMap/size)
*/
size: int,
}
/**
This EncryptedMediaExtensions API interface represents a context for message exchange with a content decryption module (CDM).
[See MediaKeySession on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySession)
*/
@editor.completeFrom(MediaKeySession)
type mediaKeySession = {
...eventTarget,
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySession/sessionId)
*/
sessionId: string,
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySession/expiration)
*/
expiration: float,
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySession/closed)
*/
closed: promise<mediaKeySessionClosedReason>,
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySession/keyStatuses)
*/
keyStatuses: mediaKeyStatusMap,
}
type mediaKeySystemMediaCapability = {
mutable contentType?: string,
mutable encryptionScheme?: Null.t<string>,
mutable robustness?: string,
}
type mediaKeySystemConfiguration = {
mutable label?: string,
mutable initDataTypes?: array<string>,
mutable audioCapabilities?: array<mediaKeySystemMediaCapability>,
mutable videoCapabilities?: array<mediaKeySystemMediaCapability>,
mutable distinctiveIdentifier?: mediaKeysRequirement,
mutable persistentState?: mediaKeysRequirement,
mutable sessionTypes?: array<string>,
}
type mediaKeysPolicy = {mutable minHdcpVersion?: string}