-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathDomHTMLMediaElement.res
More file actions
62 lines (53 loc) · 1.7 KB
/
Copy pathDomHTMLMediaElement.res
File metadata and controls
62 lines (53 loc) · 1.7 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
module Impl = (
T: {
type t
},
) => {
include HTMLElement.Impl({type t = DomTypes.htmlMediaElement})
external asHTMLMediaElement: T.t => DomTypes.htmlMediaElement = "%identity"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/addTextTrack)
*/
@send
external addTextTrack: (
T.t,
~kind: WebVttTypes.textTrackKind,
~label: string=?,
~language: string=?,
) => WebVttTypes.textTrack = "addTextTrack"
/**
Returns a string that specifies whether the client can play a given media resource type.
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/canPlayType)
*/
@send
external canPlayType: (T.t, string) => DomTypes.canPlayTypeResult = "canPlayType"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/fastSeek)
*/
@send
external fastSeek: (T.t, float) => unit = "fastSeek"
/**
Resets the audio or video object and loads a new media resource.
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/load)
*/
@send
external load: T.t => unit = "load"
/**
Pauses the current playback and sets paused to TRUE.
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/pause)
*/
@send
external pause: T.t => unit = "pause"
/**
Loads and starts playback of a media resource.
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/play)
*/
@send
external play: T.t => promise<unit> = "play"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/setSinkId)
*/
@send
external setSinkId: (T.t, string) => promise<unit> = "setSinkId"
}
include Impl({type t = DomTypes.htmlMediaElement})