You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If a given product resource has an external video the Gallery.client.jsx component causes a render error because an EXTERNAL_VIDEO_TYPE does not have an image attribute like that of MODEL_3D_TYPE and VIDEO_TYPE.
In Gallery.client.jsx Handling the external video type similar to MODEL_3D_TYPE prevents the render error from happening
but then uncovers that embeddedUrl returned from the Storefront API is not actually an embed compatible url that will properly render in an iFrame.
The ExternalVideoType of the Storefront API has been adjusted to deprecate embeddedUrl and introduce two new fields. embedUrl and originUrl. The embedUrl field represents an iFrame embed compatible URL and should be used instead of embeddedUrl.
To Reproduce
The initial render error noted above can be seen here which is a product with an external video from this stackblitz instance.
After observing the render error for the bach-c-trumpet you can adjust the Gallery.client.jsx component as illustrated above to further see the error in connecting to youtube.com. Manually adjusting the iFrame source with browser tools to a proper embed compatible url will correct the connection error.
Expected behaviour
External videos added to product resources in Shopify should render and properly connect via the iFrame to the supported external video services Youtube and Vimeo.
The text was updated successfully, but these errors were encountered:
* fix: external video product issues (close#454)
* Update types and fix prop issue in test
* add changeset
Co-authored-by: Anthony Frehner <[email protected]>
rafaelstz
pushed a commit
to rafaelstz/hydrogen
that referenced
this issue
Mar 4, 2023
Describe the bug
If a given product resource has an external video the Gallery.client.jsx component causes a render error because an EXTERNAL_VIDEO_TYPE does not have an image attribute like that of MODEL_3D_TYPE and VIDEO_TYPE.
In
Gallery.client.jsx
Handling the external video type similar to MODEL_3D_TYPE prevents the render error from happeningbut then uncovers that

embeddedUrl
returned from the Storefront API is not actually an embed compatible url that will properly render in an iFrame.The ExternalVideoType of the Storefront API has been adjusted to deprecate
embeddedUrl
and introduce two new fields.embedUrl
andoriginUrl
. TheembedUrl
field represents an iFrame embed compatible URL and should be used instead ofembeddedUrl
.To Reproduce
Expected behaviour
External videos added to product resources in Shopify should render and properly connect via the iFrame to the supported external video services Youtube and Vimeo.
The text was updated successfully, but these errors were encountered: