---
title: "external_video_url"

doc_type: static
doc_category: static
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/sline/filter/external-video-url'
  md: 'https://developer.shopline.com/docs/sline/filter/external-video-url.md'
---

# external_video_url


    Returns the URL of a specified external video. An external video is a video hosted on a platform external to SHOPLINE.

    This filter allows you to add URL parameters to control video playback behaviors. Parameter names and values must follow the specifications of the source video platform, such as YouTube's [IFrame API](https://developers.google.com/youtube/player_parameters#Parameters).



    
`media | external_video_url(attribute=any)` returns a string.
    



    
        ## Required params

        
             `media` [`external_video`](https://developer.shopline.com/docs/sline/object/external-video.md)\: The media resource for the external video.
        
    



    
        ## Optional params

        
            - `autoplay` `boolean`\: Whether to automatically play the video. `true` means the video plays automatically, while `false` means it does not. The default value is `false`.

        
            - `controls` `boolean`\: Whether to display the video player controls. `true` means the controls are displayed, while `false` means they are not. The default value is `true`.
        
            - `loop` `boolean`\: Whether to loop the video. `true` means the video loops, while `false` means it does not. The default value is `false`.
        
    



    
## Example

        
            

            Use this filter to parse the video URL and apply specific playback parameters, and then use [external_video_tag](https://developer.shopline.com/docs/sline/tag/external-video-tag.md) to render a YouTube video player.

            

            
<SlineExample path={'/products/earring-ab001'} objects={ 
    ["product"] 
}>
```sline
{{#for media in product.media}}
    {{#switch media.media_type}}
        {{#case "external_video" /}}
            {{#if media.host == "youtube"}}
                {{#external_video_tag media | external_video_url(autoplay=false, loop=true) /}}
            {{/if}}
    {{/switch}}
{{/for}}
```
</SlineExample>
            
        
    
