Open bredowmax opened 2 years ago
Cc for triage: @nicklepine @tyleralsbury
Any update on this @nicklepine @tyleralsbury ? This became more useful in particular after this update https://changelog.shopify.com/posts/improved-video-support-for-the-files-page-and-metafields
Not a direct solution but I thought I'd share one of the possible approaches for a "Custom Code Solution" since I think it can be useful for folks searching for this on search engines.
The following can be used to generate a <video>
tag for a metafield that contains a video:
{% assign media = product.metafields.custom.some_image_or_video.value %}
{% if media.media_type == 'video' %}
{{ media | video_tag: image_size: '1000x', controls: true, autoplay: true }}
{% endif %}
The assign
part is just to better readability.
custom.some_image_or_video
would be your namespace.key
.
I am still stuck on this. I have tried bringing over the metafield as a video file, a text field, and url field! Nothing works. Hope someone will post a solution here. Thank you.
Describe the enhancement you'd like Currently, the only option of the video section is to upload a video on Youtube or Vimeo and then add that link. On top of that, this input field does not currently support Metafields. This makes it impossible to add product-specific or page-specific videos without custom-editing the Dawn theme
Describe alternatives you've considered
Additional context/screenshots
(interestingly, the video file can be connected to any field that takes image files. I can connect my Video File Metafield to an image setting like 'Cover Image' - it just won't play)