--- title: "Liquid filters: external_video_url" description: |- Returns the URL for a given external video. Use this filter to specify parameters for the external video player generated by the [`external_video_tag` filter](/docs/api/liquid/filters/external_video_tag). api_name: liquid source_url: html: https://shopify.dev/docs/api/liquid/filters/external_video_url md: https://shopify.dev/docs/api/liquid/filters/external_video_url.md --- # external\_​video\_​url ```oobleck media | external_video_url: attribute: string ``` returns [string](https://shopify.dev/docs/api/liquid/basics#string) Returns the URL for a given external video. Use this filter to specify parameters for the external video player generated by the [`external_video_tag` filter](https://shopify.dev/docs/api/liquid/filters/external_video_tag). You can specify [YouTube](https://developers.google.com/youtube/player_parameters#Parameters) and [Vimeo](https://vimeo.zendesk.com/hc/en-us/articles/360001494447-Using-Player-Parameters) video parameters by adding a parameter that matches the parameter name, and the desired value. ```liquid {% for media in product.media %} {% if media.media_type == 'external_video' %} {% if media.host == 'youtube' %} {{ media | external_video_url: color: 'white' | external_video_tag }} {% elsif media.host == 'vimeo' %} {{ media | external_video_url: loop: '1', muted: '1' | external_video_tag }} {% endif %} {% endif %} {% endfor %} ``` ##### Code ``` {% for media in product.media %} {% if media.media_type == 'external_video' %} {% if media.host == 'youtube' %} {{ media | external_video_url: color: 'white' | external_video_tag }} {% elsif media.host == 'vimeo' %} {{ media | external_video_url: loop: '1', muted: '1' | external_video_tag }} {% endif %} {% endif %} {% endfor %} ``` ##### Data ``` { "product": { "media": [ { "host": "youtube", "media_type": "external_video" }, { "host": null, "media_type": "video" } ] } } ``` ## Output ```html ```