UNPKG

9.33 kBJSONView Raw
1{
2 "type": "component",
3 "props": {
4 "type": {
5 "type": "String",
6 "desc": "Tells the component which player is to be used",
7 "default": "video",
8 "values": [ "video", "audio" ],
9 "examples": [ "video" ]
10 },
11 "color": {
12 "type": "String",
13 "desc": "Color name for component from the Quasar Color Palette",
14 "examples": [ "primary", "teal-10" ]
15 },
16 "background-color": {
17 "type": "String",
18 "desc": "Color name for component from the Quasar Color Palette",
19 "examples": [ "black", "teal-10" ]
20 },
21 "mobile-mode": {
22 "type": "Boolean",
23 "desc": "Use mobile logic for handling visibility of controls"
24 },
25 "sources": {
26 "type": "Array",
27 "desc": "The one or more sources for Video or Audio",
28 "definition": {
29 "src": {
30 "type": "String",
31 "desc": "Path to a source"
32 },
33 "type": {
34 "type": "String",
35 "desc": "The kind of source",
36 "examples": [ "video/mp4", "audio/mp3" ]
37 }
38 },
39 "examples": [ "[{ src: 'https://your-server/your-video.mov', type: 'video/mp4' }]", "[{ src: 'https://your-server/your-audio.mp3', type: 'audio/mp3' }]" ]
40 },
41 "poster": {
42 "type": "String",
43 "desc": "[Video only] The poster image to display before the video is loaded",
44 "examples": [ "https://path/to/the/image.jpg" ]
45 },
46 "tracks": {
47 "type": "Array",
48 "desc": "[Video only] The one or more tracks for subtitle, captions, etc",
49 "definition": {
50 "src": {
51 "type": "String",
52 "desc": "Path to subtitle, caption, etc"
53 },
54 "kind": {
55 "type": "String",
56 "desc": "The kind of track",
57 "examples": [ "subtitle", "caption" ]
58 },
59 "srclang": {
60 "type": "String",
61 "desc": "Language identifier",
62 "examples": [ "en", "de" ]
63 },
64 "label": {
65 "type": "String",
66 "desc": "Label to use for selection purposes",
67 "examples": [ "English", "Deutsche" ]
68 }
69 },
70 "examples": [ "[ { src: 'https://your-server//path/to/subtitles-en.vtt', kind: 'subtitles', srclang: 'en', label: 'English } ]" ]
71 },
72 "track-language": {
73 "type": "String",
74 "desc": "[Video only] A value that corresponds to the 'label' attribute of the 'tracks' property. This will be the default language",
75 "examples": [ "English" ]
76 },
77 "preload": {
78 "type": "String",
79 "desc": "[Video only] Provides a hint to the browser about what the author thinks will lead to the best user experience",
80 "default": "metadata",
81 "values": [ "none", "metadata", "auto" ],
82 "examples": [ "metadata" ]
83 },
84 "dense": {
85 "type": "Boolean",
86 "desc": "When true displays controls window on one line"
87 },
88 "dark": {
89 "type": "Boolean",
90 "desc": "When component is rendered on a dark background"
91 },
92 "autoplay": {
93 "type": "Boolean",
94 "desc": "Automatically start video/audio when it is ready to play"
95 },
96 "cross-origin": {
97 "type": [ "String", "Null" ],
98 "desc": "Whether to use CORS for fetching assets",
99 "values": [ "null", "anonymous", "use-credentials" ],
100 "examples": [ "anonymous" ]
101 },
102 "volume": {
103 "type": "Number",
104 "desc": "A value from 0-100 (as a percentage)",
105 "default": "60",
106 "examples": [ "50", "75" ]
107 },
108 "muted": {
109 "type": "Boolean",
110 "desc": "If the player should be muted"
111 },
112 "show-big-play-button": {
113 "type": "Boolean",
114 "desc": "Show/hide the Big Play Button",
115 "default": "true"
116 },
117 "controls-display-time": {
118 "type": "Number",
119 "desc": "The amount of idle time in milliseconds to wait before hiding the controls",
120 "default": "2000",
121 "examples": [ "3000" ]
122 },
123 "no-controls": {
124 "type": "Boolean",
125 "desc": "If set to true, the controls will never be displayed"
126 },
127 "playback-rates": {
128 "type": "Array",
129 "desc": "[Video only] This is an array of one or more objects for playback rate (speed)",
130 "definition": {
131 "label": {
132 "type": "String",
133 "desc": "The displayed label for user selection",
134 "examples": [ ".5X", "Normal" ]
135 },
136 "value": {
137 "type": "Number",
138 "desc": "The value to use for playback rate",
139 "examples": [ "0.5", "1.0" ]
140 }
141 },
142
143 "default": "[ { label: '.5x', value: 0.5 }, { label: 'Normal', value: 1 }, { label: '1.5x', value: 1.5 }, { label: '2x', value: 2 } ]",
144 "examples": [ "[ { label: '.5x', value: 0.5 } ]" ]
145 },
146 "playback-rate": {
147 "type": "Number",
148 "desc": "Corresponds to the value in playback-rates",
149 "default": "0.5",
150 "examples": [ "2" ]
151 }
152 },
153 "events": {
154 "loaded": {
155 "desc": "Emitted when the media has been loaded"
156 },
157 "ready": {
158 "desc": "Emitted when the media is ready to play. You cannot play/pause or setCurrentTime before this event"
159 },
160 "duration": {
161 "desc": "Emitted when the duration of the media has been determined",
162 "params": {
163 "seconds": {
164 "type": "Number",
165 "desc": "The duration in seconds"
166 }
167 }
168 },
169 "ended": {
170 "desc": "Emitted when the media has finished playing"
171 },
172 "error": {
173 "desc": "Emitted when there is a media error"
174 },
175 "paused": {
176 "desc": "Emitted when the media is paused"
177 },
178 "playing": {
179 "desc": "Emitted when the media starts playing. This will also emit after a pause or a wait"
180 },
181 "timeupdate": {
182 "desc": "Emitted wenever there is a time update (during play)",
183 "params": {
184 "curTime": {
185 "type": "Number",
186 "desc": "The number play time in seconds"
187 },
188 "remaining": {
189 "type": "Number",
190 "desc": "The number of seconds remaining"
191 }
192 }
193 },
194 "fullscreen": {
195 "desc": "Emitted when entering/exiting fullscreen mode",
196 "params": {
197 "showing": {
198 "type": "Boolean",
199 "desc": "true/false if in fullscreen or not"
200 }
201 }
202 },
203 "waiting": {
204 "desc": "Emitted when the media player goes into a wait state (typically waiting while downloading)"
205 },
206 "showControls": {
207 "desc": "Emitted when the Controls are toggled",
208 "params": {
209 "showing": {
210 "type": "Boolean",
211 "desc": "true/false if controls are showing or not"
212 }
213 }
214 },
215 "volume": {
216 "desc": "Emitted when the volume changes"
217 },
218 "muted": {
219 "desc": "Emitted when the mute changes",
220 "params": {
221 "showing": {
222 "type": "Boolean",
223 "desc": "true/false if volume is muted or not"
224 }
225 }
226 }
227 },
228 "methods": {
229 "showControls": {
230 "desc": "Show the controls. Has no effect is already being displayed"
231 },
232 "hideControls": {
233 "desc": "Hide the controls. Has no effect is already being hidden"
234 },
235 "toggleControls": {
236 "desc": "Toggle the controls"
237 },
238 "togglePlay": {
239 "desc": "Toggles between play/pause states"
240 },
241 "toggleMuted": {
242 "desc": "Toggles between mute/unmute states"
243 },
244 "toggleFullscreen": {
245 "desc": "Toggles fullscreen mode"
246 },
247 "setCurrentTime": {
248 "params": {
249 "seconds": {
250 "type": "Number",
251 "required": true,
252 "desc": "The time in seconds"
253 }
254 },
255 "desc": "Set the current time of the video/audio player (in seconds)"
256 },
257 "setVolume": {
258 "params": {
259 "percent": {
260 "type": "Number",
261 "required": true,
262 "desc": "The volume in percent"
263 }
264 },
265 "desc": "Sets the volume as a percent (0-100)."
266 }
267 },
268 "slots": {
269 "old-browser": {
270 "desc": "Slot for replacing the default old browser text"
271 },
272 "overlay": {
273 "desc": "Slot for replacing the default overlay"
274 },
275 "error-window": {
276 "desc": "Slot for replacing the default error window"
277 },
278 "controls": {
279 "desc": "Slot for replacing the default controls can be replaced"
280 },
281 "spinner": {
282 "desc": "Slot for replacing the default spinner/loading icon"
283 },
284 "big-play-button": {
285 "desc": "Slot for replacing the default big play button icon"
286 },
287 "display-time": {
288 "desc": "Slot for replacing the default display time"
289 },
290 "position-slider": {
291 "desc": "Slot for replacing the default positioning slider"
292 },
293 "duration-time": {
294 "desc": "Slot for replacing the default duration time"
295 },
296 "play": {
297 "desc": "Slot for replacing the default play icon"
298 },
299 "volume": {
300 "desc": "Slot for replacing the default volume icon"
301 },
302 "volume-slider": {
303 "desc": "Slot for replacing the default volume slider"
304 },
305 "settings": {
306 "desc": "Slot for replacing the default settings icon"
307 },
308 "settings-menu": {
309 "desc": "Slot for replacing the default Settings menu"
310 },
311 "fullscreen": {
312 "desc": "Slot for replacing the default fullscreen icon"
313 }
314 }
315}
\No newline at end of file