support Contact Support | system status System Status
Page Contents

    Sample Templates for Universal Syndication

    This document contains the Liquid templates used for the default syndication types, offered here to provide models and starting points for custom templates if you need them. See the Public Social Syndication API Overview for additional information.

    Advanced

      <?xml version="1.0" encoding="UTF-8"?>
        <rss xmlns:media="http://search.yahoo.com/mrss/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:ext="http://ooyala.com/syndication/ext/" version="2.0">
          <channel>
            {%- if title %}
            <title>{{title | escape}}</title>
            {%- else %}
            <title>{{name | escape}}</title>
            {%- endif %}
        
            {%- if description %}
            <description>{{description | escape}}</description>
            {%- else %}
            <description>{{name | escape}}</description>
            {%- endif %}
        
        
            {%- if destination_url %}
            <link>{{destination_url | escape}}</link>
            {%- elsif syndication_url %}
            <link>{{syndication_url | escape}}</link>
            {%- endif %}
        
            {%- for asset in assets %}
            <item>
        
              {%- if asset.name %}
              <title>{{asset.name | escape}}</title>
              {%- endif %}
        
              {%- if asset.id %}
              <guid isPermaLink="false">{{account_id}}:{{asset.id}}</guid>
              <link>{{player_url}}/{{account_id}}/default_default/index.html?videoId={{asset.id}}</link>
              {%- endif %}
        
              {%- if asset.publish_at %}
              <pubDate>{{asset.publish_at | date: "%a, %d %b %Y %H:%M:%S +0000"}}</pubDate>
              {%- else %}
              <pubDate>{{asset.created_at | date: "%a, %d %b %Y %H:%M:%S +0000"}}</pubDate>
              {%- endif %}
        
              {%- if category %}
              <media:category scheme="http://www.tubemogul.com">{{category | escape}}</media:category>
              {%- endif %}
        
              {%- if asset.name %}
              <media:title>{{asset.name | escape}}</media:title>
              {%- endif %}
        
              {%- if asset.description %}
              <media:description>{{asset.description | escape}}</media:description>
              {%- endif %}
        
              {%- if asset.schedule.starts_at or asset.created_at %}
              <dcterms:valid>
                  {%- if asset.schedule.starts_at %}start={{asset.schedule.starts_at | date: "%Y-%m-%dT%H:%M+00:00"}};
                  {%- else %}start={{asset.created_at | date: "%Y-%m-%dT%H:%M+00:00"}};{%- endif -%}
                  {%- if asset.schedule.ends_at %}end={{asset.schedule.ends_at | date: "%Y-%m-%dT%H:%M+00:00"}};{%- endif -%}
                  scheme=W3C-DTF</dcterms:valid>
              {%- endif %}
        
              {%- if asset.images.thumbnail.sources.size > 0 %}
              {%- assign thumb = asset.images.thumbnail.sources[0] %}
              <media:thumbnail url="{{thumb.src | escape}}" width="{{thumb.width}}" height="{{thumb.height}}"/>
              {%- endif %}
              {%- if asset.best_mp4_source %}
              {%- assign source = asset.best_mp4_source %}
              <media:content url="{{source.src | escape}}" type="video/mp4" medium="video" expression="full"
                {%- if source.encoding_rate %} bitrate="{{source.encoding_rate}}" {%- endif %}
                {%- if source.duration %} duration="{{source.duration | divided_by: 1000}}"
                {%- elsif asset.duration %} duration="{{asset.duration | divided_by: 1000}}" {%- endif %}
                {%- if source.width %} width="{{source.width}}" {%- endif %}
                {%- if source.height %} height="{{source.height}}"{%- endif %}/>
              {%- endif %}
              {%- if asset.original_filename %}
              <ext:originalFilename>
                <![CDATA[ {{asset.original_filename}} ]]>
              </ext:originalFilename>
              {%- endif %}
            </item>
            {%- endfor %}
          </channel>
        </rss>

    Google

      <?xml version="1.0" encoding="UTF-8"?>
        <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:video="http://www.google.com/schemas/sitemap-video/1.0">
        {%- for asset in assets %}
         <url>
           <loc></loc>
           <video:video>
             <video:player_loc> allow_embed="yes">{{player_url}}/{{account_id}}/default_default/index.html?videoId={{asset.id}}</video:player_loc>
               {%- if asset.name %}
               <video:title>{{asset.name | escape}}</video:title>
               {%- endif %}
               {%- if asset.description %}
               <video:description>{{asset.description | escape}}</video:description>
               {%- endif %}
               {%- if asset.images.thumbnail.sources.size > 0 %}
               {%- assign thumb = asset.images.thumbnail.sources[0] %}
               <video:thumbnail_loc>"{{thumb.src | escape}}"</video:thumbnail_loc>
               {%- endif %}
               {%- if asset.best_mp4_source %}
               {%- assign source = asset.best_mp4_source %}
               {%- if source.duration %}
               <video:duration>{{source.duration | divided_by: 1000}}</video:duration>
               {%- elsif asset.duration %}
               <video:duration>{{asset.duration | divided_by: 1000}}</video:duration>
               {%- endif %}
               {%- endif %}
             </video:video>
         </url>
        {%- endfor %}
        </urlset>

    iPad

      <?xml version="1.0" encoding="UTF-8"?>
        <rss xmlns:media="http://search.yahoo.com/mrss/" xmlns:dcterms="http://purl.org/dc/terms/" version="2.0">
          <channel>
            {%- if title %}
            <title>{{title | escape}}</title>
            {%- else %}
            <title>{{name | escape}}</title>
            {%- endif %}
        
            {%- if description %}
            <description>{{description | escape}}</description>
            {%- else %}
            <description>{{name | escape}}</description>
            {%- endif %}
        
            {%- if destination_url %}
            <link>{{destination_url | escape}}</link>
            {%- elsif syndication_url %}
            <link>{{syndication_url | escape}}</link>
            {%- endif %}
        
            {%- for asset in assets %}
            <item>
        
              {%- if asset.name %}
              <title>{{asset.name | escape}}</title>
              {%- endif %}
        
              {%- if asset.description %}
              <description>{{asset.description | escape}}</description>
              {%- endif %}
        
              {%- if asset.id %}
              <guid isPermaLink="false">{{account_id}}:{{asset.id}}</guid>
              <link>{{player_url}}/{{account_id}}/default_default/index.html?videoId={{asset.id}}</link>
              {%- endif %}
        
              {%- if asset.publish_at %}
              <pubDate>{{asset.publish_at | date: "%a, %d %b %Y %H:%M:%S +0000"}}</pubDate>
              {%- else %}
              <pubDate>{{asset.created_at | date: "%a, %d %b %Y %H:%M:%S +0000"}}</pubDate>
              {%- endif %}
        
              {%- if asset.name %}
              <media:title>{{asset.name | escape}}</media:title>
              {%- endif %}
        
              {%- if asset.description %}
              <media:description>{{asset.description | escape}}</media:description>
              {%- endif %}
        
              {%- if asset.schedule.starts_at or asset.created_at %}
              <dcterms:valid>
                  {%- if asset.schedule.starts_at %}start={{asset.schedule.starts_at | date: "%Y-%m-%dT%H:%M+00:00"}};
                  {%- else %}start={{asset.created_at | date: "%Y-%m-%dT%H:%M+00:00"}};{%- endif -%}
                  {%- if asset.schedule.ends_at %}end={{asset.schedule.ends_at | date: "%Y-%m-%dT%H:%M+00:00"}};{%- endif -%}
                  scheme=W3C-DTF</dcterms:valid>
              {%- endif %}
        
              {%- if asset.images.thumbnail.sources.size > 0 %}
              {%- assign thumb = asset.images.thumbnail.sources[0] %}
              <media:thumbnail url="{{thumb.src | escape}}" width="{{thumb.width}}" height="{{thumb.height}}"/>
              {%- endif %}
              {%- if asset.best_mp4_source %}
              {%- assign source = asset.best_mp4_source %}
              <media:group>
                <media:content url="{{source.src | escape}}" type="video/mp4" medium="video" expression="full"
                  {%- if source.encoding_rate %} bitrate="{{source.encoding_rate}}" {%- endif %}
                  {%- if source.duration %} duration="{{source.duration | divided_by: 1000}}"
                  {%- elsif asset.duration %} duration="{{asset.duration | divided_by: 1000}}" {%- endif %}
                  {%- if source.width %} width="{{source.width}}" {%- endif %}
                  {%- if source.height %} height="{{source.height}}"{%- endif %}/>
              </media:group>
              {%- endif %}
            </item>
            {%- endfor %}
          </channel>
        </rss>

    iPhone

      <?xml version="1.0" encoding="UTF-8"?>
        <rss xmlns:media="http://search.yahoo.com/mrss/" xmlns:dcterms="http://purl.org/dc/terms/" version="2.0">
          <channel>
            {%- if title %}
            <title>{{title | escape}}</title>
            {%- else %}
            <title>{{name | escape}}</title>
            {%- endif %}
        
            {%- if description %}
            <description>{{description | escape}}</description>
            {%- else %}
            <description>{{name | escape}}</description>
            {%- endif %}
        
            {%- if destination_url %}
            <link>{{destination_url | escape}}</link>
            {%- elsif syndication_url %}
            <link>{{syndication_url | escape}}</link>
            {%- endif %}
        
            {%- for asset in assets %}
            <item>
        
              {%- if asset.name %}
              <title>{{asset.name | escape}}</title>
              {%- endif %}
        
              {%- if asset.description %}
              <description>{{asset.description | escape}}</description>
              {%- endif %}
        
              {%- if asset.id %}
              <guid> isPermaLink="false">{{account_id}}:{{asset.id}}</guid>
              <link>{{player_url}}/{{account_id}}/default_default/index.html?videoId={{asset.id}}</link>
              {%- endif %}
        
              {%- if asset.publish_at %}
              <pubDate>{{asset.publish_at | date: "%a, %d %b %Y %H:%M:%S +0000"}}</pubDate>
              {%- else %}
              <pubDate>{{asset.created_at | date: "%a, %d %b %Y %H:%M:%S +0000"}}</pubDate>
              {%- endif %}
        
              {%- if asset.name %}
              <media:title>{{asset.name | escape}}</media:title>
              {%- endif %}
        
              {%- if asset.description %}
              <media:description>{{asset.description | escape}}</media:description>
              {%- endif %}
        
              {%- if asset.schedule.starts_at or asset.created_at %}
              <dcterms:valid>
                  {%- if asset.schedule.starts_at %}start={{asset.schedule.starts_at | date: "%Y-%m-%dT%H:%M+00:00"}};
                  {%- else %}start={{asset.created_at | date: "%Y-%m-%dT%H:%M+00:00"}};{%- endif -%}
                  {%- if asset.schedule.ends_at %}end={{asset.schedule.ends_at | date: "%Y-%m-%dT%H:%M+00:00"}};{%- endif -%}
                  scheme=W3C-DTF</dcterms:valid>
              {%- endif %}
        
              {%- if asset.images.thumbnail.sources.size > 0 %}
              {%- assign thumb = asset.images.thumbnail.sources[0] %}
              <media:thumbnail url="{{thumb.src | escape}}" width="{{thumb.width}}" height="{{thumb.height}}"/>
              {%- endif %}
              {%- if asset.best_mp4_source %}
              {%- assign source = asset.best_mp4_source %}
              <media:group>
                <media:content url="{{source.src | escape}}" type="video/mp4" medium="video" expression="full"
                  {%- if source.encoding_rate %} bitrate="{{source.encoding_rate}}" {%- endif %}
                  {%- if source.duration %} duration="{{source.duration | divided_by: 1000}}"
                  {%- elsif asset.duration %} duration="{{asset.duration | divided_by: 1000}}" {%- endif %}
                  {%- if source.width %} width="{{source.width}}" {%- endif %}
                  {%- if source.height %} height="{{source.height}}"{%- endif %}/>
              </media:group>
              {%- endif %}
            </item>
            {%- endfor %}
          </channel>
        </rss>

    iTunes

      <?xml version="1.0" encoding="UTF-8"?>
        <rss xmlns:media="http://search.yahoo.com/mrss/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
          <channel>
            {%- if title %}
            <title>{{title | escape}}</title>
            {%- else %}
            <title>{{name | escape}}</title>
            {%- endif %}
        
            {%- if description %}
            <description>{{description | escape}}</description>
            {%- else %}
            <description>{{name | escape}}</description>
            {%- endif %}
        
            {%- if destination_url %}
            <link>{{destination_url | escape}}</link>
            {%- elsif syndication_url %}
            <link>{{syndication_url | escape}}</link>
            {%- endif %}
        
            {%- if owner_name or owner_email %}
            <itunes:owner>
              {%- if owner_name %}
              <itunes:name>{{owner_name | escape}}</itunes:name>
              {%- endif %}
              {%- if owner_email%}
              <itunes:email>{{owner_email | escape}}</itunes:email>
              {%- endif %}
            </itunes:owner>
            {%- endif %}
        
            {%- if language %}
            <language>{{language | escape}}</language>
            {%- endif %}
        
            {%- if author %}
            <itunes:author>{{author | escape}}</itunes:author>
            {%- endif %}
        
            {%- if keywords %}
            <itunes:keywords>{{keywords | escape}}</itunes:keywords>
            {%- endif %}
        
            {%- if subtitle %}
            <itunes:subtitle>{{subtitle | escape}}</itunes:subtitle>
            {%- endif %}
        
            {%- if description %}
            <itunes:summary>{{description | escape}}</itunes:summary>
            {%- endif %}
        
            {%- if category %}
            {%- assign categories = category | split: ":" %}
            {%- if categories.size == 1 %}
            <itunes:category text="{{category | escape}}"></itunes:category>
            {%- elsif categories.size > 1 %}
            <itunes:category text="{{categories[0] | escape}}">
              <itunes:category text="{{categories[1] | escape}}"/>
            </itunes:category>
            {%- endif %}
            {%- endif %}
        
            {%- if explicit %}
            <itunes:explicit>{{explicit}}</itunes:explicit>
            {%- endif %}
        
            {%- comment %} Fall back to first asset's poster image if no album_art_url {% endcomment %}
            {%- if album_art_url %}
            <itunes:image href="{{album_art_url | escape}}"/>
            {%- elsif assets.size > 0 and assets[0].images.poster.sources.size > 0  %}
            <itunes:image href="{{assets[0].images.poster.sources[0].src | escape}}"/>
            {%- endif %}
        
            {%- for asset in assets %}
            <item>
        
              {%- if asset.name %}
              <title>{{asset.name | escape}}</title>
              {%- endif %}
        
              {%- if asset.description %}
              <description>{{asset.description | escape}}</description>
              {%- endif %}
        
              {%- if asset.id %}
              <guid isPermaLink="false">{{account_id}}:{{asset.id}}</guid>
              <link>{{player_url}}/{{account_id}}/default_default/index.html?videoId={{asset.id}}</link>
              {%- endif %}
        
              {%- if asset.publish_at %}
              <pubDate>{{asset.publish_at | date: "%a, %d %b %Y %H:%M:%S +0000"}}</pubDate>
              {%- else %}
              <pubDate>{{asset.created_at | date: "%a, %d %b %Y %H:%M:%S +0000"}}</pubDate>
              {%- endif %}
        
              {%- if asset.name %}
              <media:title>{{asset.name | escape}}</media:title>
              {%- endif %}
        
              {%- if asset.description %}
              <media:description>{{asset.description | escape}}</media:description>
              {%- endif %}
        
              {%- if asset.schedule.starts_at or asset.created_at %}
              <dcterms:valid>
                  {%- if asset.schedule.starts_at %}start={{asset.schedule.starts_at | date: "%Y-%m-%dT%H:%M+00:00"}};
                  {%- else %}start={{asset.created_at | date: "%Y-%m-%dT%H:%M+00:00"}};{%- endif -%}
                  {%- if asset.schedule.ends_at %}end={{asset.schedule.ends_at | date: "%Y-%m-%dT%H:%M+00:00"}};{%- endif -%}
                  scheme=W3C-DTF</dcterms:valid>
              {%- endif %}
        
              {%- if asset.images.thumbnail.sources.size > 0 %}
              {%- assign thumb = asset.images.thumbnail.sources[0] %}
              <media:thumbnail url="{{thumb.src | escape}}" width="{{thumb.width}}" height="{{thumb.height}}"/>
              {%- endif %}
        
              {%- if asset.best_mp4_source %}
              {%- assign source = asset.best_mp4_source %}
        
              {%- if source.src %}
              <enclosure url="{{source.src | escape}}" type="video/mp4"
                {%- if source.size %} length="{{source.size}}" {%- endif %}/>
              {%- endif %}
        
              {%- if source.duration %}
              <itunes:duration>{{source.duration | divided_by: 1000}}</itunes:duration>
              {%- elsif asset.duration %}
              <itunes:duration>{{asset.duration | divided_by: 1000}}</itunes:duration>
              {%- endif %}
              {%- endif %}
        
              {%- if author %}
              <itunes:author>{{author | escape}}</itunes:author>
              {%- endif %}
        
              {%- if asset.description %}
              <itunes:summary>{{asset.description | escape}}</itunes:summary>
              {%- endif %}
            </item>
            {%- endfor %}
          </channel>
        </rss>

    MP4

      <?xml version="1.0" encoding="UTF-8"?>
        <rss xmlns:media="http://search.yahoo.com/mrss/" xmlns:dcterms="http://purl.org/dc/terms/" version="2.0">
          <channel>
            {%- if title %}
            <title>{{title | escape}}</title>
            {%- else %}
            <title>{{name | escape}}</title>
            {%- endif %}
        
            {%- if description %}
            <description>{{description | escape}}</description>
            {%- else %}
            <description>{{name | escape}}</description>
            {%- endif %}
        
            {%- if destination_url %}
            <link>{{destination_url | escape}}</link>
            {%- elsif syndication_url %}
            <link>{{syndication_url | escape}}</link>
            {%- endif %}
        
            {%- for asset in assets %}
            <item>
        
              {%- if asset.name %}
              <title>{{asset.name | escape}}</title>
              {%- endif %}
        
              {%- if asset.description %}
              <description>{{asset.description | escape}}</description>
              {%- endif %}
        
              {%- if asset.id %}
              <guid> isPermaLink="false">{{account_id}}:{{asset.id}}</guid>
              <link>{{player_url}}/{{account_id}}/default_default/index.html?videoId={{asset.id}}</link>
              {%- endif %}
        
              {%- if asset.publish_at %}
              <pubDate>{{asset.publish_at | date: "%a, %d %b %Y %H:%M:%S +0000"}}</pubDate>
              {%- else %}
              <pubDate>{{asset.created_at | date: "%a, %d %b %Y %H:%M:%S +0000"}}</pubDate>
              {%- endif %}
        
              {%- if asset.name %}
              <media:title>{{asset.name | escape}}</media:title>
              {%- endif %}
        
              {%- if asset.description %}
              <media:description>{{asset.description | escape}}</media:description>
              {%- endif %}
        
              {%- if asset.schedule.starts_at or asset.created_at %}
              <dcterms:valid>
                  {%- if asset.schedule.starts_at %}start={{asset.schedule.starts_at | date: "%Y-%m-%dT%H:%M+00:00"}};
                  {%- else %}start={{asset.created_at | date: "%Y-%m-%dT%H:%M+00:00"}};{%- endif -%}
                  {%- if asset.schedule.ends_at %}end={{asset.schedule.ends_at | date: "%Y-%m-%dT%H:%M+00:00"}};{%- endif -%}
                  scheme=W3C-DTF</dcterms:valid>
              {%- endif %}
        
              {%- if asset.images.thumbnail.sources.size > 0 %}
              {%- assign thumb = asset.images.thumbnail.sources[0] %}
              <media:thumbnail url="{{thumb.src | escape}}" width="{{thumb.width}}" height="{{thumb.height}}"/>
              {%- endif %}
              <media:group>
              {%- for source in asset.sources %}
                {%- if source.container == "MP4" and source.codec == "H264" and source.src %}
                <media:content url="{{source.src | escape}}" type="video/mp4" medium="video" expression="full"
                  {%- if source.encoding_rate %} bitrate="{{source.encoding_rate}}" {%- endif %}
                  {%- if source.duration %} duration="{{source.duration | divided_by: 1000}}"
                  {%- elsif asset.duration %} duration="{{asset.duration | divided_by: 1000}}" {%- endif %}
                  {%- if source.width %} width="{{source.width}}" {%- endif %}
                  {%- if source.height %} height="{{source.height}}"{%- endif %}/>
                {%- endif %}
              {%- endfor %}
              </media:group>
            </item>
            {%- endfor %}
          </channel>
        </rss>

    Player

      <?xml version="1.0" encoding="UTF-8"?>
        <rss xmlns:media="http://search.yahoo.com/mrss/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:fh="http://purl.org/syndication/history/1.0" version="2.0">
          <channel>
            {%- if title %}
            <title>{{title | escape}}</title>
            {%- else %}
            <title>{{name | escape}}</title>
            {%- endif %}
        
            {%- if description %}
            <description>{{description | escape}}</description>
            {%- else %}
            <description>{{name | escape}}</description>
            {%- endif %}
        
            {%- if destination_url %}
            <link>{{destination_url | escape}}</link>
            {%- elsif syndication_url %}
            <link>{{syndication_url | escape}}</link>
            {%- endif %}
            <fh:incremental>false</fh:incremental>
        
            {%- for asset in assets %}
            <item>
        
              {%- if asset.name %}
              <title>{{asset.name | escape}}</title>
              {%- endif %}
        
              {%- if asset.description %}
              <description>{{asset.description | escape}}</description>
              {%- endif %}
        
              {%- if asset.id %}
              <guid isPermaLink="false">{{account_id}}:{{asset.id}}</guid>
              <link>{{player_url}}/{{account_id}}/default_default/index.html?videoId={{asset.id}}</link>
              {%- endif %}
        
              {%- if asset.publish_at %}
              <pubDate>{{asset.publish_at | date: "%a, %d %b %Y %H:%M:%S +0000"}}</pubDate>
              {%- else %}
              <pubDate>{{asset.created_at | date: "%a, %d %b %Y %H:%M:%S +0000"}}</pubDate>
              {%- endif %}
        
              {%- if asset.name %}
              <media:title>{{asset.name | escape}}</media:title>
              {%- endif %}
        
              {%- if asset.description %}
              <media:description>{{asset.description | escape}}</media:description>
              {%- endif %}
        
              {%- if asset.schedule.starts_at or asset.created_at %}
              <dcterms:valid>
                  {%- if asset.schedule.starts_at %}start={{asset.schedule.starts_at | date: "%Y-%m-%dT%H:%M+00:00"}};
                  {%- else %}start={{asset.created_at | date: "%Y-%m-%dT%H:%M+00:00"}};{%- endif -%}
                  {%- if asset.schedule.ends_at %}end={{asset.schedule.ends_at | date: "%Y-%m-%dT%H:%M+00:00"}};{%- endif -%}
                  scheme=W3C-DTF</dcterms:valid>
              {%- endif %}
        
              {%- if asset.best_mp4_source %}
              {%- assign source = asset.best_mp4_source %}
              <media:content url="{{source.src | escape}}" type="video/mp4" medium="video" expression="full"
              {%- if source.encoding_rate %} bitrate="{{source.encoding_rate}}" {%- endif %}
              {%- if source.duration %} duration="{{source.duration | divided_by: 1000}}"
              {%- elsif asset.duration %} duration="{{asset.duration | divided_by: 1000}}" {%- endif %}
              {%- if source.width %} width="{{source.width}}" {%- endif %}
              {%- if source.height %} height="{{source.height}}"{%- endif %}>
        
                {%- if asset.images.thumbnail.sources.size > 0 %}
                {%- assign thumb = asset.images.thumbnail.sources[0] %}
                <media:thumbnail url="{{thumb.src | escape}}" width="{{thumb.width}}" height="{{thumb.height}}"/>
                {%- endif %}
                <media:player url="{{player_url}}/{{account_id}}/default_default/index.html?videoId={{asset.id}}">
                </media:player>
              </media:content>
              {%- endif %}
            </item>
            {%- endfor %}
          </channel>
        </rss>

    Roku

      {
        {%- if title %}
        "providerName": "{{title | escape}}" ,
        {%- endif %}
        "lastUpdated": "{{ "now" | toUTC |  date: "%Y-%m-%dT%H:%M:%S+00:00" }}",
        "language": "{{language | escape}}",
        "shortFormVideos": [
          {%- assign i = 0 %}
          {%- for asset in assets %}
          {%- if i != 0 %}
          {{- "," }}
          {%- endif %}
          {
            {%- if asset.id %}
            "id": "{{asset.id | escape}}"
            {%- endif %}
            {%- if asset.name %}
            {{- "," }}
            "title": "{{asset.name | escape}}"
            {{- "," }}
            {%- endif %}
            "content": {
              {%- if asset.created_at %}
              "dateAdded":  "{{asset.created_at | date: "%Y-%m-%dT%H:%M:%S+00:00"}}"
              {%- endif %}
              {%- if asset.hls_source %}
              {%- assign source = asset.hls_source %}
              {{- "," }}
              "videos": [
                {
                  "url": "{{source.src | escape}}",
                  {%- if asset.best_dynamic_rendition_quality %}
                  "quality": "{{ asset.best_dynamic_rendition_quality | escape}}",
                  {%- endif %}
                  "videoType" : "HLS"
                }
              ]
              {%- if source.duration %}
              {{- "," }}
              "duration" : "{{source.duration | divided_by: 1000}}"
              {%- elsif asset.duration %}
              {{- "," }}
              "duration" : "{{asset.duration | divided_by: 1000}}"
              {%- endif %}
              {%- endif %}
            }
            {%- if asset.images.thumbnail.sources.size > 0 %}
            {%- assign thumb = asset.images.thumbnail.sources[0] %}
            {{- "," }}
            "thumbnail": "{{thumb.src | escape}}"
            {%- endif %}
            {%- if asset.description %}
            {{- "," }}
            "shortDescription" : "{{asset.description | escape}}"
            {%- endif %}
            {%- if asset.publish_at %}
            {{- "," }}
            "releaseDate" : "{{asset.publish_at | date: "%Y-%m-%d"}}"
            {%- elsif asset.updated_at %}
            {{- "," }}
            "releaseDate" : "{{asset.updated_at | date: "%Y-%m-%d" | escape}}"
            {%- endif %}
            {%- if asset.tags and asset.tags.size > 0 -%}
            {{- "," }}
            "tags": [
              {%- assign j = 0 %}
              {%- for t in asset.tags %}
              {%- if j != 0 -%}
              {{ "," }}
              {%- endif %}
              "{{ t }}"
              {%- assign j = j | plus: 1 -%}
              {%- endfor %}
            ]
            {%- endif %}
          }
          {%- assign i = i | plus: 1%}
          {%- endfor %}
        ]
      }

    Source

      <?xml version="1.0" encoding="UTF-8"?>
        <rss xmlns:media="http://search.yahoo.com/mrss/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:ext="http://ooyala.com/syndication/ext/" version="2.0">
          <channel>
            {%- if title %}
            <title>{{title | escape}}</title>
            {%- else %}
            <title>{{name | escape}}</title>
            {%- endif %}
        
            {%- if description %}
            <description>{{description | escape}}</description>
            {%- else %}
            <description>{{name | escape}}</description>
            {%- endif %}
        
            {%- if destination_url %}
            <link>{{destination_url | escape}}</link>
            {%- elsif syndication_url %}
            <link>{{syndication_url | escape}}</link>
            {%- endif %}
        
            {%- for asset in assets %}
            <item>
              {%- if asset.name %}
              <title>{{asset.name | escape}}</title>
              {%- endif %}
        
              {%- if asset.id %}
              <guid> isPermaLink="false">{{account_id}}:{{asset.id}}</guid>
              <link>{{player_url}}/{{account_id}}/default_default/index.html?videoId={{asset.id}}</link>
              {%- endif %}
        
              {%- if asset.publish_at %}
              <pubDate>{{asset.publish_at | date: "%a, %d %b %Y %H:%M:%S +0000"}}</pubDate>
              {%- else %}
              <pubDate>{{asset.created_at | date: "%a, %d %b %Y %H:%M:%S +0000"}}</pubDate>
              {%- endif %}
        
              {%- if asset.name %}
              <media:title>{{asset.name | escape}}</media:title>
              {%- endif %}
        
              {%- if asset.schedule.starts_at or asset.created_at %}
              <dcterms:valid>
                  {%- if asset.schedule.starts_at %}start={{asset.schedule.starts_at | date: "%Y-%m-%dT%H:%M+00:00"}};
                  {%- else %}start={{asset.created_at | date: "%Y-%m-%dT%H:%M+00:00"}};{%- endif -%}
                  {%- if asset.schedule.ends_at %}end={{asset.schedule.ends_at | date: "%Y-%m-%dT%H:%M+00:00"}};{%- endif -%}
                  scheme=W3C-DTF</dcterms:valid>
              {%- endif %}
        
              {%- if asset.images.thumbnail.sources.size > 0 %}
              {%- assign thumb = asset.images.thumbnail.sources[0] %}
              <media:thumbnail url="{{thumb.src | escape}}"
                {%- if thumb.width %} width="{{thumb.width}}" {%- endif %}
                {%- if thumb.height %} height="{{thumb.height}}" {%- endif -%}
              />
              {%- endif %}
        
              {%- if asset.digital_master.url %}
              <media:content url="{{asset.digital_master.url | escape}}" medium="video" expression="full"
                {%- if asset.digital_master.size %} fileSize="{{asset.digital_master.size}}" {%- endif %}
                {%- if asset.digital_master.duration %} duration="{{asset.digital_master.duration | divided_by: 1000}}" {%- endif -%}
              />
              {%- endif %}
        
              {%- if asset.original_filename %}
              <ext:originalFilename><![CDATA[ {{asset.original_filename}} ]]></ext:originalFilename>
              {%- endif %}
            </item>
            {%- endfor %}
          </channel>
        </rss>

    Page last updated on 28 Sep 2020