@rescript/webapi 0.1.0-alpha-b1d58f9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (341) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +35 -0
  3. package/package.json +61 -0
  4. package/rescript.json +557 -0
  5. package/src/animation/Animation.res +149 -0
  6. package/src/animation/AnimationEffect.res +71 -0
  7. package/src/animation/DocumentTimeline.res +8 -0
  8. package/src/canvas/Canvas.res +179 -0
  9. package/src/canvas/CanvasGradient.res +11 -0
  10. package/src/canvas/CanvasPattern.res +11 -0
  11. package/src/canvas/CanvasRenderingContext2D.res +868 -0
  12. package/src/canvas/CanvasTypes.res +452 -0
  13. package/src/canvas/FillStyle.res +25 -0
  14. package/src/canvas/HTMLCanvasElement.res +101 -0
  15. package/src/canvas/ImageBitmap.res +6 -0
  16. package/src/canvas/ImageBitmapRenderingContext.res +9 -0
  17. package/src/canvas/ImageData.res +17 -0
  18. package/src/canvas/OffscreenCanvas.res +87 -0
  19. package/src/canvas/Path2D.res +186 -0
  20. package/src/canvas/VideoColorSpace.res +11 -0
  21. package/src/canvas/VideoFrame.res +217 -0
  22. package/src/core/ArrayBufferTypedArrayOrDataView.res +4 -0
  23. package/src/core/DOM.res +1026 -0
  24. package/src/core/EventType.res +108 -0
  25. package/src/crypto/Crypto.res +11 -0
  26. package/src/crypto/SubtleCrypto.res +173 -0
  27. package/src/crypto/WebCryptoTypes.res +71 -0
  28. package/src/css-font-loading/BaseCSSFontLoading.res +24 -0
  29. package/src/css-font-loading/CssFontLoadingTypes.res +92 -0
  30. package/src/css-font-loading/FontFace.res +62 -0
  31. package/src/css-font-loading/FontFaceSet.res +38 -0
  32. package/src/cssom/CSSRuleList.res +5 -0
  33. package/src/cssom/CSSStyleDeclaration.res +1734 -0
  34. package/src/cssom/CSSStyleValue.res +17 -0
  35. package/src/cssom/MediaList.res +29 -0
  36. package/src/cssom/MediaQueryList.res +18 -0
  37. package/src/cssom/StylePropertyMap.res +56 -0
  38. package/src/cssom/StylePropertyMapReadOnly.res +22 -0
  39. package/src/cssom/StyleSheet.res +152 -0
  40. package/src/cssom/StyleSheetList.res +17 -0
  41. package/src/device/GamepadHapticActuator.res +16 -0
  42. package/src/device/GamepadTypes.res +86 -0
  43. package/src/device/Geolocation.res +31 -0
  44. package/src/device/GeolocationCoordinates.res +5 -0
  45. package/src/device/GeolocationPosition.res +5 -0
  46. package/src/device/GeolocationTypes.res +81 -0
  47. package/src/device/LockManager.res +26 -0
  48. package/src/device/ScreenOrientation.res +7 -0
  49. package/src/device/ScreenWakeLockTypes.res +26 -0
  50. package/src/device/WakeLock.res +8 -0
  51. package/src/device/WakeLockSentinel.res +7 -0
  52. package/src/device/WebLocksTypes.res +45 -0
  53. package/src/device/WebMIDI.res +7 -0
  54. package/src/device/WebMidiTypes.res +36 -0
  55. package/src/dom-nodes/AbstractRange.res +30 -0
  56. package/src/dom-nodes/Attr.res +101 -0
  57. package/src/dom-nodes/CDATASection.res +7 -0
  58. package/src/dom-nodes/CaretPosition.res +2 -0
  59. package/src/dom-nodes/CharacterData.res +199 -0
  60. package/src/dom-nodes/Comment.res +15 -0
  61. package/src/dom-nodes/DOMImplementation.res +131 -0
  62. package/src/dom-nodes/DOMTree.res +1653 -0
  63. package/src/dom-nodes/DocumentFragment.res +96 -0
  64. package/src/dom-nodes/Element.res +509 -0
  65. package/src/dom-nodes/ElementInternals.res +39 -0
  66. package/src/dom-nodes/HTML.res +11 -0
  67. package/src/dom-nodes/HTMLCollection.res +25 -0
  68. package/src/dom-nodes/NamedNodeMap.res +46 -0
  69. package/src/dom-nodes/Node.res +114 -0
  70. package/src/dom-nodes/NodeFilter.res +4 -0
  71. package/src/dom-nodes/NodeIterator.res +38 -0
  72. package/src/dom-nodes/NodeList.res +6 -0
  73. package/src/dom-nodes/ProcessingInstruction.res +15 -0
  74. package/src/dom-nodes/Range.res +156 -0
  75. package/src/dom-nodes/Selection.res +137 -0
  76. package/src/dom-nodes/ShadowRoot.res +23 -0
  77. package/src/dom-nodes/StaticRange.res +6 -0
  78. package/src/dom-nodes/Text.res +31 -0
  79. package/src/dom-nodes/TreeWalker.res +65 -0
  80. package/src/dom-platform/DOMException.res +7 -0
  81. package/src/dom-platform/DOMStringList.res +15 -0
  82. package/src/dom-platform/DOMStringMap.res +5 -0
  83. package/src/dom-platform/DOMTokenList.res +70 -0
  84. package/src/event/AbortController.res +9 -0
  85. package/src/event/AbortSignal.res +25 -0
  86. package/src/event/Event.res +76 -0
  87. package/src/event/EventTarget.res +91 -0
  88. package/src/event/ExtendableEvent.res +14 -0
  89. package/src/fetch/BodyInit.res +46 -0
  90. package/src/fetch/Fetch.res +12 -0
  91. package/src/fetch/FetchTypes.res +282 -0
  92. package/src/fetch/FormData.res +71 -0
  93. package/src/fetch/FormDataEntryValue.res +2 -0
  94. package/src/fetch/Headers.res +59 -0
  95. package/src/fetch/HeadersInit.res +16 -0
  96. package/src/fetch/Request.res +61 -0
  97. package/src/fetch/Response.res +127 -0
  98. package/src/file/BaseFileAndDirectoryEntries.res +72 -0
  99. package/src/file/Blob.res +48 -0
  100. package/src/file/File.res +15 -0
  101. package/src/file/FileAndDirectoryEntriesTypes.res +35 -0
  102. package/src/file/FileList.res +16 -0
  103. package/src/file/FileSystemDirectoryEntry.res +42 -0
  104. package/src/file/FileSystemDirectoryHandle.res +49 -0
  105. package/src/file/FileSystemDirectoryReader.res +9 -0
  106. package/src/file/FileSystemEntry.res +9 -0
  107. package/src/file/FileSystemFileHandle.res +25 -0
  108. package/src/file/FileSystemHandle.res +6 -0
  109. package/src/file/FileSystemWritableFileStream.res +65 -0
  110. package/src/file/FileTypes.res +225 -0
  111. package/src/file/ReadableStream.res +79 -0
  112. package/src/file/WritableStream.res +27 -0
  113. package/src/file/WritableStreamDefaultController.res +5 -0
  114. package/src/geometry/DOMMatrix.res +206 -0
  115. package/src/geometry/DOMMatrixReadOnly.res +140 -0
  116. package/src/geometry/DOMPoint.res +28 -0
  117. package/src/geometry/DOMPointReadOnly.res +22 -0
  118. package/src/geometry/DOMRect.res +22 -0
  119. package/src/geometry/DOMRectList.res +2 -0
  120. package/src/geometry/DOMRectReadOnly.res +19 -0
  121. package/src/html/HTMLAnchorElement.res +373 -0
  122. package/src/html/HTMLAreaElement.res +353 -0
  123. package/src/html/HTMLBRElement.res +9 -0
  124. package/src/html/HTMLBaseElement.res +20 -0
  125. package/src/html/HTMLBodyElement.res +9 -0
  126. package/src/html/HTMLButtonElement.res +98 -0
  127. package/src/html/HTMLDListElement.res +9 -0
  128. package/src/html/HTMLDataElement.res +14 -0
  129. package/src/html/HTMLDataListElement.res +14 -0
  130. package/src/html/HTMLDialogElement.res +40 -0
  131. package/src/html/HTMLDivElement.res +9 -0
  132. package/src/html/HTMLElement.res +108 -0
  133. package/src/html/HTMLEmbedElement.res +275 -0
  134. package/src/html/HTMLFieldSetElement.res +70 -0
  135. package/src/html/HTMLFormControlsCollection.res +21 -0
  136. package/src/html/HTMLFormElement.res +39 -0
  137. package/src/html/HTMLFrameSetElement.res +9 -0
  138. package/src/html/HTMLHRElement.res +9 -0
  139. package/src/html/HTMLHeadElement.res +256 -0
  140. package/src/html/HTMLHeadingElement.res +9 -0
  141. package/src/html/HTMLHtmlElement.res +9 -0
  142. package/src/html/HTMLIFrameElement.res +69 -0
  143. package/src/html/HTMLImageElement.res +349 -0
  144. package/src/html/HTMLInputElement.res +310 -0
  145. package/src/html/HTMLLIElement.res +9 -0
  146. package/src/html/HTMLLabelElement.res +25 -0
  147. package/src/html/HTMLLegendElement.res +14 -0
  148. package/src/html/HTMLLinkElement.res +69 -0
  149. package/src/html/HTMLMapElement.res +20 -0
  150. package/src/html/HTMLMenuElement.res +8 -0
  151. package/src/html/HTMLMetaElement.res +29 -0
  152. package/src/html/HTMLMeterElement.res +38 -0
  153. package/src/html/HTMLModElement.res +9 -0
  154. package/src/html/HTMLOListElement.res +24 -0
  155. package/src/html/HTMLObjectElement.res +89 -0
  156. package/src/html/HTMLOptGroupElement.res +19 -0
  157. package/src/html/HTMLOptionElement.res +49 -0
  158. package/src/html/HTMLOptionsCollection.res +35 -0
  159. package/src/html/HTMLOutputElement.res +73 -0
  160. package/src/html/HTMLParagraphElement.res +9 -0
  161. package/src/html/HTMLPictureElement.res +9 -0
  162. package/src/html/HTMLPreElement.res +9 -0
  163. package/src/html/HTMLProgressElement.res +29 -0
  164. package/src/html/HTMLQuoteElement.res +9 -0
  165. package/src/html/HTMLScriptElement.res +310 -0
  166. package/src/html/HTMLSelectElement.res +157 -0
  167. package/src/html/HTMLSlotElement.res +34 -0
  168. package/src/html/HTMLSourceElement.res +18 -0
  169. package/src/html/HTMLSpanElement.res +9 -0
  170. package/src/html/HTMLStyleElement.res +24 -0
  171. package/src/html/HTMLTableCaptionElement.res +9 -0
  172. package/src/html/HTMLTableCellElement.res +40 -0
  173. package/src/html/HTMLTableElement.res +100 -0
  174. package/src/html/HTMLTableRowElement.res +40 -0
  175. package/src/html/HTMLTableSectionElement.res +30 -0
  176. package/src/html/HTMLTemplateElement.res +31 -0
  177. package/src/html/HTMLTextAreaElement.res +177 -0
  178. package/src/html/HTMLTimeElement.res +14 -0
  179. package/src/html/HTMLTitleElement.res +15 -0
  180. package/src/html/HTMLUListElement.res +9 -0
  181. package/src/html/HTMLUnknownElement.res +9 -0
  182. package/src/media/BaseEncryptedMediaExtensions.res +97 -0
  183. package/src/media/DomHTMLMediaElement.res +206 -0
  184. package/src/media/EncryptedMediaExtensionsHTMLMediaElement.res +15 -0
  185. package/src/media/EncryptedMediaExtensionsTypes.res +43 -0
  186. package/src/media/HTMLAudioElement.res +9 -0
  187. package/src/media/HTMLTrackElement.res +14 -0
  188. package/src/media/HTMLVideoElement.res +78 -0
  189. package/src/media/MediaCapabilities.res +19 -0
  190. package/src/media/MediaCapabilitiesTypes.res +83 -0
  191. package/src/media/MediaCaptureAndStreamsTypes.res +197 -0
  192. package/src/media/MediaDeviceInfo.res +9 -0
  193. package/src/media/MediaDevices.res +40 -0
  194. package/src/media/MediaError.res +14 -0
  195. package/src/media/MediaKeySession.res +53 -0
  196. package/src/media/MediaKeyStatusMap.res +11 -0
  197. package/src/media/MediaKeySystemAccess.res +14 -0
  198. package/src/media/MediaKeys.res +35 -0
  199. package/src/media/MediaMetadata.res +10 -0
  200. package/src/media/MediaSession.res +25 -0
  201. package/src/media/MediaSessionTypes.res +85 -0
  202. package/src/media/MediaStream.res +89 -0
  203. package/src/media/MediaStreamTrack.res +51 -0
  204. package/src/media/PictureInPicture.res +7 -0
  205. package/src/media/PictureInPictureTypes.res +17 -0
  206. package/src/media/RemotePlayback.res +25 -0
  207. package/src/media/RemotePlaybackTypes.res +20 -0
  208. package/src/media/SpeechSynthesis.res +33 -0
  209. package/src/media/SpeechSynthesisUtterance.res +8 -0
  210. package/src/media/TextTrack.res +15 -0
  211. package/src/media/TextTrackCueList.res +9 -0
  212. package/src/media/TextTrackList.res +17 -0
  213. package/src/media/TimeRanges.res +29 -0
  214. package/src/media/VideoPlaybackQuality.res +18 -0
  215. package/src/media/WebSpeechTypes.res +83 -0
  216. package/src/media/WebVttTypes.res +123 -0
  217. package/src/messaging/ApplicationServerKey.res +2 -0
  218. package/src/messaging/ChannelMessagingTypes.res +12 -0
  219. package/src/messaging/CloseEvent.res +10 -0
  220. package/src/messaging/MessageEvent.res +43 -0
  221. package/src/messaging/MessagePort.res +38 -0
  222. package/src/messaging/Notification.res +46 -0
  223. package/src/messaging/NotificationTypes.res +107 -0
  224. package/src/messaging/PushEvent.res +3 -0
  225. package/src/messaging/PushManager.res +24 -0
  226. package/src/messaging/PushMessageData.res +15 -0
  227. package/src/messaging/PushSubscription.res +20 -0
  228. package/src/messaging/PushTypes.res +88 -0
  229. package/src/messaging/WebSocket.res +74 -0
  230. package/src/messaging/WebSocketsTypes.res +124 -0
  231. package/src/navigator/Clipboard.res +29 -0
  232. package/src/navigator/ClipboardItem.res +20 -0
  233. package/src/navigator/ClipboardTypes.res +31 -0
  234. package/src/navigator/CredentialManagementTypes.res +138 -0
  235. package/src/navigator/CredentialsContainer.res +33 -0
  236. package/src/navigator/Navigator.res +166 -0
  237. package/src/navigator/Permissions.res +10 -0
  238. package/src/navigator/PermissionsTypes.res +38 -0
  239. package/src/observers/IntersectionObserver.res +36 -0
  240. package/src/observers/IntersectionObserverRoot.res +23 -0
  241. package/src/observers/IntersectionObserverTypes.res +67 -0
  242. package/src/observers/MutationObserver.res +94 -0
  243. package/src/observers/ResizeObserver.res +30 -0
  244. package/src/observers/ResizeObserverTypes.res +56 -0
  245. package/src/performance/Performance.res +101 -0
  246. package/src/performance/PerformanceEntry.res +5 -0
  247. package/src/performance/PerformanceMark.res +16 -0
  248. package/src/performance/PerformanceTypes.res +86 -0
  249. package/src/storage/Cache.res +117 -0
  250. package/src/storage/CacheStorage.res +43 -0
  251. package/src/storage/CacheTypes.res +24 -0
  252. package/src/storage/IDBDatabase.res +54 -0
  253. package/src/storage/IDBFactory.res +34 -0
  254. package/src/storage/IDBIndex.res +83 -0
  255. package/src/storage/IDBObjectStore.res +183 -0
  256. package/src/storage/IDBTransaction.res +22 -0
  257. package/src/storage/IndexedDbTypes.res +213 -0
  258. package/src/storage/Storage.res +42 -0
  259. package/src/storage/StorageEvent.res +10 -0
  260. package/src/storage/StorageManager.res +24 -0
  261. package/src/storage/StorageTypes.res +11 -0
  262. package/src/storage/WebStorageTypes.res +57 -0
  263. package/src/svg/SVGElement.res +115 -0
  264. package/src/svg/SVGGraphicsElement.res +16 -0
  265. package/src/svg/SVGLength.res +9 -0
  266. package/src/ui-events/CompositionEvent.res +10 -0
  267. package/src/ui-events/DataTransfer.res +38 -0
  268. package/src/ui-events/DataTransferItem.res +21 -0
  269. package/src/ui-events/DataTransferItemList.res +34 -0
  270. package/src/ui-events/FocusEvent.res +10 -0
  271. package/src/ui-events/InputEvent.res +16 -0
  272. package/src/ui-events/KeyboardEvent.res +16 -0
  273. package/src/ui-events/MouseEvent.res +26 -0
  274. package/src/ui-events/PointerEvent.res +24 -0
  275. package/src/ui-events/Touch.res +5 -0
  276. package/src/ui-events/TouchEvent.res +10 -0
  277. package/src/ui-events/TouchList.res +5 -0
  278. package/src/ui-events/UIEvent.res +20 -0
  279. package/src/ui-events/UiEventsTypes.res +590 -0
  280. package/src/ui-events/WheelEvent.res +10 -0
  281. package/src/url/URL.res +38 -0
  282. package/src/url/URLSearchParams.res +104 -0
  283. package/src/url/UrlTypes.res +69 -0
  284. package/src/view-transitions/ViewTransition.res +5 -0
  285. package/src/view-transitions/ViewTransitionsTypes.res +22 -0
  286. package/src/web-audio/AnalyserNode.res +38 -0
  287. package/src/web-audio/AudioBuffer.res +33 -0
  288. package/src/web-audio/AudioBufferSourceNode.res +21 -0
  289. package/src/web-audio/AudioContext.res +59 -0
  290. package/src/web-audio/AudioDestinationNode.res +1 -0
  291. package/src/web-audio/AudioNode.res +76 -0
  292. package/src/web-audio/AudioParam.res +65 -0
  293. package/src/web-audio/AudioProcessingEvent.res +10 -0
  294. package/src/web-audio/AudioScheduledSourceNode.res +23 -0
  295. package/src/web-audio/AudioWorkletNode.res +11 -0
  296. package/src/web-audio/BaseAudioContext.res +141 -0
  297. package/src/web-audio/BiquadFilterNode.res +21 -0
  298. package/src/web-audio/ChannelMergerNode.res +10 -0
  299. package/src/web-audio/ChannelSplitterNode.res +10 -0
  300. package/src/web-audio/ConstantSourceNode.res +10 -0
  301. package/src/web-audio/ConvolverNode.res +10 -0
  302. package/src/web-audio/DelayNode.res +10 -0
  303. package/src/web-audio/DynamicsCompressorNode.res +10 -0
  304. package/src/web-audio/GainNode.res +10 -0
  305. package/src/web-audio/IIRFilterNode.res +21 -0
  306. package/src/web-audio/MediaElementAudioSourceNode.res +10 -0
  307. package/src/web-audio/MediaStreamAudioDestinationNode.res +10 -0
  308. package/src/web-audio/MediaStreamAudioSourceNode.res +10 -0
  309. package/src/web-audio/OfflineAudioCompletionEvent.res +10 -0
  310. package/src/web-audio/OfflineAudioContext.res +58 -0
  311. package/src/web-audio/OscillatorNode.res +17 -0
  312. package/src/web-audio/PannerNode.res +10 -0
  313. package/src/web-audio/PeriodicWave.res +8 -0
  314. package/src/web-audio/StereoPannerNode.res +10 -0
  315. package/src/web-audio/WaveShaperNode.res +10 -0
  316. package/src/web-audio/WebAudioTypes.res +1309 -0
  317. package/src/web-audio/Worklet.res +14 -0
  318. package/src/window/CustomElementRegistry.res +30 -0
  319. package/src/window/Document.res +470 -0
  320. package/src/window/DomGlobal.res +459 -0
  321. package/src/window/History.res +37 -0
  322. package/src/window/HistoryTypes.res +26 -0
  323. package/src/window/IdleDeadline.res +5 -0
  324. package/src/window/Location.res +108 -0
  325. package/src/window/VisualViewport.res +5 -0
  326. package/src/window/VisualViewportTypes.res +37 -0
  327. package/src/window/Window.res +556 -0
  328. package/src/window/XPathExpression.res +16 -0
  329. package/src/window/XPathResult.res +46 -0
  330. package/src/workers/Clients.res +39 -0
  331. package/src/workers/NavigationPreloadManager.res +26 -0
  332. package/src/workers/ServiceWorker.res +38 -0
  333. package/src/workers/ServiceWorkerContainer.res +34 -0
  334. package/src/workers/ServiceWorkerRegistration.res +32 -0
  335. package/src/workers/ServiceWorkerScope.res +12 -0
  336. package/src/workers/ServiceWorkerTypes.res +153 -0
  337. package/src/workers/SharedWorker.res +68 -0
  338. package/src/workers/SharedWorkerScope.res +29 -0
  339. package/src/workers/WebWorkersTypes.res +46 -0
  340. package/src/workers/Worker.res +48 -0
  341. package/src/workers/WorkerLocation.res +18 -0
@@ -0,0 +1,206 @@
1
+ type mediaProvider = unknown
2
+
3
+ type canPlayTypeResult =
4
+ | @as("maybe") Maybe
5
+ | @as("probably") Probably
6
+
7
+ /**
8
+ Adds to HTMLElement the properties and methods needed to support basic media-related capabilities that are common to audio and video.
9
+ [See HTMLMediaElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement)
10
+ TODO: mark as private once mutating fields of private records is allowed
11
+ */
12
+ type t = {
13
+ ...DOMTree.htmlElement,
14
+ /**
15
+ Returns an object representing the current error state of the audio or video element.
16
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/error)
17
+ */
18
+ error: Null.t<MediaError.t>,
19
+ /**
20
+ The address or WebApiURL of the a media resource that is to be considered.
21
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/src)
22
+ */
23
+ mutable src: string,
24
+ /**
25
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/srcObject)
26
+ */
27
+ mutable srcObject: Null.t<mediaProvider>,
28
+ /**
29
+ Gets the address or WebApiURL of the current media resource that is selected by IHTMLMediaElement.
30
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/currentSrc)
31
+ */
32
+ currentSrc: string,
33
+ /**
34
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/crossOrigin)
35
+ */
36
+ mutable crossOrigin: Null.t<string>,
37
+ /**
38
+ Gets the current network activity for the element.
39
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/networkState)
40
+ */
41
+ networkState: int,
42
+ /**
43
+ Gets or sets a value indicating what data should be preloaded, if any.
44
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/preload)
45
+ */
46
+ mutable preload: string,
47
+ /**
48
+ Gets a collection of buffered time ranges.
49
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/buffered)
50
+ */
51
+ buffered: TimeRanges.t,
52
+ /**
53
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/readyState)
54
+ */
55
+ readyState: int,
56
+ /**
57
+ Gets or sets the current playback position, in seconds.
58
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/currentTime)
59
+ */
60
+ mutable currentTime: float,
61
+ /**
62
+ Returns the duration in seconds of the current media resource. A NaN value is returned if duration is not available, or Infinity if the media resource is streaming.
63
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/duration)
64
+ */
65
+ duration: float,
66
+ /**
67
+ Gets a flag that specifies whether playback is paused.
68
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/paused)
69
+ */
70
+ paused: bool,
71
+ /**
72
+ Gets or sets the default playback rate when the user is not using fast forward or reverse for a video or audio resource.
73
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/defaultPlaybackRate)
74
+ */
75
+ @throws(JsExn)
76
+ mutable defaultPlaybackRate: float,
77
+ /**
78
+ Gets or sets the current rate of speed for the media resource to play. This speed is expressed as a multiple of the normal speed of the media resource.
79
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/playbackRate)
80
+ */
81
+ @throws(JsExn)
82
+ mutable playbackRate: float,
83
+ /**
84
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/preservesPitch)
85
+ */
86
+ mutable preservesPitch: bool,
87
+ /**
88
+ Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked.
89
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/seekable)
90
+ */
91
+ seekable: TimeRanges.t,
92
+ /**
93
+ Gets information about whether the playback has ended or not.
94
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/ended)
95
+ */
96
+ ended: bool,
97
+ /**
98
+ Gets or sets a value that indicates whether to start playing the media automatically.
99
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/autoplay)
100
+ */
101
+ mutable autoplay: bool,
102
+ /**
103
+ Gets or sets a flag to specify whether playback should restart after it completes.
104
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/loop)
105
+ */
106
+ mutable loop: bool,
107
+ /**
108
+ Gets or sets a flag that indicates whether the client provides a set of controls for the media (in case the developer does not include controls for the player).
109
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/controls)
110
+ */
111
+ mutable controls: bool,
112
+ /**
113
+ Gets or sets the volume level for audio portions of the media element.
114
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/volume)
115
+ */
116
+ @throws(JsExn)
117
+ mutable volume: float,
118
+ /**
119
+ Gets or sets a flag that indicates whether the audio (either audio or the audio track on video media) is muted.
120
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/muted)
121
+ */
122
+ mutable muted: bool,
123
+ /**
124
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/defaultMuted)
125
+ */
126
+ mutable defaultMuted: bool,
127
+ /**
128
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/textTracks)
129
+ */
130
+ textTracks: TextTrackList.t,
131
+ /**
132
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/sinkId)
133
+ */
134
+ sinkId: string,
135
+ /**
136
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/remote)
137
+ */
138
+ remote: RemotePlaybackTypes.remotePlayback,
139
+ /**
140
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/disableRemotePlayback)
141
+ */
142
+ mutable disableRemotePlayback: bool,
143
+ }
144
+
145
+ module Impl = (
146
+ T: {
147
+ type t
148
+ },
149
+ ) => {
150
+ include HTMLElement.Impl({type t = T.t})
151
+
152
+ external asHTMLMediaElement: T.t => t = "%identity"
153
+
154
+ /**
155
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/addTextTrack)
156
+ */
157
+ @send
158
+ external addTextTrack: (
159
+ T.t,
160
+ ~kind: WebVttTypes.textTrackKind,
161
+ ~label: string=?,
162
+ ~language: string=?,
163
+ ) => WebVttTypes.textTrack = "addTextTrack"
164
+
165
+ /**
166
+ Returns a string that specifies whether the client can play a given media resource type.
167
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/canPlayType)
168
+ */
169
+ @send
170
+ external canPlayType: (T.t, string) => canPlayTypeResult = "canPlayType"
171
+
172
+ /**
173
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/fastSeek)
174
+ */
175
+ @send
176
+ external fastSeek: (T.t, float) => unit = "fastSeek"
177
+
178
+ /**
179
+ Resets the audio or video object and loads a new media resource.
180
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/load)
181
+ */
182
+ @send
183
+ external load: T.t => unit = "load"
184
+
185
+ /**
186
+ Pauses the current playback and sets paused to TRUE.
187
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/pause)
188
+ */
189
+ @send
190
+ external pause: T.t => unit = "pause"
191
+
192
+ /**
193
+ Loads and starts playback of a media resource.
194
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/play)
195
+ */
196
+ @send
197
+ external play: T.t => promise<unit> = "play"
198
+
199
+ /**
200
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/setSinkId)
201
+ */
202
+ @send
203
+ external setSinkId: (T.t, string) => promise<unit> = "setSinkId"
204
+ }
205
+
206
+ include Impl({type t = t})
@@ -0,0 +1,15 @@
1
+ /**
2
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/mediaKeys)
3
+ */
4
+ @get
5
+ external mediaKeys: DomHTMLMediaElement.t => Null.t<EncryptedMediaExtensionsTypes.mediaKeys> =
6
+ "mediaKeys"
7
+
8
+ /**
9
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/setMediaKeys)
10
+ */
11
+ @send
12
+ external setMediaKeys: (
13
+ DomHTMLMediaElement.t,
14
+ EncryptedMediaExtensionsTypes.mediaKeys,
15
+ ) => promise<unit> = "setMediaKeys"
@@ -0,0 +1,43 @@
1
+ @@warning("-30")
2
+
3
+ type mediaKeysRequirement = BaseEncryptedMediaExtensions.mediaKeysRequirement
4
+
5
+ type mediaKeySessionType = BaseEncryptedMediaExtensions.mediaKeySessionType
6
+
7
+ type mediaKeySessionClosedReason = BaseEncryptedMediaExtensions.mediaKeySessionClosedReason
8
+
9
+ type mediaKeyStatus = BaseEncryptedMediaExtensions.mediaKeyStatus
10
+
11
+ /**
12
+ This WebApiEncryptedMediaExtensions 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.
13
+ [See MediaKeySystemAccess on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySystemAccess)
14
+ */
15
+ @editor.completeFrom(MediaKeySystemAccess)
16
+ type mediaKeySystemAccess = BaseEncryptedMediaExtensions.mediaKeySystemAccess
17
+
18
+ /**
19
+ This WebApiEncryptedMediaExtensions API interface the represents a set of keys that an associated HTMLMediaElement can use for decryption of media data during playback.
20
+ [See MediaKeys on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeys)
21
+ */
22
+ @editor.completeFrom(MediaKeys)
23
+ type mediaKeys = BaseEncryptedMediaExtensions.mediaKeys
24
+
25
+ /**
26
+ This WebApiEncryptedMediaExtensions API interface is a read-only map of media key statuses by key IDs.
27
+ [See MediaKeyStatusMap on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeyStatusMap)
28
+ */
29
+ @editor.completeFrom(MediaKeyStatusMap)
30
+ type mediaKeyStatusMap = BaseEncryptedMediaExtensions.mediaKeyStatusMap
31
+
32
+ /**
33
+ This WebApiEncryptedMediaExtensions API interface represents a context for message exchange with a content decryption module (CDM).
34
+ [See MediaKeySession on MDN](https://developer.mozilla.org/docs/Web/API/MediaKeySession)
35
+ */
36
+ @editor.completeFrom(MediaKeySession)
37
+ type mediaKeySession = BaseEncryptedMediaExtensions.mediaKeySession
38
+
39
+ type mediaKeySystemMediaCapability = BaseEncryptedMediaExtensions.mediaKeySystemMediaCapability
40
+
41
+ type mediaKeySystemConfiguration = BaseEncryptedMediaExtensions.mediaKeySystemConfiguration
42
+
43
+ type mediaKeysPolicy = {mutable minHdcpVersion?: string}
@@ -0,0 +1,9 @@
1
+ /**
2
+ Provides access to the properties of <audio> elements, as well as methods to manipulate them. It derives from the HTMLMediaElement interface.
3
+ [See HTMLAudioElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLAudioElement)
4
+ */
5
+ type t = private {
6
+ ...DomHTMLMediaElement.t,
7
+ }
8
+
9
+ include DomHTMLMediaElement.Impl({type t = t})
@@ -0,0 +1,14 @@
1
+ /**
2
+ The HTMLTrackElement
3
+ [See HTMLTrackElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTrackElement)
4
+ TODO: mark as private once mutating fields of private records is allowed
5
+ */
6
+ type t = {
7
+ ...DOMTree.htmlElement,
8
+ /**
9
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLTrackElement/src)
10
+ */
11
+ mutable src: string,
12
+ }
13
+
14
+ include HTMLElement.Impl({type t = t})
@@ -0,0 +1,78 @@
1
+ type videoFrameCallbackMetadata = {
2
+ mutable presentationTime: float,
3
+ mutable expectedDisplayTime: float,
4
+ mutable width: int,
5
+ mutable height: int,
6
+ mutable mediaTime: float,
7
+ mutable presentedFrames: int,
8
+ mutable processingDuration?: float,
9
+ mutable captureTime?: float,
10
+ mutable receiveTime?: float,
11
+ mutable rtpTimestamp?: int,
12
+ }
13
+
14
+ /**
15
+ Provides special properties and methods for manipulating video objects. It also inherits properties and methods of HTMLMediaElement and HTMLElement.
16
+ [See HTMLVideoElement on MDN](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement)
17
+ TODO: mark as private once mutating fields of private records is allowed
18
+ */
19
+ type t = {
20
+ ...DomHTMLMediaElement.t,
21
+ /**
22
+ Gets or sets the width of the video element.
23
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement/width)
24
+ */
25
+ mutable width: int,
26
+ /**
27
+ Gets or sets the height of the video element.
28
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement/height)
29
+ */
30
+ mutable height: int,
31
+ /**
32
+ Gets the intrinsic width of a video in CSS pixels, or zero if the dimensions are not known.
33
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement/videoWidth)
34
+ */
35
+ videoWidth: int,
36
+ /**
37
+ Gets the intrinsic height of a video in CSS pixels, or zero if the dimensions are not known.
38
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement/videoHeight)
39
+ */
40
+ videoHeight: int,
41
+ /**
42
+ Gets or sets a WebApiURL of an image to display, for example, like a movie poster. This can be a still frame from the video, or another image if no video data is available.
43
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement/poster)
44
+ */
45
+ mutable poster: string,
46
+ /**
47
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement/disablePictureInPicture)
48
+ */
49
+ mutable disablePictureInPicture: bool,
50
+ }
51
+
52
+ include DomHTMLMediaElement.Impl({type t = t})
53
+
54
+ /**
55
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement/getVideoPlaybackQuality)
56
+ */
57
+ @send
58
+ external getVideoPlaybackQuality: t => VideoPlaybackQuality.t = "getVideoPlaybackQuality"
59
+
60
+ /**
61
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement/requestPictureInPicture)
62
+ */
63
+ @send
64
+ external requestPictureInPicture: t => promise<PictureInPictureTypes.pictureInPictureWindow> =
65
+ "requestPictureInPicture"
66
+
67
+ /**
68
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement/requestVideoFrameCallback)
69
+ */
70
+ @send
71
+ external requestVideoFrameCallback: (t, (float, videoFrameCallbackMetadata) => unit) => int =
72
+ "requestVideoFrameCallback"
73
+
74
+ /**
75
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement/cancelVideoFrameCallback)
76
+ */
77
+ @send
78
+ external cancelVideoFrameCallback: (t, int) => unit = "cancelVideoFrameCallback"
@@ -0,0 +1,19 @@
1
+ /**
2
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaCapabilities/decodingInfo)
3
+ */
4
+ @send
5
+ external decodingInfo: (
6
+ MediaCapabilitiesTypes.mediaCapabilities,
7
+ MediaCapabilitiesTypes.mediaDecodingConfiguration,
8
+ ) => promise<MediaCapabilitiesTypes.mediaCapabilitiesDecodingInfo> = "decodingInfo"
9
+
10
+ /**
11
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaCapabilities/encodingInfo)
12
+ */
13
+ @send
14
+ external encodingInfo: (
15
+ MediaCapabilitiesTypes.mediaCapabilities,
16
+ MediaCapabilitiesTypes.mediaEncodingConfiguration,
17
+ ) => promise<MediaCapabilitiesTypes.mediaCapabilitiesEncodingInfo> = "encodingInfo"
18
+
19
+ module Types = MediaCapabilitiesTypes
@@ -0,0 +1,83 @@
1
+ @@warning("-30")
2
+ type hdrMetadataType =
3
+ | @as("smpteSt2086") SmpteSt2086
4
+ | @as("smpteSt2094-10") SmpteSt209410
5
+ | @as("smpteSt2094-40") SmpteSt209440
6
+
7
+ type colorGamut =
8
+ | @as("p3") P3
9
+ | @as("rec2020") Rec2020
10
+ | @as("srgb") Srgb
11
+
12
+ type transferFunction =
13
+ | @as("hlg") Hlg
14
+ | @as("pq") Pq
15
+ | @as("srgb") Srgb
16
+
17
+ type mediaDecodingType =
18
+ | @as("file") File
19
+ | @as("media-source") MediaSource
20
+ | @as("webrtc") Webrtc
21
+
22
+ type mediaEncodingType =
23
+ | @as("record") Record
24
+ | @as("webrtc") Webrtc
25
+
26
+ /**
27
+ [See WebApiMediaCapabilities on MDN](https://developer.mozilla.org/docs/Web/API/MediaCapabilities)
28
+ */
29
+ @editor.completeFrom(WebApiMediaCapabilities)
30
+ type mediaCapabilities = private {}
31
+
32
+ type audioConfiguration = {
33
+ mutable contentType: string,
34
+ mutable channels?: string,
35
+ mutable bitrate?: int,
36
+ mutable samplerate?: int,
37
+ mutable spatialRendering?: bool,
38
+ }
39
+
40
+ type videoConfiguration = {
41
+ mutable contentType: string,
42
+ mutable width: int,
43
+ mutable height: int,
44
+ mutable bitrate: int,
45
+ mutable framerate: float,
46
+ mutable hasAlphaChannel?: bool,
47
+ mutable hdrMetadataType?: hdrMetadataType,
48
+ mutable colorGamut?: colorGamut,
49
+ mutable transferFunction?: transferFunction,
50
+ mutable scalabilityMode?: string,
51
+ }
52
+
53
+ type mediaConfiguration = {
54
+ mutable video?: videoConfiguration,
55
+ mutable audio?: audioConfiguration,
56
+ }
57
+
58
+ type mediaDecodingConfiguration = {
59
+ ...mediaConfiguration,
60
+ @as("type") mutable type_: mediaDecodingType,
61
+ }
62
+
63
+ type mediaCapabilitiesInfo = {
64
+ mutable supported: bool,
65
+ mutable smooth: bool,
66
+ mutable powerEfficient: bool,
67
+ }
68
+
69
+ type mediaCapabilitiesDecodingInfo = {
70
+ ...mediaCapabilitiesInfo,
71
+ mutable keySystemAccess: Null.t<BaseEncryptedMediaExtensions.mediaKeySystemAccess>,
72
+ mutable configuration: mediaDecodingConfiguration,
73
+ }
74
+
75
+ type mediaEncodingConfiguration = {
76
+ ...mediaConfiguration,
77
+ @as("type") mutable type_: mediaEncodingType,
78
+ }
79
+
80
+ type mediaCapabilitiesEncodingInfo = {
81
+ ...mediaCapabilitiesInfo,
82
+ mutable configuration: mediaEncodingConfiguration,
83
+ }
@@ -0,0 +1,197 @@
1
+ @@warning("-30")
2
+
3
+ type mediaDeviceKind =
4
+ | @as("audioinput") Audioinput
5
+ | @as("audiooutput") Audiooutput
6
+ | @as("videoinput") Videoinput
7
+
8
+ type mediaStreamTrackState =
9
+ | @as("ended") Ended
10
+ | @as("live") Live
11
+
12
+ /**
13
+ Provides access to connected media input devices like cameras and microphones, as well as screen sharing. In essence, it lets you obtain access to any hardware source of media data.
14
+ [See MediaDevices on MDN](https://developer.mozilla.org/docs/Web/API/MediaDevices)
15
+ */
16
+ @editor.completeFrom(MediaDevices)
17
+ type mediaDevices = private {
18
+ ...DOM.eventTarget,
19
+ }
20
+
21
+ /**
22
+ The MediaDevicesInfo interface contains information that describes a single media input or output device.
23
+ [See MediaDeviceInfo on MDN](https://developer.mozilla.org/docs/Web/API/MediaDeviceInfo)
24
+ */
25
+ @editor.completeFrom(MediaDeviceInfo)
26
+ type mediaDeviceInfo = private {
27
+ /**
28
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaDeviceInfo/deviceId)
29
+ */
30
+ deviceId: string,
31
+ /**
32
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaDeviceInfo/kind)
33
+ */
34
+ kind: mediaDeviceKind,
35
+ /**
36
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaDeviceInfo/label)
37
+ */
38
+ label: string,
39
+ /**
40
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaDeviceInfo/groupId)
41
+ */
42
+ groupId: string,
43
+ }
44
+
45
+ /**
46
+ A stream of media content. A stream consists of several tracks such as video or audio tracks. Each track is specified as an instance of MediaStreamTrack.
47
+ [See MediaStream on MDN](https://developer.mozilla.org/docs/Web/API/MediaStream)
48
+ */
49
+ @editor.completeFrom(MediaStream)
50
+ type mediaStream = private {
51
+ ...DOM.eventTarget,
52
+ /**
53
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaStream/id)
54
+ */
55
+ id: string,
56
+ /**
57
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaStream/active)
58
+ */
59
+ active: bool,
60
+ }
61
+
62
+ /**
63
+ A single media track within a stream; typically, these are audio or video tracks, but other track types may exist as well.
64
+ [See MediaStreamTrack on MDN](https://developer.mozilla.org/docs/Web/API/MediaStreamTrack)
65
+ TODO: mark as private once mutating fields of private records is allowed
66
+ */
67
+ @editor.completeFrom(MediaStreamTrack)
68
+ type mediaStreamTrack = {
69
+ ...DOM.eventTarget,
70
+ /**
71
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaStreamTrack/kind)
72
+ */
73
+ kind: string,
74
+ /**
75
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaStreamTrack/id)
76
+ */
77
+ id: string,
78
+ /**
79
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaStreamTrack/label)
80
+ */
81
+ label: string,
82
+ /**
83
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaStreamTrack/enabled)
84
+ */
85
+ mutable enabled: bool,
86
+ /**
87
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaStreamTrack/muted)
88
+ */
89
+ muted: bool,
90
+ /**
91
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaStreamTrack/readyState)
92
+ */
93
+ readyState: mediaStreamTrackState,
94
+ /**
95
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaStreamTrack/contentHint)
96
+ */
97
+ mutable contentHint: string,
98
+ }
99
+
100
+ type mediaTrackSupportedConstraints = {
101
+ mutable width?: bool,
102
+ mutable height?: bool,
103
+ mutable aspectRatio?: bool,
104
+ mutable frameRate?: bool,
105
+ mutable facingMode?: bool,
106
+ mutable sampleRate?: bool,
107
+ mutable sampleSize?: bool,
108
+ mutable echoCancellation?: bool,
109
+ mutable autoGainControl?: bool,
110
+ mutable noiseSuppression?: bool,
111
+ mutable channelCount?: bool,
112
+ mutable deviceId?: bool,
113
+ mutable groupId?: bool,
114
+ mutable backgroundBlur?: bool,
115
+ mutable displaySurface?: bool,
116
+ }
117
+
118
+ type mediaStreamConstraints = {
119
+ mutable video?: unknown,
120
+ mutable audio?: unknown,
121
+ mutable preferCurrentTab?: bool,
122
+ mutable peerIdentity?: string,
123
+ }
124
+
125
+ type displayMediaStreamOptions = {
126
+ mutable video?: unknown,
127
+ mutable audio?: unknown,
128
+ }
129
+
130
+ type uLongRange = {
131
+ mutable max?: int,
132
+ mutable min?: int,
133
+ }
134
+
135
+ type doubleRange = {
136
+ mutable max?: float,
137
+ mutable min?: float,
138
+ }
139
+
140
+ type mediaTrackCapabilities = {
141
+ mutable width?: uLongRange,
142
+ mutable height?: uLongRange,
143
+ mutable aspectRatio?: doubleRange,
144
+ mutable frameRate?: doubleRange,
145
+ mutable facingMode?: array<string>,
146
+ mutable sampleRate?: uLongRange,
147
+ mutable sampleSize?: uLongRange,
148
+ mutable echoCancellation?: array<bool>,
149
+ mutable autoGainControl?: array<bool>,
150
+ mutable noiseSuppression?: array<bool>,
151
+ mutable channelCount?: uLongRange,
152
+ mutable deviceId?: string,
153
+ mutable groupId?: string,
154
+ mutable backgroundBlur?: array<bool>,
155
+ mutable displaySurface?: string,
156
+ }
157
+
158
+ type mediaTrackConstraintSet = {
159
+ mutable width?: int,
160
+ mutable height?: int,
161
+ mutable aspectRatio?: float,
162
+ mutable frameRate?: float,
163
+ mutable facingMode?: string,
164
+ mutable sampleRate?: int,
165
+ mutable sampleSize?: int,
166
+ mutable echoCancellation?: bool,
167
+ mutable autoGainControl?: bool,
168
+ mutable noiseSuppression?: bool,
169
+ mutable channelCount?: int,
170
+ mutable deviceId?: string,
171
+ mutable groupId?: string,
172
+ mutable backgroundBlur?: bool,
173
+ mutable displaySurface?: string,
174
+ }
175
+
176
+ type mediaTrackConstraints = {
177
+ ...mediaTrackConstraintSet,
178
+ mutable advanced?: array<mediaTrackConstraintSet>,
179
+ }
180
+
181
+ type mediaTrackSettings = {
182
+ mutable width?: int,
183
+ mutable height?: int,
184
+ mutable aspectRatio?: float,
185
+ mutable frameRate?: float,
186
+ mutable facingMode?: string,
187
+ mutable sampleRate?: int,
188
+ mutable sampleSize?: int,
189
+ mutable echoCancellation?: bool,
190
+ mutable autoGainControl?: bool,
191
+ mutable noiseSuppression?: bool,
192
+ mutable channelCount?: int,
193
+ mutable deviceId?: string,
194
+ mutable groupId?: string,
195
+ mutable backgroundBlur?: bool,
196
+ mutable displaySurface?: string,
197
+ }
@@ -0,0 +1,9 @@
1
+ type t = MediaCaptureAndStreamsTypes.mediaDeviceInfo = private {
2
+ ...MediaCaptureAndStreamsTypes.mediaDeviceInfo,
3
+ }
4
+
5
+ /**
6
+ [Read more on MDN](https://developer.mozilla.org/docs/Web/API/MediaDeviceInfo/toJSON)
7
+ */
8
+ @send
9
+ external toJSON: t => Dict.t<string> = "toJSON"