Theme settings: video_url accept shopify cdn videos

Highlighted
New Member
1 0 0

Hi,

 

I am currently working on a theme where I would like to have the ability to add a video that I can set in the theme settings.

As of now I am using the following:

 

...
{% schema %}
{
  ...,
  "blocks": [
    {
      ...,
        {
          "type": "video_url",
          "accept": ["vimeo", "youtube"],
          "id": "video_url",
          "label": "Video URL",
          "default": "https://www.youtube.com/watch?v=_9VUPq3SxOc"
        },
        ...
  ],
  ...
}
{% endschema %}

 

 

Unfortunately, this method only accept vimeo or youtube videos but I also would like to add videos from the shopify cdn.

 

Is there any way to enhance this to accept any video url ? My code is able to handle any video.

 

I couldn't find anything else than video_url and I would like to not use the simple "url" setting.

0 Likes