/
VTTCue.cljs
169 lines (126 loc) · 3.7 KB
/
VTTCue.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
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
(ns web.vtt.VTTCue
"This interface also inherits properties from `web.media.TextTrackCue`."
(:refer-clojure :exclude []))
(defn get-cue-as-html
"Method.
Returns the cue text as a DocumentFragment."
[this & args]
(-> this .-getCueAsHTML (.apply this (clj->js args))))
(defn region
"Property.
A VTTRegion object describing the video's sub-region that the
will be drawn onto, or null if none is assigned."
[this]
(-> this (.-region)))
(defn set-region!
"Property.
A VTTRegion object describing the video's sub-region that the
will be drawn onto, or null if none is assigned."
[this val]
(aset this "region" val))
(defn vertical
"Property.
Returns an enum representing the cue writing direction."
[this]
(-> this (.-vertical)))
(defn set-vertical!
"Property.
Returns an enum representing the cue writing direction."
[this val]
(aset this "vertical" val))
(defn snap-to-lines
"Property.
Returns true if the VTTCue.line attribute is an integer number
lines or a percentage of the video size."
[this]
(-> this (.-snapToLines)))
(defn set-snap-to-lines!
"Property.
Returns true if the VTTCue.line attribute is an integer number
lines or a percentage of the video size."
[this val]
(aset this "snapToLines" val))
(defn line
"Property.
Returns the line positioning of the cue. This can be the string
or a number whose interpretation depends on the value of VTTCue.snapToLines."
[this]
(-> this (.-line)))
(defn set-line!
"Property.
Returns the line positioning of the cue. This can be the string
or a number whose interpretation depends on the value of VTTCue.snapToLines."
[this val]
(aset this "line" val))
(defn line-align
"Property.
Returns an enum representing the alignment of the VTTCue.line."
[this]
(-> this (.-lineAlign)))
(defn set-line-align!
"Property.
Returns an enum representing the alignment of the VTTCue.line."
[this val]
(aset this "lineAlign" val))
(defn position
"Property.
Returns the indentation of the cue within the line. This can
the string auto or a number representing the percentage of the
or the video size if VTTCue.region is null."
[this]
(-> this (.-position)))
(defn set-position!
"Property.
Returns the indentation of the cue within the line. This can
the string auto or a number representing the percentage of the
or the video size if VTTCue.region is null."
[this val]
(aset this "position" val))
(defn position-align
"Property.
Returns an enum representing the alignment of the cue. This is
to determine what the VTTCue.position is anchored to. The default
auto."
[this]
(-> this (.-positionAlign)))
(defn set-position-align!
"Property.
Returns an enum representing the alignment of the cue. This is
to determine what the VTTCue.position is anchored to. The default
auto."
[this val]
(aset this "positionAlign" val))
(defn size
"Property.
Returns a double representing the size of the cue, as a percentage
the video size."
[this]
(-> this (.-size)))
(defn set-size!
"Property.
Returns a double representing the size of the cue, as a percentage
the video size."
[this val]
(aset this "size" val))
(defn text-align
"Property.
Returns an enum representing the alignment of all the lines of
within the cue box."
[this]
(-> this (.-textAlign)))
(defn set-text-align!
"Property.
Returns an enum representing the alignment of all the lines of
within the cue box."
[this val]
(aset this "textAlign" val))
(defn text
"Property.
Returns a DOMString with the contents of the cue."
[this]
(-> this (.-text)))
(defn set-text!
"Property.
Returns a DOMString with the contents of the cue."
[this val]
(aset this "text" val))