How to get url from product media object VideoSourceDrop

Kishor_Kumar_Ma
Shopify Partner
2 0 1

Hi, 

 

I am trying to get a URL from the videoSourceDrop but not succussed. for example 

{% for media in product.media %}
   {% if media.media_type=='video' %}
    {{ media.sources }} # returns VideoSourceDrop
    {{ media.sources.url }} # return null
{%endif %}
{% endfor %}

Can you please help me to get url. 

 

Thanks in advance!

arthor
Tourist
4 0 0

for anyone who is looking at this its because shopify has made video exclusive for PLUS plans only.

0 Likes
Agon_R
Shopify Partner
2 0 0

Have you tried this?

{% for source in media.sources %} {{source.url}} {%endfor%}

0 Likes