MCPcopy Create free account
hub / github.com/adobe/react-spectrum / Video

Function Video

packages/dev/docs/src/Image.js:90–99  ·  view source on GitHub ↗
({src, ...otherProps})

Source from the content-addressed store, hash-verified

88}
89
90export function Video({src, ...otherProps}) {
91 let publicUrl = React.useContext(ImageContext);
92 let baseUrl = publicUrl.replace(/\/$/, '');
93 let url = baseUrl + '/' + path.basename(src);
94
95 return (
96 // eslint-disable-next-line jsx-a11y/media-has-caption
97 <video src={url} playsInline className={docStyles.video} {...otherProps} />
98 );
99}
100
101export function Track({src, srclang: srcLang, ...otherProps}) {
102 let publicUrl = React.useContext(ImageContext);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected