Video
The Video component renders a video for the Storefront API's Video object.
The component outputs a video element. You can customize this component using passthrough props.
Anchor to propsProps
- Anchor to datadatadataPartialDeep<VideoType, {recurseIntoArrays: true}>PartialDeep<VideoType, {recurseIntoArrays: true}>requiredrequired
An object with fields that correspond to the Storefront API's Video object.
- Anchor to previewImageOptionspreviewImageOptionspreviewImageOptionsLoaderParamsLoaderParams
An object of image size options for the video's
. Usesto generate theposterURL.- Anchor to sourcePropssourcePropssourcePropsHTMLAttributes<HTMLSourceElement> & { 'data-testid'?: string; }HTMLAttributes<HTMLSourceElement> & { 'data-testid'?: string; }
Props that will be passed to the
videoelement'ssourcechildren elements.
LoaderParams
- crop
The URL param that controls the cropping region
Crop - height
The URL param that controls height
number - src
The base URL of the image
string - width
The URL param that controls width
number
Crop
'center' | 'top' | 'bottom' | 'left' | 'right'Was this page helpful?