ExternalVideo

The ExternalVideo component renders an embedded video for the Storefront API's ExternalVideo object.

Example code

Props

Name Type Description
video Pick<ExternalVideoType, "host" | "embeddedUrl" | "id"> An object with the keys host, embeddedUrl, and id. Refer to the Storefront API's ExternalVideo type.
options? YouTube | Vimeo An object containing the options available for either YouTube or Vimeo.

Component type

The ExternalVideo component is a shared component, which means that it renders on both the server and the client. For more information about component types, refer to React Server Components.

GraphQL fragment

The following fragment is available as a string for your GraphQL query using ExternalVideoFragment or ExternalVideo.Fragment. Using this fragment ensures that you have all the data you need for rendering the ExternalVideo component.