@videojs/react 10.0.0-beta.10 → 10.0.0-beta.11
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.
- package/dist/default/index.js +9 -2
- package/dist/default/ui/alert-dialog/alert-dialog-root.js +1 -1
- package/dist/default/ui/buffering-indicator/buffering-indicator.js +1 -1
- package/dist/default/ui/captions-button/captions-button.js +1 -1
- package/dist/default/ui/controls/controls-root.js +1 -1
- package/dist/default/ui/fullscreen-button/fullscreen-button.js +1 -1
- package/dist/default/ui/mute-button/mute-button.js +1 -1
- package/dist/default/ui/pip-button/pip-button.js +1 -1
- package/dist/default/ui/play-button/play-button.js +1 -1
- package/dist/default/ui/playback-rate-button/playback-rate-button.js +1 -1
- package/dist/default/ui/popover/popover-root.js +1 -1
- package/dist/default/ui/poster/poster.js +1 -1
- package/dist/default/ui/seek-button/seek-button.js +1 -1
- package/dist/default/ui/slider/slider-root.js +1 -1
- package/dist/default/ui/thumbnail/thumbnail.js +1 -1
- package/dist/default/ui/time/time-value.js +1 -1
- package/dist/default/ui/time-slider/time-slider-root.js +1 -1
- package/dist/default/ui/tooltip/tooltip-popup.js +1 -1
- package/dist/default/ui/tooltip/tooltip-provider.js +1 -1
- package/dist/default/ui/tooltip/tooltip-root.js +1 -1
- package/dist/default/ui/volume-slider/volume-slider-root.js +1 -1
- package/dist/dev/index.d.ts +9 -2
- package/dist/dev/index.js +9 -2
- package/dist/dev/player/context.d.ts +11 -1
- package/dist/dev/player/context.d.ts.map +1 -1
- package/dist/dev/ui/alert-dialog/alert-dialog-close.d.ts +1 -1
- package/dist/dev/ui/alert-dialog/alert-dialog-description.d.ts +1 -1
- package/dist/dev/ui/alert-dialog/alert-dialog-popup.d.ts +1 -1
- package/dist/dev/ui/alert-dialog/alert-dialog-root.d.ts +1 -1
- package/dist/dev/ui/alert-dialog/alert-dialog-root.js +1 -1
- package/dist/dev/ui/alert-dialog/alert-dialog-title.d.ts +1 -1
- package/dist/dev/ui/alert-dialog/context.d.ts +2 -3
- package/dist/dev/ui/alert-dialog/context.d.ts.map +1 -1
- package/dist/dev/ui/buffering-indicator/buffering-indicator.d.ts +1 -1
- package/dist/dev/ui/buffering-indicator/buffering-indicator.js +1 -1
- package/dist/dev/ui/captions-button/captions-button.d.ts +1 -1
- package/dist/dev/ui/captions-button/captions-button.js +1 -1
- package/dist/dev/ui/controls/controls-group.d.ts +1 -1
- package/dist/dev/ui/controls/controls-root.d.ts +1 -1
- package/dist/dev/ui/controls/controls-root.js +1 -1
- package/dist/dev/ui/fullscreen-button/fullscreen-button.d.ts +1 -1
- package/dist/dev/ui/fullscreen-button/fullscreen-button.js +1 -1
- package/dist/dev/ui/hooks/use-slider.d.ts +1 -1
- package/dist/dev/ui/mute-button/mute-button.d.ts +1 -1
- package/dist/dev/ui/mute-button/mute-button.js +1 -1
- package/dist/dev/ui/pip-button/pip-button.d.ts +1 -1
- package/dist/dev/ui/pip-button/pip-button.js +1 -1
- package/dist/dev/ui/play-button/play-button.d.ts +1 -1
- package/dist/dev/ui/play-button/play-button.js +1 -1
- package/dist/dev/ui/playback-rate-button/playback-rate-button.d.ts +1 -1
- package/dist/dev/ui/playback-rate-button/playback-rate-button.js +1 -1
- package/dist/dev/ui/popover/context.d.ts +2 -3
- package/dist/dev/ui/popover/context.d.ts.map +1 -1
- package/dist/dev/ui/popover/popover-arrow.d.ts +1 -1
- package/dist/dev/ui/popover/popover-popup.d.ts +1 -1
- package/dist/dev/ui/popover/popover-root.d.ts +1 -1
- package/dist/dev/ui/popover/popover-root.js +1 -1
- package/dist/dev/ui/popover/popover-trigger.d.ts +1 -1
- package/dist/dev/ui/poster/poster.d.ts +1 -1
- package/dist/dev/ui/poster/poster.js +1 -1
- package/dist/dev/ui/seek-button/seek-button.d.ts +1 -1
- package/dist/dev/ui/seek-button/seek-button.js +1 -1
- package/dist/dev/ui/slider/slider-buffer.d.ts +1 -1
- package/dist/dev/ui/slider/slider-fill.d.ts +1 -1
- package/dist/dev/ui/slider/slider-preview.d.ts +1 -1
- package/dist/dev/ui/slider/slider-root.d.ts +1 -1
- package/dist/dev/ui/slider/slider-root.js +1 -1
- package/dist/dev/ui/slider/slider-thumb.d.ts +1 -1
- package/dist/dev/ui/slider/slider-thumbnail.d.ts +1 -1
- package/dist/dev/ui/slider/slider-track.d.ts +1 -1
- package/dist/dev/ui/slider/slider-value.d.ts +1 -1
- package/dist/dev/ui/thumbnail/thumbnail.d.ts +1 -1
- package/dist/dev/ui/thumbnail/thumbnail.js +1 -1
- package/dist/dev/ui/time/time-value.d.ts +1 -1
- package/dist/dev/ui/time/time-value.js +1 -1
- package/dist/dev/ui/time-slider/time-slider-root.d.ts +1 -1
- package/dist/dev/ui/time-slider/time-slider-root.js +1 -1
- package/dist/dev/ui/tooltip/context.d.ts +2 -3
- package/dist/dev/ui/tooltip/context.d.ts.map +1 -1
- package/dist/dev/ui/tooltip/tooltip-arrow.d.ts +1 -1
- package/dist/dev/ui/tooltip/tooltip-popup.d.ts +1 -1
- package/dist/dev/ui/tooltip/tooltip-popup.js +1 -1
- package/dist/dev/ui/tooltip/tooltip-provider.d.ts +1 -1
- package/dist/dev/ui/tooltip/tooltip-provider.js +1 -1
- package/dist/dev/ui/tooltip/tooltip-root.d.ts +1 -1
- package/dist/dev/ui/tooltip/tooltip-root.js +1 -1
- package/dist/dev/ui/tooltip/tooltip-trigger.d.ts +1 -1
- package/dist/dev/ui/volume-slider/volume-slider-root.d.ts +1 -1
- package/dist/dev/ui/volume-slider/volume-slider-root.js +1 -1
- package/dist/dev/utils/attach-media-element.d.ts +9 -0
- package/dist/dev/utils/attach-media-element.d.ts.map +1 -0
- package/dist/dev/utils/media-props.d.ts +307 -0
- package/dist/dev/utils/media-props.d.ts.map +1 -0
- package/dist/dev/utils/use-composed-refs.d.ts +29 -0
- package/dist/dev/utils/use-composed-refs.d.ts.map +1 -0
- package/dist/dev/utils/use-destroy.d.ts +22 -0
- package/dist/dev/utils/use-destroy.d.ts.map +1 -0
- package/dist/dev/utils/use-latest-ref.d.ts +18 -0
- package/dist/dev/utils/use-latest-ref.d.ts.map +1 -0
- package/dist/dev/utils/use-media-instance.d.ts +16 -0
- package/dist/dev/utils/use-media-instance.d.ts.map +1 -0
- package/package.json +9 -9
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
import { MediaApi } from "@videojs/core/dom";
|
|
2
|
+
import * as react from "react";
|
|
3
|
+
import { VideoHTMLAttributes } from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/utils/media-props.d.ts
|
|
6
|
+
interface VideoProps extends VideoHTMLAttributes<HTMLVideoElement> {}
|
|
7
|
+
declare function mediaProps(media: MediaApi, props: VideoProps): {
|
|
8
|
+
height?: number | string | undefined;
|
|
9
|
+
playsInline?: boolean | undefined;
|
|
10
|
+
poster?: string | undefined;
|
|
11
|
+
width?: number | string | undefined;
|
|
12
|
+
disablePictureInPicture?: boolean | undefined;
|
|
13
|
+
disableRemotePlayback?: boolean | undefined;
|
|
14
|
+
onResize?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
15
|
+
onResizeCapture?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
16
|
+
autoPlay?: boolean | undefined;
|
|
17
|
+
controls?: boolean | undefined;
|
|
18
|
+
controlsList?: string | undefined;
|
|
19
|
+
crossOrigin?: "" | "anonymous" | "use-credentials" | undefined;
|
|
20
|
+
loop?: boolean | undefined;
|
|
21
|
+
mediaGroup?: string | undefined;
|
|
22
|
+
muted?: boolean | undefined;
|
|
23
|
+
preload?: string | undefined;
|
|
24
|
+
defaultChecked?: boolean | undefined;
|
|
25
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
26
|
+
suppressContentEditableWarning?: boolean | undefined;
|
|
27
|
+
suppressHydrationWarning?: boolean | undefined;
|
|
28
|
+
accessKey?: string | undefined;
|
|
29
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {});
|
|
30
|
+
autoFocus?: boolean | undefined;
|
|
31
|
+
className?: string | undefined;
|
|
32
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
33
|
+
contextMenu?: string | undefined;
|
|
34
|
+
dir?: string | undefined;
|
|
35
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
36
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
37
|
+
hidden?: boolean | undefined;
|
|
38
|
+
id?: string | undefined;
|
|
39
|
+
lang?: string | undefined;
|
|
40
|
+
nonce?: string | undefined;
|
|
41
|
+
slot?: string | undefined;
|
|
42
|
+
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
43
|
+
style?: react.CSSProperties | undefined;
|
|
44
|
+
tabIndex?: number | undefined;
|
|
45
|
+
title?: string | undefined;
|
|
46
|
+
translate?: "yes" | "no" | undefined;
|
|
47
|
+
radioGroup?: string | undefined;
|
|
48
|
+
role?: react.AriaRole | undefined;
|
|
49
|
+
about?: string | undefined;
|
|
50
|
+
content?: string | undefined;
|
|
51
|
+
datatype?: string | undefined;
|
|
52
|
+
inlist?: any;
|
|
53
|
+
prefix?: string | undefined;
|
|
54
|
+
property?: string | undefined;
|
|
55
|
+
rel?: string | undefined;
|
|
56
|
+
resource?: string | undefined;
|
|
57
|
+
rev?: string | undefined;
|
|
58
|
+
typeof?: string | undefined;
|
|
59
|
+
vocab?: string | undefined;
|
|
60
|
+
autoCorrect?: string | undefined;
|
|
61
|
+
autoSave?: string | undefined;
|
|
62
|
+
color?: string | undefined;
|
|
63
|
+
itemProp?: string | undefined;
|
|
64
|
+
itemScope?: boolean | undefined;
|
|
65
|
+
itemType?: string | undefined;
|
|
66
|
+
itemID?: string | undefined;
|
|
67
|
+
itemRef?: string | undefined;
|
|
68
|
+
results?: number | undefined;
|
|
69
|
+
security?: string | undefined;
|
|
70
|
+
unselectable?: "on" | "off" | undefined;
|
|
71
|
+
popover?: "" | "auto" | "manual" | "hint" | undefined;
|
|
72
|
+
popoverTargetAction?: "toggle" | "show" | "hide" | undefined;
|
|
73
|
+
popoverTarget?: string | undefined;
|
|
74
|
+
inert?: boolean | undefined;
|
|
75
|
+
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
76
|
+
is?: string | undefined;
|
|
77
|
+
exportparts?: string | undefined;
|
|
78
|
+
part?: string | undefined;
|
|
79
|
+
"aria-activedescendant"?: string | undefined;
|
|
80
|
+
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
81
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
|
82
|
+
"aria-braillelabel"?: string | undefined;
|
|
83
|
+
"aria-brailleroledescription"?: string | undefined;
|
|
84
|
+
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
85
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
86
|
+
"aria-colcount"?: number | undefined;
|
|
87
|
+
"aria-colindex"?: number | undefined;
|
|
88
|
+
"aria-colindextext"?: string | undefined;
|
|
89
|
+
"aria-colspan"?: number | undefined;
|
|
90
|
+
"aria-controls"?: string | undefined;
|
|
91
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
|
|
92
|
+
"aria-describedby"?: string | undefined;
|
|
93
|
+
"aria-description"?: string | undefined;
|
|
94
|
+
"aria-details"?: string | undefined;
|
|
95
|
+
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
96
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
|
|
97
|
+
"aria-errormessage"?: string | undefined;
|
|
98
|
+
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
99
|
+
"aria-flowto"?: string | undefined;
|
|
100
|
+
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
101
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
|
|
102
|
+
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
103
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
|
|
104
|
+
"aria-keyshortcuts"?: string | undefined;
|
|
105
|
+
"aria-label"?: string | undefined;
|
|
106
|
+
"aria-labelledby"?: string | undefined;
|
|
107
|
+
"aria-level"?: number | undefined;
|
|
108
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
109
|
+
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
110
|
+
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
111
|
+
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
112
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
113
|
+
"aria-owns"?: string | undefined;
|
|
114
|
+
"aria-placeholder"?: string | undefined;
|
|
115
|
+
"aria-posinset"?: number | undefined;
|
|
116
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
117
|
+
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
118
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
|
|
119
|
+
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
120
|
+
"aria-roledescription"?: string | undefined;
|
|
121
|
+
"aria-rowcount"?: number | undefined;
|
|
122
|
+
"aria-rowindex"?: number | undefined;
|
|
123
|
+
"aria-rowindextext"?: string | undefined;
|
|
124
|
+
"aria-rowspan"?: number | undefined;
|
|
125
|
+
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
126
|
+
"aria-setsize"?: number | undefined;
|
|
127
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
128
|
+
"aria-valuemax"?: number | undefined;
|
|
129
|
+
"aria-valuemin"?: number | undefined;
|
|
130
|
+
"aria-valuenow"?: number | undefined;
|
|
131
|
+
"aria-valuetext"?: string | undefined;
|
|
132
|
+
children?: react.ReactNode | undefined;
|
|
133
|
+
dangerouslySetInnerHTML?: {
|
|
134
|
+
__html: string | TrustedHTML;
|
|
135
|
+
} | undefined;
|
|
136
|
+
onCopy?: react.ClipboardEventHandler<HTMLVideoElement> | undefined;
|
|
137
|
+
onCopyCapture?: react.ClipboardEventHandler<HTMLVideoElement> | undefined;
|
|
138
|
+
onCut?: react.ClipboardEventHandler<HTMLVideoElement> | undefined;
|
|
139
|
+
onCutCapture?: react.ClipboardEventHandler<HTMLVideoElement> | undefined;
|
|
140
|
+
onPaste?: react.ClipboardEventHandler<HTMLVideoElement> | undefined;
|
|
141
|
+
onPasteCapture?: react.ClipboardEventHandler<HTMLVideoElement> | undefined;
|
|
142
|
+
onCompositionEnd?: react.CompositionEventHandler<HTMLVideoElement> | undefined;
|
|
143
|
+
onCompositionEndCapture?: react.CompositionEventHandler<HTMLVideoElement> | undefined;
|
|
144
|
+
onCompositionStart?: react.CompositionEventHandler<HTMLVideoElement> | undefined;
|
|
145
|
+
onCompositionStartCapture?: react.CompositionEventHandler<HTMLVideoElement> | undefined;
|
|
146
|
+
onCompositionUpdate?: react.CompositionEventHandler<HTMLVideoElement> | undefined;
|
|
147
|
+
onCompositionUpdateCapture?: react.CompositionEventHandler<HTMLVideoElement> | undefined;
|
|
148
|
+
onFocus?: react.FocusEventHandler<HTMLVideoElement> | undefined;
|
|
149
|
+
onFocusCapture?: react.FocusEventHandler<HTMLVideoElement> | undefined;
|
|
150
|
+
onBlur?: react.FocusEventHandler<HTMLVideoElement> | undefined;
|
|
151
|
+
onBlurCapture?: react.FocusEventHandler<HTMLVideoElement> | undefined;
|
|
152
|
+
onChange?: react.ChangeEventHandler<HTMLVideoElement, Element> | undefined;
|
|
153
|
+
onChangeCapture?: react.ChangeEventHandler<HTMLVideoElement, Element> | undefined;
|
|
154
|
+
onBeforeInput?: react.InputEventHandler<HTMLVideoElement> | undefined;
|
|
155
|
+
onBeforeInputCapture?: react.InputEventHandler<HTMLVideoElement> | undefined;
|
|
156
|
+
onInput?: react.InputEventHandler<HTMLVideoElement> | undefined;
|
|
157
|
+
onInputCapture?: react.InputEventHandler<HTMLVideoElement> | undefined;
|
|
158
|
+
onReset?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
159
|
+
onResetCapture?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
160
|
+
onSubmit?: react.SubmitEventHandler<HTMLVideoElement> | undefined;
|
|
161
|
+
onSubmitCapture?: react.SubmitEventHandler<HTMLVideoElement> | undefined;
|
|
162
|
+
onInvalid?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
163
|
+
onInvalidCapture?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
164
|
+
onLoad?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
165
|
+
onLoadCapture?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
166
|
+
onError?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
167
|
+
onErrorCapture?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
168
|
+
onKeyDown?: react.KeyboardEventHandler<HTMLVideoElement> | undefined;
|
|
169
|
+
onKeyDownCapture?: react.KeyboardEventHandler<HTMLVideoElement> | undefined;
|
|
170
|
+
onKeyPress?: react.KeyboardEventHandler<HTMLVideoElement> | undefined;
|
|
171
|
+
onKeyPressCapture?: react.KeyboardEventHandler<HTMLVideoElement> | undefined;
|
|
172
|
+
onKeyUp?: react.KeyboardEventHandler<HTMLVideoElement> | undefined;
|
|
173
|
+
onKeyUpCapture?: react.KeyboardEventHandler<HTMLVideoElement> | undefined;
|
|
174
|
+
onAbort?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
175
|
+
onAbortCapture?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
176
|
+
onCanPlay?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
177
|
+
onCanPlayCapture?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
178
|
+
onCanPlayThrough?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
179
|
+
onCanPlayThroughCapture?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
180
|
+
onDurationChange?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
181
|
+
onDurationChangeCapture?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
182
|
+
onEmptied?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
183
|
+
onEmptiedCapture?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
184
|
+
onEncrypted?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
185
|
+
onEncryptedCapture?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
186
|
+
onEnded?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
187
|
+
onEndedCapture?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
188
|
+
onLoadedData?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
189
|
+
onLoadedDataCapture?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
190
|
+
onLoadedMetadata?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
191
|
+
onLoadedMetadataCapture?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
192
|
+
onLoadStart?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
193
|
+
onLoadStartCapture?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
194
|
+
onPause?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
195
|
+
onPauseCapture?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
196
|
+
onPlay?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
197
|
+
onPlayCapture?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
198
|
+
onPlaying?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
199
|
+
onPlayingCapture?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
200
|
+
onProgress?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
201
|
+
onProgressCapture?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
202
|
+
onRateChange?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
203
|
+
onRateChangeCapture?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
204
|
+
onSeeked?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
205
|
+
onSeekedCapture?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
206
|
+
onSeeking?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
207
|
+
onSeekingCapture?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
208
|
+
onStalled?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
209
|
+
onStalledCapture?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
210
|
+
onSuspend?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
211
|
+
onSuspendCapture?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
212
|
+
onTimeUpdate?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
213
|
+
onTimeUpdateCapture?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
214
|
+
onVolumeChange?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
215
|
+
onVolumeChangeCapture?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
216
|
+
onWaiting?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
217
|
+
onWaitingCapture?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
218
|
+
onAuxClick?: react.MouseEventHandler<HTMLVideoElement> | undefined;
|
|
219
|
+
onAuxClickCapture?: react.MouseEventHandler<HTMLVideoElement> | undefined;
|
|
220
|
+
onClick?: react.MouseEventHandler<HTMLVideoElement> | undefined;
|
|
221
|
+
onClickCapture?: react.MouseEventHandler<HTMLVideoElement> | undefined;
|
|
222
|
+
onContextMenu?: react.MouseEventHandler<HTMLVideoElement> | undefined;
|
|
223
|
+
onContextMenuCapture?: react.MouseEventHandler<HTMLVideoElement> | undefined;
|
|
224
|
+
onDoubleClick?: react.MouseEventHandler<HTMLVideoElement> | undefined;
|
|
225
|
+
onDoubleClickCapture?: react.MouseEventHandler<HTMLVideoElement> | undefined;
|
|
226
|
+
onDrag?: react.DragEventHandler<HTMLVideoElement> | undefined;
|
|
227
|
+
onDragCapture?: react.DragEventHandler<HTMLVideoElement> | undefined;
|
|
228
|
+
onDragEnd?: react.DragEventHandler<HTMLVideoElement> | undefined;
|
|
229
|
+
onDragEndCapture?: react.DragEventHandler<HTMLVideoElement> | undefined;
|
|
230
|
+
onDragEnter?: react.DragEventHandler<HTMLVideoElement> | undefined;
|
|
231
|
+
onDragEnterCapture?: react.DragEventHandler<HTMLVideoElement> | undefined;
|
|
232
|
+
onDragExit?: react.DragEventHandler<HTMLVideoElement> | undefined;
|
|
233
|
+
onDragExitCapture?: react.DragEventHandler<HTMLVideoElement> | undefined;
|
|
234
|
+
onDragLeave?: react.DragEventHandler<HTMLVideoElement> | undefined;
|
|
235
|
+
onDragLeaveCapture?: react.DragEventHandler<HTMLVideoElement> | undefined;
|
|
236
|
+
onDragOver?: react.DragEventHandler<HTMLVideoElement> | undefined;
|
|
237
|
+
onDragOverCapture?: react.DragEventHandler<HTMLVideoElement> | undefined;
|
|
238
|
+
onDragStart?: react.DragEventHandler<HTMLVideoElement> | undefined;
|
|
239
|
+
onDragStartCapture?: react.DragEventHandler<HTMLVideoElement> | undefined;
|
|
240
|
+
onDrop?: react.DragEventHandler<HTMLVideoElement> | undefined;
|
|
241
|
+
onDropCapture?: react.DragEventHandler<HTMLVideoElement> | undefined;
|
|
242
|
+
onMouseDown?: react.MouseEventHandler<HTMLVideoElement> | undefined;
|
|
243
|
+
onMouseDownCapture?: react.MouseEventHandler<HTMLVideoElement> | undefined;
|
|
244
|
+
onMouseEnter?: react.MouseEventHandler<HTMLVideoElement> | undefined;
|
|
245
|
+
onMouseLeave?: react.MouseEventHandler<HTMLVideoElement> | undefined;
|
|
246
|
+
onMouseMove?: react.MouseEventHandler<HTMLVideoElement> | undefined;
|
|
247
|
+
onMouseMoveCapture?: react.MouseEventHandler<HTMLVideoElement> | undefined;
|
|
248
|
+
onMouseOut?: react.MouseEventHandler<HTMLVideoElement> | undefined;
|
|
249
|
+
onMouseOutCapture?: react.MouseEventHandler<HTMLVideoElement> | undefined;
|
|
250
|
+
onMouseOver?: react.MouseEventHandler<HTMLVideoElement> | undefined;
|
|
251
|
+
onMouseOverCapture?: react.MouseEventHandler<HTMLVideoElement> | undefined;
|
|
252
|
+
onMouseUp?: react.MouseEventHandler<HTMLVideoElement> | undefined;
|
|
253
|
+
onMouseUpCapture?: react.MouseEventHandler<HTMLVideoElement> | undefined;
|
|
254
|
+
onSelect?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
255
|
+
onSelectCapture?: react.ReactEventHandler<HTMLVideoElement> | undefined;
|
|
256
|
+
onTouchCancel?: react.TouchEventHandler<HTMLVideoElement> | undefined;
|
|
257
|
+
onTouchCancelCapture?: react.TouchEventHandler<HTMLVideoElement> | undefined;
|
|
258
|
+
onTouchEnd?: react.TouchEventHandler<HTMLVideoElement> | undefined;
|
|
259
|
+
onTouchEndCapture?: react.TouchEventHandler<HTMLVideoElement> | undefined;
|
|
260
|
+
onTouchMove?: react.TouchEventHandler<HTMLVideoElement> | undefined;
|
|
261
|
+
onTouchMoveCapture?: react.TouchEventHandler<HTMLVideoElement> | undefined;
|
|
262
|
+
onTouchStart?: react.TouchEventHandler<HTMLVideoElement> | undefined;
|
|
263
|
+
onTouchStartCapture?: react.TouchEventHandler<HTMLVideoElement> | undefined;
|
|
264
|
+
onPointerDown?: react.PointerEventHandler<HTMLVideoElement> | undefined;
|
|
265
|
+
onPointerDownCapture?: react.PointerEventHandler<HTMLVideoElement> | undefined;
|
|
266
|
+
onPointerMove?: react.PointerEventHandler<HTMLVideoElement> | undefined;
|
|
267
|
+
onPointerMoveCapture?: react.PointerEventHandler<HTMLVideoElement> | undefined;
|
|
268
|
+
onPointerUp?: react.PointerEventHandler<HTMLVideoElement> | undefined;
|
|
269
|
+
onPointerUpCapture?: react.PointerEventHandler<HTMLVideoElement> | undefined;
|
|
270
|
+
onPointerCancel?: react.PointerEventHandler<HTMLVideoElement> | undefined;
|
|
271
|
+
onPointerCancelCapture?: react.PointerEventHandler<HTMLVideoElement> | undefined;
|
|
272
|
+
onPointerEnter?: react.PointerEventHandler<HTMLVideoElement> | undefined;
|
|
273
|
+
onPointerLeave?: react.PointerEventHandler<HTMLVideoElement> | undefined;
|
|
274
|
+
onPointerOver?: react.PointerEventHandler<HTMLVideoElement> | undefined;
|
|
275
|
+
onPointerOverCapture?: react.PointerEventHandler<HTMLVideoElement> | undefined;
|
|
276
|
+
onPointerOut?: react.PointerEventHandler<HTMLVideoElement> | undefined;
|
|
277
|
+
onPointerOutCapture?: react.PointerEventHandler<HTMLVideoElement> | undefined;
|
|
278
|
+
onGotPointerCapture?: react.PointerEventHandler<HTMLVideoElement> | undefined;
|
|
279
|
+
onGotPointerCaptureCapture?: react.PointerEventHandler<HTMLVideoElement> | undefined;
|
|
280
|
+
onLostPointerCapture?: react.PointerEventHandler<HTMLVideoElement> | undefined;
|
|
281
|
+
onLostPointerCaptureCapture?: react.PointerEventHandler<HTMLVideoElement> | undefined;
|
|
282
|
+
onScroll?: react.UIEventHandler<HTMLVideoElement> | undefined;
|
|
283
|
+
onScrollCapture?: react.UIEventHandler<HTMLVideoElement> | undefined;
|
|
284
|
+
onScrollEnd?: react.UIEventHandler<HTMLVideoElement> | undefined;
|
|
285
|
+
onScrollEndCapture?: react.UIEventHandler<HTMLVideoElement> | undefined;
|
|
286
|
+
onWheel?: react.WheelEventHandler<HTMLVideoElement> | undefined;
|
|
287
|
+
onWheelCapture?: react.WheelEventHandler<HTMLVideoElement> | undefined;
|
|
288
|
+
onAnimationStart?: react.AnimationEventHandler<HTMLVideoElement> | undefined;
|
|
289
|
+
onAnimationStartCapture?: react.AnimationEventHandler<HTMLVideoElement> | undefined;
|
|
290
|
+
onAnimationEnd?: react.AnimationEventHandler<HTMLVideoElement> | undefined;
|
|
291
|
+
onAnimationEndCapture?: react.AnimationEventHandler<HTMLVideoElement> | undefined;
|
|
292
|
+
onAnimationIteration?: react.AnimationEventHandler<HTMLVideoElement> | undefined;
|
|
293
|
+
onAnimationIterationCapture?: react.AnimationEventHandler<HTMLVideoElement> | undefined;
|
|
294
|
+
onToggle?: react.ToggleEventHandler<HTMLVideoElement> | undefined;
|
|
295
|
+
onBeforeToggle?: react.ToggleEventHandler<HTMLVideoElement> | undefined;
|
|
296
|
+
onTransitionCancel?: react.TransitionEventHandler<HTMLVideoElement> | undefined;
|
|
297
|
+
onTransitionCancelCapture?: react.TransitionEventHandler<HTMLVideoElement> | undefined;
|
|
298
|
+
onTransitionEnd?: react.TransitionEventHandler<HTMLVideoElement> | undefined;
|
|
299
|
+
onTransitionEndCapture?: react.TransitionEventHandler<HTMLVideoElement> | undefined;
|
|
300
|
+
onTransitionRun?: react.TransitionEventHandler<HTMLVideoElement> | undefined;
|
|
301
|
+
onTransitionRunCapture?: react.TransitionEventHandler<HTMLVideoElement> | undefined;
|
|
302
|
+
onTransitionStart?: react.TransitionEventHandler<HTMLVideoElement> | undefined;
|
|
303
|
+
onTransitionStartCapture?: react.TransitionEventHandler<HTMLVideoElement> | undefined;
|
|
304
|
+
};
|
|
305
|
+
//#endregion
|
|
306
|
+
export { mediaProps };
|
|
307
|
+
//# sourceMappingURL=media-props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media-props.d.ts","names":[],"sources":["../../../src/utils/media-props.ts"],"mappings":";;;;;UAGU,UAAA,SAAmB,mBAAA,CAAoB,gBAAA;AAAA,iBAEjC,UAAA,CAAW,KAAA,EAAO,QAAA,EAAU,KAAA,EAAO,UAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Ref, RefCallback } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/use-composed-refs.d.ts
|
|
4
|
+
type OptionalRef<T> = Ref<T> | undefined;
|
|
5
|
+
/**
|
|
6
|
+
* Compose multiple refs into a single callback ref.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* const composedRef = composeRefs(ref1, ref2, ref3);
|
|
11
|
+
* return <div ref={composedRef} />;
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
declare function composeRefs<T>(...refs: (OptionalRef<T> | OptionalRef<T>[])[]): RefCallback<T>;
|
|
15
|
+
/**
|
|
16
|
+
* Hook that composes multiple refs into a single callback ref.
|
|
17
|
+
*
|
|
18
|
+
* Memoized for stable reference.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* const composedRef = useComposedRefs(forwardedRef, localRef);
|
|
23
|
+
* return <div ref={composedRef} />;
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
declare function useComposedRefs<T>(...refs: OptionalRef<T>[]): RefCallback<T>;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { composeRefs, useComposedRefs };
|
|
29
|
+
//# sourceMappingURL=use-composed-refs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-composed-refs.d.ts","names":[],"sources":["../../../src/utils/use-composed-refs.ts"],"mappings":";;;KAOK,WAAA,MAAiB,GAAA,CAAI,CAAA;;AAJoB;;;;;;;;iBA8B9B,WAAA,GAAA,CAAA,GAAkB,IAAA,GAAO,WAAA,CAAY,CAAA,IAAK,WAAA,CAAY,CAAA,SAAU,WAAA,CAAY,CAAA;AAA5F;;;;;;;;;;;AAAA,iBAkCgB,eAAA,GAAA,CAAA,GAAsB,IAAA,EAAM,WAAA,CAAY,CAAA,MAAO,WAAA,CAAY,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//#region src/utils/use-destroy.d.ts
|
|
2
|
+
interface Destroyable {
|
|
3
|
+
destroy(): void;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Destroy an instance on unmount, deferring destruction to survive React
|
|
7
|
+
* StrictMode's simulated unmount/re-mount cycle.
|
|
8
|
+
*
|
|
9
|
+
* StrictMode runs effects, then immediately runs cleanup, then re-runs
|
|
10
|
+
* effects — all synchronously. By deferring `destroy()` to a macrotask,
|
|
11
|
+
* the re-mount effect can cancel it before it fires.
|
|
12
|
+
*
|
|
13
|
+
* @param instance - Object with a `destroy()` method.
|
|
14
|
+
* @param setup - Optional setup called on first mount. Skipped on StrictMode
|
|
15
|
+
* re-mount since the previous setup was never torn down.
|
|
16
|
+
* @param teardown - Optional teardown called right before `destroy()` on real
|
|
17
|
+
* unmount. Skipped on StrictMode simulated unmount.
|
|
18
|
+
*/
|
|
19
|
+
declare function useDestroy(instance: Destroyable, setup?: () => void, teardown?: () => void): void;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { useDestroy };
|
|
22
|
+
//# sourceMappingURL=use-destroy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-destroy.d.ts","names":[],"sources":["../../../src/utils/use-destroy.ts"],"mappings":";UAMU,WAAA;EACR,OAAA;AAAA;;;;AAiBF;;;;;;;;;;;iBAAgB,UAAA,CAAW,QAAA,EAAU,WAAA,EAAa,KAAA,eAAoB,QAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/utils/use-latest-ref.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Keep a ref that always points to the latest value.
|
|
4
|
+
*
|
|
5
|
+
* Useful for capturing callbacks or derived values inside closures
|
|
6
|
+
* that are created once (e.g. factory callbacks) without stale reads.
|
|
7
|
+
*/
|
|
8
|
+
declare function useLatestRef<Value>(value: Value): Readonly<{
|
|
9
|
+
current: Value;
|
|
10
|
+
}>;
|
|
11
|
+
declare namespace useLatestRef {
|
|
12
|
+
type Result<Value> = Readonly<{
|
|
13
|
+
current: Value;
|
|
14
|
+
}>;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { useLatestRef };
|
|
18
|
+
//# sourceMappingURL=use-latest-ref.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-latest-ref.d.ts","names":[],"sources":["../../../src/utils/use-latest-ref.ts"],"mappings":";;AAUA;;;;;iBAAgB,YAAA,OAAA,CAAoB,KAAA,EAAO,KAAA,GAAQ,QAAA;EAAW,OAAA,EAAS,KAAA;AAAA;AAAA,kBAMtD,YAAA;EAAA,KACH,MAAA,UAAgB,QAAA;IAAW,OAAA,EAAS,KAAA;EAAA;AAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Media } from "@videojs/core/dom";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/use-media-instance.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Create and manage a media instance lifecycle within a player context.
|
|
6
|
+
*
|
|
7
|
+
* Instantiates the media class once, attaches it to the player on mount,
|
|
8
|
+
* and safely detaches on unmount using a functional updater to avoid race
|
|
9
|
+
* conditions when swapping media components (e.g. DashVideo → HlsVideo).
|
|
10
|
+
*/
|
|
11
|
+
declare function useMediaInstance<Instance extends Media & {
|
|
12
|
+
destroy(): void;
|
|
13
|
+
}>(MediaClass: new () => Instance): Instance;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { useMediaInstance };
|
|
16
|
+
//# sourceMappingURL=use-media-instance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-media-instance.d.ts","names":[],"sources":["../../../src/utils/use-media-instance.ts"],"mappings":";;;;;AAeA;;;;;iBAAgB,gBAAA,kBAAkC,KAAA;EAAU,OAAA;AAAA,EAAA,CAC1D,UAAA,YAAsB,QAAA,GACrB,QAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@videojs/react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "10.0.0-beta.
|
|
4
|
+
"version": "10.0.0-beta.11",
|
|
5
5
|
"description": "React library for building media players",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": {
|
|
@@ -65,10 +65,10 @@
|
|
|
65
65
|
"react": ">=16.8.0"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@videojs/core": "10.0.0-beta.
|
|
69
|
-
"@videojs/spf": "10.0.0-beta.
|
|
70
|
-
"@videojs/store": "10.0.0-beta.
|
|
71
|
-
"@videojs/utils": "10.0.0-beta.
|
|
68
|
+
"@videojs/core": "10.0.0-beta.11",
|
|
69
|
+
"@videojs/spf": "10.0.0-beta.11",
|
|
70
|
+
"@videojs/store": "10.0.0-beta.11",
|
|
71
|
+
"@videojs/utils": "10.0.0-beta.11"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@testing-library/react": "^16.3.0",
|
|
@@ -77,10 +77,10 @@
|
|
|
77
77
|
"react": "^19.2.1",
|
|
78
78
|
"react-dom": "^19.2.1",
|
|
79
79
|
"tsdown": "^0.20.3",
|
|
80
|
-
"typescript": "^
|
|
81
|
-
"vitest": "^
|
|
82
|
-
"@videojs/icons": "10.0.0-beta.
|
|
83
|
-
"@videojs/skins": "10.0.0-beta.
|
|
80
|
+
"typescript": "^6.0.2",
|
|
81
|
+
"vitest": "^4.1.0",
|
|
82
|
+
"@videojs/icons": "10.0.0-beta.11",
|
|
83
|
+
"@videojs/skins": "10.0.0-beta.11"
|
|
84
84
|
},
|
|
85
85
|
"publishConfig": {
|
|
86
86
|
"access": "public"
|