/
TextTrack.cljs
62 lines (45 loc) · 1.73 KB
/
TextTrack.cljs
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
(ns web.media.TextTrack
"This interface also inherits properties from `web.EventTarget`."
(:refer-clojure :exclude []))
(defn add-cue
"Method.
Adds a cue (specified as a TextTrackCue object to the track's
of cues."
[this & args]
(apply (-> this .-addCue) (concat [this] args)))
(defn active-cues
"Property.
A TextTrackCueList object listing the currently active set of
track cues. Track cues are active if the current playback position
the media is between the cues' start and end times. Thus, for
cues such as captions or subtitles, the active cues are currently
displayed."
[this]
(-> this (.activeCues)))
(defn set-active-cues!
"Property.
A TextTrackCueList object listing the currently active set of
track cues. Track cues are active if the current playback position
the media is between the cues' start and end times. Thus, for
cues such as captions or subtitles, the active cues are currently
displayed."
[this val]
(aset this "activeCues" val))
(defn mode
"Property.
The `web.media.TextTrack` interface's mode property is a string
and controlling the text track's mode: disabled, hidden, or showing.
`var mode = textTrack.mode;
textTrack.mode = \\\"disabled\\\" | \\\"hidden\\\" | \\\"showing\\\";`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/TextTrack/mode`"
[this]
(-> this (.mode)))
(defn set-mode!
"Property.
The `web.media.TextTrack` interface's mode property is a string
and controlling the text track's mode: disabled, hidden, or showing.
`var mode = textTrack.mode;
textTrack.mode = \\\"disabled\\\" | \\\"hidden\\\" | \\\"showing\\\";`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/TextTrack/mode`"
[this val]
(aset this "mode" val))