File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
packages/core/useMediaControls Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,11 @@ export interface UseMediaSource {
20
20
* The media codec type
21
21
*/
22
22
type ?: string
23
+
24
+ /**
25
+ * Specifies the media query for the resource's intended media.
26
+ */
27
+ media ?: string
23
28
}
24
29
25
30
export interface UseMediaTextTrackSource {
@@ -265,11 +270,12 @@ export function useMediaControls(target: MaybeRef<HTMLMediaElement | null | unde
265
270
} )
266
271
267
272
// Add new sources
268
- sources . forEach ( ( { src, type } ) => {
273
+ sources . forEach ( ( { src, type, media } ) => {
269
274
const source = document . createElement ( 'source' )
270
275
271
276
source . setAttribute ( 'src' , src )
272
277
source . setAttribute ( 'type' , type || '' )
278
+ source . setAttribute ( 'media' , media || '' )
273
279
274
280
source . addEventListener ( 'error' , sourceErrorEvent . trigger )
275
281
You can’t perform that action at this time.
0 commit comments