@@ -129,12 +129,49 @@ type ClipboardEvents r =
129
129
| r
130
130
)
131
131
132
+ type MediaEvents r =
133
+ ( onLoadStart :: Event
134
+ , onProgress :: Event
135
+ , onSuspend :: Event
136
+ , onAbort :: Event
137
+ , onError :: Event
138
+ , onEmptied :: Event
139
+ , onStalled :: Event
140
+ , onLoadedMetadata :: Event
141
+ , onLoadedData :: Event
142
+ , onCanPlay :: Event
143
+ , onCanPlayThrough :: Event
144
+ , onPlaying :: Event
145
+ , onWaiting :: Event
146
+ , onSeeking :: Event
147
+ , onSeeked :: Event
148
+ , onEnded :: Event
149
+ , onDurationChange :: Event
150
+ , onTimeUpdate :: Event
151
+ , onPlay :: Event
152
+ , onPause :: Event
153
+ , onRateChange :: Event
154
+ , onResize :: Event
155
+ , onVolumeChange :: Event
156
+ | r
157
+ )
158
+
132
159
type InteractiveEvents r = ClipboardEvents (FocusEvents (TransitionEvents (KeyEvents (PointerEvents (TouchEvents (DragEvents (MouseEvents (onWheel :: WheelEvent | r ))))))))
133
160
134
161
type GlobalProperties r = GlobalAttributes (GlobalEvents r )
135
162
136
163
type Interactive r = InteractiveEvents (GlobalProperties r )
137
164
165
+ type Media r = Interactive (MediaEvents
166
+ ( autoplay :: Boolean
167
+ , controls :: Boolean
168
+ , loop :: Boolean
169
+ , muted :: Boolean
170
+ , preload :: PreloadValue
171
+ , src :: String
172
+ | r
173
+ ))
174
+
138
175
type Noninteractive r = GlobalProperties r
139
176
140
177
type HTMLa = Interactive
@@ -166,15 +203,7 @@ type HTMLarticle = Interactive ()
166
203
167
204
type HTMLaside = Interactive ()
168
205
169
- type HTMLaudio = Interactive
170
- ( autoplay :: Boolean
171
- , controls :: Boolean
172
- , loop :: Boolean
173
- , muted :: Boolean
174
- , preload :: PreloadValue
175
- , src :: String
176
- , onError :: Event
177
- )
206
+ type HTMLaudio = Media ()
178
207
179
208
type HTMLb = Interactive ()
180
209
@@ -630,19 +659,11 @@ type HTMLul = Interactive (onScroll :: Event)
630
659
631
660
type HTMLvar = Interactive ()
632
661
633
- type HTMLvideo = Interactive
634
- ( autoplay :: Boolean
635
- , controls :: Boolean
636
- , height :: CSSPixel
637
- , loop :: Boolean
638
- , muted :: Boolean
662
+ type HTMLvideo = Media
663
+ ( height :: CSSPixel
639
664
, poster :: String
640
- , preload :: PreloadValue
641
- , src :: String
642
665
, width :: CSSPixel
643
666
, type :: MediaType
644
- , onError :: Event
645
- , onTimeUpdate :: Event
646
667
)
647
668
648
669
type HTMLwbr = Interactive ()
0 commit comments