แนวทางของ MSN HTML และข้อจํากัดของแท็ก

หน้านี้จะสรุปแนวทางและข้อจํากัดการจัดรูปแบบ MSN HTML สําหรับเนื้อหาฟีดที่ส่งใน MSN Partner Hub ปฏิบัติตามมาตรฐานเหล่านี้เพื่อให้มั่นใจได้ถึงการกลืนกินที่ประสบความสําเร็จและจอแสดงผลที่ดีที่สุดบน MSN

ในบทความนี้

ตําแหน่งที่อนุญาตให้ใช้ HTML ได้

แท็ก HTML ที่อนุญาต

แท็ก HTML ที่ไม่ได้รับอนุญาต

ฝังที่สนับสนุน

ตัวอย่างมาร์กอัปสื่อ RSS และตัวดึงข้อมูล

ตัวอย่างโค้ด ATOM และ RSS

ตําแหน่งที่อนุญาตให้ใช้ HTML ได้

HTML ได้รับอนุญาตในเขตข้อมูลต่อไปนี้:

  • เนื้อความของบทความ
  • เขตข้อมูล คําอธิบาย ของสไลด์การนําเสนอสไลด์

HTML ไม่ได้รับการสนับสนุน ในเขตข้อมูลตัวดึงข้อมูลอื่น รวมถึงองค์ประกอบ Metadata เช่น ชื่อเรื่อง ชื่อผู้เขียน หรือป้ายชื่อประเภท

แท็ก HTML ที่อนุญาต

ใช้เฉพาะแท็กที่สนับสนุนด้านล่างเพื่อให้แน่ใจว่าเนื้อหาของคุณแสดงผลได้อย่างถูกต้อง

การจัดรูปแบบข้อความ

  • <ข>, <i>, <em>, <strong>, <sub>, <sup>, <small>

หัวเรื่อง

  • <h1> ถึง <h5>
  • <ก> (ด้วย href; ต้องเริ่มต้นด้วย https://, http:// หรือ mailto:)

รูปภาพ

  • <img> (ต้องใช้ URL แบบเต็ม)

ตาราง

  • <ตาราง>, <thead>, <tbody>, <tfoot>, <tr>, <td>, <th>, <col>, <caption>, <colgroup>

รายการ

  • <ul>, <ol>, <li>

เค้าโครง

  • <p>, <div>, <span>, <br>

ฝัง (จํากัด)

  • <blockquote>, <iframe> (เฉพาะแพลตฟอร์มวิดีโอและสังคมที่สนับสนุนเท่านั้น ดูด้านล่าง)

แท็ก HTML ที่ไม่ได้รับอนุญาต

แท็กต่อไปนี้จะถูกตัดออกโดยอัตโนมัติในระหว่างการกลืนกินและอาจป้องกันการเผยแพร่ที่ประสบความสําเร็จ:

  • <สไตล์>, <สคริปต์>, <วัตถุ>, <ฝัง>, <พาราม>, <แอปเพล็ต>
  • แท็กสื่อ>ใดๆ <ที่มีรูปแบบไม่ถูกต้อง (เช่น ไม่มีแอตทริบิวต์ที่จําเป็น)
  • เสื้อคลุมส่งเสริมการขายที่เพิ่มโดยบริการของบุคคลที่สาม (เช่น Giphy wrappers)

หลักปฏิบัติที่ดีที่สุด

  • หลีกเลี่ยงโครงสร้างที่ซ้อนกันสูง (เก็บลําดับชั้น HTML ให้ต่ํากว่า 10 ระดับ)
  • อย่าใช้แท็ก br> หลาย<แท็กในแถวสําหรับระยะห่าง
  • งดเว้นจากรวมถึงสไตล์อินไลน์หรือ JavaScript

ฝังที่สนับสนุน

คุณสามารถใช้ <โค้ดฝังตัวเฉพาะ iframe> หรือแพลตฟอร์ม เฉพาะสําหรับบริการเหล่านี้เท่านั้น:

  • YouTube

สำคัญ

เนื่องจากการเปลี่ยนแปลงแพลตฟอร์มล่าสุดทางฝั่ง YouTube MSN จึงไม่สามารถฝัง YouTube ในระดับปานกลางได้ในขณะนี้ ดังนั้นวิดีโอ YouTube 3PP ทั้งหมดที่ส่งผ่านฟีดหรือบทความ HTML จะถูกปฏิเสธในระหว่างการกลืน ปัญหานี้มีผลต่อเนื้อหาส่วนกลางบางส่วน แต่คู่ค้าควรหลีกเลี่ยงการใช้ YouTube ฝังตัวจนกว่าจะมีการแจ้งให้ทราบเพิ่มเติม เราจะอัปเดตคําแนะนํานี้เมื่อคืนค่าการสนับสนุนแล้ว

  • X
  • Facebook
  • Instagram
  • Pinterest
  • Spotify
  • Infogram
  • Google Maps
  • Giphy
  • อวด
  • Reddit
  • TikTok

ฝังทั้งหมดต้องใช้ URL https:// โค้ดฝังตัวจากบริการที่ไม่ได้รับการสนับสนุนจะถูกเอาออกในระหว่างการประมวลผล

ตัวอย่างมาร์กอัปสื่อ RSS และตัวดึงข้อมูล

สื่อ RSS สามารถใช้ในทั้งฟีด RSS และ ATOM เพื่อแสดงเนื้อหาสื่อ เช่น รูปภาพและวิดีโอบน MSN

การฝังเนื้อหาสื่อ

แท็ก <media:content> จะใช้สําหรับการฝังรูปภาพและวิดีโอในบทความ แท็กนี้ไม่สามารถรวมกับองค์ประกอบ HTML ได้ ดังนั้นจึงต้องระบุที่ระดับรากของรายการ แท็ก RSS ของสื่อต้องถูกระบุเป็นรายการลูกในทันทีของ <item> ใน RSS หรือ <entry> ในตัวดึงข้อมูล ATOM หรือจะถูกละเว้น

รูปภาพที่ฝังตัว


<media:content 
    url="https://contoso.com/image-source.jpg" 
    type="image/jpeg" 
    medium="image">

  <media:title>Image title</media:title>

  <media:text>Image1 alt-text</media:text>

  <media:credit>Joe Gargery/Fabrikam Images</media:credit>

</media:content>

วิดีโอแบบฝังตัว


<media:content 
    url="https://contoso.com/video.mp4" 
    duration="91" 
    type="video/mp4" 
    medium="video">

  <media:title>Video title</media:title>

  <media:description>Video abstract/description</media:description>

  <media:credit>Joe Gargery/Fabrikam Videos</media:credit>

</media:content>

การฝังแกลเลอรี

แกลเลอรีสามารถฝังในบทความโดยใช้ <media:group> แท็ก ซึ่งจะทําหน้าที่เป็นคอนเทนเนอร์สําหรับสไลด์ที่แท็กเป็น<media:content>

การนําเสนอสไลด์ที่ฝังตัว


<media:group>

  <media:title>Slideshow title</media:title>

  <media:credit role="author">Slideshow author</media:credit>

  <media:content 
      url="https://contoso.com/image1.jpg" 
      type="image/jpeg" 
      medium="image">

    <media:title>Slide 1 title</media:title>
    <media:text>Slide 1 alt-text</media:text>
    <media:description>Slide 1 description</media:description>

  </media:content>

  <media:content 
      url="https://contoso.com/image2.jpg" 
      type="image/jpeg" 
      medium="image">

    <media:title>Slide 2 title</media:title>
    <media:text>Slide 2 alt-text</media:text>
    <media:description>Slide 2 description</media:description>

  </media:content>

</media:group>

ตัวอย่างโค้ด ATOM และ RSS

ใช้ส่วนย่อยของโค้ดด้านล่างเพื่อช่วยคุณจัดการฟีดของคุณ อย่าลืมใช้ฮับคู่ค้า MSN เพื่อแสดงตัวอย่างเนื้อหาของคุณและระบุปัญหาการแสดงผลใดๆ

ฟีดบทความ ATOM

โปรดทราบว่า ATOM รองรับเฉพาะบทความในระดับ <entry> เท่านั้น การนําเสนอสไลด์และวิดีโออาจฝังตัวแบบอินไลน์ภายในบทความ 

ส่วนหัวของตัวดึงข้อมูล (โครงสร้างที่จําเป็น)


<?xml version="1.0" encoding="utf-8"?>
<!-- The root element must include declaration of used namespaces. -->
<feed xmlns="http://www.w3.org/2005/Atom"
      xmlns:media="http://search.yahoo.com/mrss/"
      xmlns:mi="http://schemas.ingestion.microsoft.com/common/"
      xmlns:dcterms="http://purl.org/dc/terms/"
      xml:lang="en-us">

  <id>https://v3spec.msn.com/myfeed.xml</id>
  <title><![CDATA[Feed title]]></title>
  <subtitle><![CDATA[Feed subtitle]]></subtitle>
  <updated>2017-10-02T13:00:00.52Z</updated>

  <author>
    <name>Feed author</name>
    <email>author@contoso.com</email>
  </author>

รายการบทความพื้นฐาน


  <entry>
    <!-- REQUIRED: Unique ID for this article -->
    <id>https://v3spec.msn.com/article123.htm</id>

    <!-- REQUIRED: Title -->
    <title><![CDATA[High-definition video encoding and streaming]]></title>

    <!-- REQUIRED: Publish date -->
    <published>2017-01-10T10:00:00+0100</published>

    <!-- Last update date -->
    <updated>2017-10-02T13:00:00.52Z</updated>

    <!-- REQUIRED: Canonical link -->
    <link rel="self" href="https://v3spec.msn.com/article123.htm" />

    <!-- Author information -->
    <author>
      <name><![CDATA[Joe Gargery]]></name>
    </author>

    <!-- Optional subtitle -->
    <dcterms:alternative>Article subtitle</dcterms:alternative>

ตัวเลือกการหมดอายุ


    <!-- Option 1: Using dcterms:valid -->
    <dcterms:valid>
      start=2016-10-01T10:00:00+0100; 
      end=2018-10-02T10:00:00+0100; 
      scheme=W3C-DTF
    </dcterms:valid>

    <!-- Option 2: Using mi:expirationDate -->
    <mi:expirationDate>2018-10-02T13:00:00.52Z</mi:expirationDate>

การจัดประเภทและเมตาดาต้า


    <!-- Short title (<= 40 chars) -->
    <mi:shortTitle><![CDATA[Short Title]]></mi:shortTitle>

    <!-- Keywords -->
    <media:keywords>keyword1,keyword2,keyword3</media:keywords>

    <!-- Categories -->
    <category term="News" />
    <category term="Sports" />​​​​​​​

เนื้อหาสรุปและเนื้อหา
 


    <!-- Plain text abstract -->
    <summary><![CDATA[ Article abstract/description should be plain text, no HTML is allowed ]]></summary>

    <!-- HTML-formatted body (use CDATA to avoid escaping HTML) -->
    <content type="html">
      <![CDATA[
        <p>Media Services enables you to encode your media files...</p>
        <img src="https://v3spec.msn.com/_files/assets/azure1.jpg"
             alt="Image title"
             title="Image title"
             data-portal-copyright="Joe Gargery/Fabrikam Images"
             data-has-syndication-rights="1"
             data-license-id="698526"
             data-licensor-name="Licensor name"
             data-focal-region="x1:246,y1:140,x2:246,y2:140" />
      ]]>
    </content>

ตัวอย่างสื่อแบบอินไลน์

วิดีโอแบบอินไลน์ (1PP)


​​​​​​​    <video id="8172818"
           title="an inline video"
           poster="https://contoso.com/videothumbnail.jpg"
           data-description="this is a sample inline video">
      <source src="https://contoso.com/video.mp4" type="video/mp4"/>
    </video>

วิดีโอแบบอินไลน์ (3PP YouTube)


    <iframe width="100%" height="100%"
            frameborder="0"
            allowfullscreen="true"
            src="https://www.youtube.com/embed/XnZ_J3l_0z4?rel=0">
    </iframe>


Inline slideshow

    <div class="slideshow">
      <cite>Slideshow author</cite>
      <title>Slideshow title</title>
      <figure>
        <img src="https://v3spec.msn.com/image1.jpg" title="slide 1 title"/>
        <figcaption>slide 1 caption <span class="copyright">slide 1 copyrights</span></figcaption>
      </figure>
      <figure>
        <img src="https://v3spec.msn.com/image2.jpg" title="slide 2 title"/>
        <figcaption>slide 2 caption <span class="copyright">Joe Gargery/Fabrikam Images</span></figcaption>
      </figure>
    </div>


Media:Content examples

    <!-- Image -->
    <media:content url="https://v3spec.msn.com/image1.jpg" type="image/jpeg" medium="image">
      <media:credit>Joe Gargery/Fabrikam Images</media:credit>
      <media:title>Image title</media:title>
      <media:text>Image alt-text</media:text>
      <mi:focalRegion>
        <mi:x1>120</mi:x1><mi:y1>120</mi:y1>
        <mi:x2>400</mi:x2><mi:y2>400</mi:y2>
      </mi:focalRegion>
      <mi:hasSyndicationRights>1</mi:hasSyndicationRights>
      <mi:licenseId>698525</mi:licenseId>
      <mi:licensorName>Licensor name</mi:licensorName>
    </media:content>

    <!-- Video -->
    <media:content url="https://v3spec.msn.com/video.mp4" duration="91" type="video/mp4" medium="video">
      <guid>218736</guid>
      <media:thumbnail url="https://v3spec.msn.com/image.jpg"/>
      <media:title>Video title</media:title>
      <media:description>Video description</media:description>
      <media:credit>Joe Gargery/Fabrikam Videos</media:credit>
    </media:content>


Related links example

    <link rel="related" type="text/html"
          href="https://v3spec.msn.com/news/prop_irs_1.html"
          title="New IRS proposal">
      <media:thumbnail url="https://v3spec.msn.com/related_link_thumbnail1.jpg"/>
    </link>

ตัวอย่างของการเข้ายึด


  <entry>
    <!-- REQUIRED: Unique identifier of content to remove -->
    <id>https://v3spec.msn.com/article123.htm</id>
    <updated>2017-10-02T13:00:00.52Z</updated>

    <!-- Expiration in the past = takedown -->
    <dcterms:valid>
      start=2019-10-01T10:00:00+0100; 
      end=2018-10-02T10:00:00+0100; 
      scheme=W3C-DTF
    </dcterms:valid>
  </entry>
</feed>

ตัวดึงข้อมูลบทความ RSS


​​​​​​​<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom"
     xmlns:media="http://search.yahoo.com/mrss/"
     xmlns:mi="http://schemas.ingestion.microsoft.com/common/"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:dcterms="http://purl.org/dc/terms/"
     version="2.0">
 


 <channel>
    <!-- Channel metadata -->
    <title>Lifestyle</title> <!-- REQUIRED -->
    <description>Channel description</description> <!-- REQUIRED -->
    <language>en-us</language> <!-- REQUIRED -->
    <link>https://v3spec.msn.com/lifestyle</link> <!-- REQUIRED -->

    <!-- Begin article item -->
    <item>

      <!-- REQUIRED: Unique article identifier -->
      <guid isPermaLink="false">477648</guid>

      <!-- REQUIRED: Headline/title of the article -->
      <title><![CDATA[High-definition video encoding and streaming]]></title>

      <!-- REQUIRED: Publication date -->
      <pubDate>2017-10-04T08:00:00-05:00</pubDate>

      <!-- OPTIONAL: Last modified date -->
      <dcterms:modified>2017-10-10T10:00:00+0100</dcterms:modified>

      <!-- REQUIRED: URL to full article -->
      <link>https://v3spec.msn.com/articleid=2836489202/</link>

      <!-- OPTIONAL: Author name -->
      <dc:creator>Joe Gargery</dc:creator>

      <!-- OPTIONAL: Subtitle -->
      <dcterms:alternative>Article subtitle</dcterms:alternative>

      <!-- OPTIONAL: Article validity window -->
      <dcterms:valid>start=2016-10-01T10:00:00+0100; end=2018-10-02T10:00:00+0100; scheme=W3C-DTF</dcterms:valid>

      <!-- OPTIONAL: Expiration date -->
      <mi:expirationDate>2018-10-02T13:00:00.52Z</mi:expirationDate>

      <!-- OPTIONAL: Short title for UI (<= 40 characters) -->
      <mi:shortTitle>Short Title</mi:shortTitle>

      <!-- OPTIONAL: Comma-separated keywords -->
      <media:keywords>keyword1,keyword2,keyword3</media:keywords>

      <!-- OPTIONAL: Categories -->
      <category>News</category>
      <category>Sports</category>

      <!-- OPTIONAL: Summary (no HTML allowed) -->
      <description><![CDATA[ Article description should be plain text, no HTML is allowed ]]></description>

      <!-- REQUIRED: Full HTML article content -->
      <content:encoded><![CDATA[
        <img src="https://v3spec.msn.com/_files/assets/azure1.jpg" alt="Image title here." />
        <p>Media Services enables you to encode your media files...</p>
        <p>Here is an example of an embedded 1PP video:</p>
        <video id="8172818" poster="https://v3spec.msn.com/videothumbnail.jpg">
          <source src="https://v3spec.msn.com/video.mp4" type="video/mp4" />
        </video>
        <p>Example of embedded YouTube video:</p>
        <iframe src="https://www.youtube.com/embed/XnZ_J3l_0z4?rel=0"></iframe>
        <p>Example of inline slideshow:</p>
        <div class="slideshow">
          <figure>
            <img src="https://v3spec.msn.com/image1.jpg" />
            <figcaption>slide 1 caption</figcaption>
          </figure>
        </div>
      ]]></content:encoded>

      <!-- REQUIRED: Main article image -->
      <media:content url="https://v3spec.msn.com/image1.jpg" type="image/jpeg" medium="image">
        <!-- OPTIONAL: Image credit -->
        <media:credit>Joe Gargery/Fabrikam Images</media:credit>
        <!-- OPTIONAL: Image title -->
        <media:title>Image title</media:title>
        <!-- OPTIONAL: Image alt text -->
        <media:text>Image alt-text</media:text>
        <!-- OPTIONAL: Focal crop region -->
        <mi:focalRegion>
          <mi:x1>120</mi:x1><mi:y1>120</mi:y1><mi:x2>400</mi:x2><mi:y2>400</mi:y2>
        </mi:focalRegion>
        <!-- OPTIONAL: Licensing metadata -->
        <mi:hasSyndicationRights>1</mi:hasSyndicationRights>
        <mi:licenseId>698525</mi:licenseId>
        <mi:licensorName>Licensor name</mi:licensorName>
      </media:content>

      <!-- OPTIONAL: 3rd party video metadata -->
      <media:content url="https://v3spec.msn.com/video.mp4" duration="91" type="video/mp4" medium="video">
        <!-- REQUIRED inside video metadata -->
        <guid>218736</guid>
        <media:thumbnail url="https://v3spec.msn.com/image.jpg" />
        <media:title>Video title</media:title>
        <media:description>Video description</media:description>
        <media:credit>Joe Gargery/Fabrikam Videos</media:credit>
        <media:subTitle type="application/ttml" lang="en" href="https://www.contols.org/closedcaptions.ttml" />
      </media:content>

      <!-- OPTIONAL: Inline slideshow -->
      <media:group>
        <media:title>Slideshow title</media:title>
        <media:credit role="author">Slideshow author</media:credit>
        <media:content url="https://v3spec.msn.com/image1.jpg" type="image/jpeg" medium="image">
          <media:credit>Joe Gargery/Fabrikam Images</media:credit>
          <media:title>Slide 1 title</media:title>
          <media:text>Slide 1 alt-text</media:text>
          <media:description><![CDATA[<p>Slide 1 description</p>]]></media:description>
        </media:content>
        <media:content url="https://v3spec.msn.com/image2.jpg" type="image/jpeg" medium="image">
          <media:credit>Joe Gargery/Fabrikam Images</media:credit>
          <media:title>Slide 2 title</media:title>
          <media:text>Slide 2 alt-text</media:text>
          <media:description>Slide 2 description</media:description>
        </media:content>
      </media:group>

      <!-- OPTIONAL: Related links with thumbnails -->
      <atom:link rel="related" type="text/html" href="https://v3spec.msn.com/news/prop_irs_1.html" title="New IRS proposal">
        <media:thumbnail url="https://v3spec.msn.com/related_link_thumbnail1.jpg" />
      </atom:link>
      <atom:link rel="related" type="text/html" href="https://v3spec.msn.com/news/prop_irs_2.html" title="New IRS proposal">
        <media:thumbnail url="https://v3spec.msn.com/related_link_thumbnail2.jpg" />
      </atom:link>

    </item>
  </channel>
</rss>

เนื้อหาสรุปการนําเสนอสไลด์ RSS


<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom"
     xmlns:media="http://search.yahoo.com/mrss/"
     xmlns:mi="http://schemas.ingestion.microsoft.com/common/"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:dcterms="http://purl.org/dc/terms/"
     version="2.0">

  <channel>
    <title>Lifestyle</title>
    <description>channel description</description>
    <language>en-us</language>
    <link>https://v3spec.msn.com/lifestyle</link>

    <!-- BEGIN ARTICLE ITEM -->
    <item>

      <!-- Required Metadata -->
      <guid isPermaLink="false">477648</guid>
      <title><![CDATA[High-definition video encoding and streaming]]></title>
      <pubDate>2017-10-04T08:00:00-05:00</pubDate>
      <dcterms:modified>2017-10-10T10:00:00+0100</dcterms:modified>
      <link>https://v3spec.msn.com/articleid=2836489202/</link>

      <!-- Author and Metadata -->
      <dc:creator>Joe Gargery</dc:creator>
      <dcterms:alternative>Article subtitle</dcterms:alternative>
      <dcterms:valid>start=2016-10-01T10:00:00+0100; end=2018-10-02T10:00:00+0100; scheme=W3C-DTF</dcterms:valid>
      <mi:expirationDate>2018-10-02T13:00:00.52Z</mi:expirationDate>
      <mi:shortTitle>Short Title</mi:shortTitle>
      <media:keywords>keyword1,keyword2,keyword3</media:keywords>

      <!-- Categories and Summary -->
      <category>News</category>
      <category>Sports</category>
      <description><![CDATA[ Article description should be plain text, no HTML is allowed ]]></description>

      <!-- Article Body (HTML) -->
      <content:encoded><![CDATA[
        <img src="https://v3spec.msn.com/_files/assets/azure1.jpg"
             alt="Image title here."
             title="Image title"
             data-portal-copyright="Joe Gargery/Fabrikam Images"
             data-has-syndication-rights="1"
             data-license-id="698526"
             data-licensor-name="Licensor name"
             data-focal-region="x1:246,y1:140,x2:246,y2:140" />

        <p>Media Services enables you to encode your media files...</p>

        <p>Here is an example of an embedded 1PP video:</p>
        <video id="8172818"
               title="an inline video"
               poster="https://v3spec.msn.com/videothumbnail.jpg"
               data-description="this is a sample inline video"
               data-portal-copyright="Joe Gargery/Fabrikam Videos">
          <source src="https://v3spec.msn.com/video.mp4" type="video/mp4" />
        </video>

        <p>Example of embedded YouTube video:</p>
        <iframe src="https://www.youtube.com/embed/XnZ_J3l_0z4?rel=0" frameborder="0" allowfullscreen></iframe>

        <p>Example of inline slideshow:</p>
        <div class="slideshow">
          <cite>Slideshow author</cite>
          <title>Slideshow title</title>
          <figure>
            <img src="https://v3spec.msn.com/image1.jpg" title="slide 1 title" />
            <figcaption>slide 1 caption <span class="copyright">slide 1 copyrights</span></figcaption>
          </figure>
          <figure>
            <img src="https://v3spec.msn.com/image2.jpg" title="slide 2 title" />
            <figcaption>slide 2 caption <span class="copyright">Joe Gargery/Fabrikam Images</span></figcaption>
          </figure>
        </div>
      ]]></content:encoded>

      <!-- Featured Image Metadata -->
      <media:content url="https://v3spec.msn.com/image1.jpg" type="image/jpeg" medium="image">
        <media:credit>Joe Gargery/Fabrikam Images</media:credit>
        <media:title>Image title</media:title>
        <media:text>Image alt-text</media:text>
        <mi:focalRegion>
          <mi:x1>120</mi:x1><mi:y1>120</mi:y1><mi:x2>400</mi:x2><mi:y2>400</mi:y2>
        </mi:focalRegion>
        <mi:hasSyndicationRights>1</mi:hasSyndicationRights>
        <mi:licenseId>698525</mi:licenseId>
        <mi:licensorName>Licensor name</mi:licensorName>
      </media:content>

      <!-- Video Metadata (3PP) -->
      <media:content url="https://v3spec.msn.com/video.mp4" duration="91" type="video/mp4" medium="video">
        <guid>218736</guid>
        <media:thumbnail url="https://v3spec.msn.com/image.jpg" />
        <media:title>Video title</media:title>
        <media:description>Video description</media:description>
        <media:credit>Joe Gargery/Fabrikam Videos</media:credit>
        <media:subTitle type="application/ttml" lang="en" href="https://www.contols.org/closedcaptions.ttml" />
      </media:content>

      <!-- Inline Slideshow -->
      <media:group>
        <media:title>Slideshow title</media:title>
        <media:credit role="author">Slideshow author</media:credit>

        <media:content url="https://v3spec.msn.com/image1.jpg" type="image/jpeg" medium="image">
          <media:credit>Joe Gargery/Fabrikam Images</media:credit>
          <media:title>Slide 1 title</media:title>
          <media:text>Slide 1 alt-text</media:text>
          <media:description><![CDATA[<p>Slide 1 description</p>]]></media:description>
        </media:content>

        <media:content url="https://v3spec.msn.com/image2.jpg" type="image/jpeg" medium="image">
          <media:credit>Joe Gargery/Fabrikam Images</media:credit>
          <media:title>Slide 2 title</media:title>
          <media:text>Slide 2 alt-text</media:text>
          <media:description>Slide 2 description</media:description>
        </media:content>
      </media:group>

      <!-- Related Links -->
      <atom:link rel="related" type="text/html" href="https://v3spec.msn.com/news/prop_irs_1.html" title="New IRS proposal">
        <media:thumbnail url="https://v3spec.msn.com/related_link_thumbnail1.jpg" />
      </atom:link>

      <atom:link rel="related" type="text/html" href="https://v3spec.msn.com/news/prop_irs_2.html" title="New IRS proposal">
        <media:thumbnail url="https://v3spec.msn.com/related_link_thumbnail2.jpg" />
      </atom:link>

    </item>
    <!-- END ARTICLE ITEM -->

  </channel>
</rss>

หมายเหตุ

  • ใช้สําหรับ media:content รูปภาพสไลด์แต่ละรูป
  • รวม guid, titleและ pubDate สําหรับสินค้าแต่ละรายการเสมอ
  • และ media:titlemedia:description ควรตรงกับสิ่งที่คุณจะแสดงในตัวแสดงสไลด์แบบเป็นภาพ
  • ตรวจสอบให้แน่ใจว่าได้ตัด Rich Text ใดๆ ใน<![CDATA[]]>
  • ใช้กับatom:linkmedia:thumbnailลิงก์บทความที่เกี่ยวข้อง

ฟีดเสียง RSS

ตัวอย่างฟีดเสียง RSS


<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
     xmlns:media="https://search.yahoo.com/mrss/"
     xmlns:mi="https://schemas.ingestion.microsoft.com/common/"
     xmlns:dc="https://purl.org/dc/elements/1.1/"
     xmlns:content="https://purl.org/rss/1.0/modules/content/"
     xmlns:dcterms="https://purl.org/dc/terms/"
     xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
  <channel>

    <!-- Channel Metadata -->
    <title>Feed title</title>
    <link>https://www.contoso.com/sports</link>
    <description>Feed description</description>
    <lastBuildDate>01 Oct 2017 13:00:00 GMT</lastBuildDate>

    <!-- Example 1: Audio using Media RSS -->
    <item>
      <guid isPermaLink="false">723435</guid>
      <title>Example audio using Media RSS</title>
      <pubDate>01 Oct 2018 13:00:00 GMT</pubDate>
      <dcterms:modified>2018-10-10T10:00:00+0100</dcterms:modified>
      <link>https://v3spec.msn.com/audioid=2836489202/</link>
      <dcterms:valid>start=2016-10-01T10:00:00+0100; end=2018-10-02T10:00:00+0100; scheme=W3C-DTF</dcterms:valid>
      <description>Audio description</description>

      <media:content url="https://contoso.com/audio/sample.mp3"
                     duration="512"
                     type="audio/mpeg"
                     medium="audio">
        <media:thumbnail url="https://v3spec.msn.com/image.jpg"
                         height="480"
                         width="853" />
        <media:title>Example audio using Media RSS</media:title>
        <media:description>Audio description</media:description>
        <media:credit>Joe Gargery/Fabrikam Videos</media:credit>
      </media:content>
    </item>

    <!-- Example 2: Audio using iTunes Namespace -->
    <item>
      <guid isPermaLink="false">723435</guid>
      <title>Example audio using iTunes namespace</title>
      <pubDate>01 Oct 2018 13:00:00 GMT</pubDate>
      <link>https://v3spec.msn.com/audioid=2836489202/</link>
      <dcterms:modified>2018-10-10T10:00:00+0100</dcterms:modified>
      <dcterms:valid>start=2016-10-01T10:00:00+0100; end=2018-10-02T10:00:00+0100; scheme=W3C-DTF</dcterms:valid>
      <description>Audio description</description>

      <itunes:title>Audio stream title</itunes:title>
      <itunes:author>Provider name</itunes:author>
      <itunes:subtitle>Audio stream subtitle</itunes:subtitle>
      <itunes:summary><![CDATA[audio stream description]]></itunes:summary>
      <itunes:duration>110</itunes:duration>

      <enclosure url="https://contoso.com/audio/sample.mp3"
                 type="audio/mpeg" />
    </item>

  </channel>
</rss>

บันทึกย่อสําคัญ

ส่วน คำอธิบาย
<media:content> ใช้สําหรับรูปแบบ Media RSS รองรับรูปขนาดย่อ เครดิต และเมตาดาต้า
<itunes:*> ใช้สําหรับฟีดสไตล์พ็อดแคสต์ รวมถึงผู้เขียน สรุป และระยะเวลา
<enclosure> จําเป็นสําหรับฟีด iTunes ชี้ไปยังสตรีม MP3 จริง
guid ต้องไม่ซ้ํากันต่อรายการ ห้ามนํากลับมาใช้ใหม่
pubDate จำเป็น ใช้รูปแบบ RFC 822 หรือ RFC 3339
dcterms:valid ตัวควบคุมการหมดอายุแบบกําหนดเอง (ไม่บังคับ)

ฟีดวิดีโอ RSS

ตัวอย่างฟีดวิดีโอ RSS


<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
     xmlns:atom="http://www.w3.org/2005/Atom"
     xmlns:media="http://search.yahoo.com/mrss/"
     xmlns:mi="http://schemas.ingestion.microsoft.com/common/"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:dcterms="http://purl.org/dc/terms/">

  <channel>

    <!-- Channel Metadata -->
    <title>Feed title</title>
    <link>https://www.contoso.com/sports</link>
    <description>Feed description</description>
    <lastBuildDate>01 Oct 2017 13:00:00 GMT</lastBuildDate>

    <!-- Video Item -->
    <item>

      <!-- Required Metadata -->
      <guid isPermaLink="false">723435</guid>
      <title>Video title</title>
      <pubDate>01 Oct 2017 13:00:00 GMT</pubDate>
      <dcterms:modified>2017-10-10T10:00:00+0100</dcterms:modified>
      <link>https://v3spec.msn.com/articleid=2836489202/</link>

      <!-- Author & Subtitle -->
      <dc:creator>Video author</dc:creator>
      <dcterms:alternative>Article subtitle</dcterms:alternative>

      <!-- Expiration Controls -->
      <dcterms:valid>
        start=2016-10-01T10:00:00+0100; 
        end=2018-10-02T10:00:00+0100; 
        scheme=W3C-DTF
      </dcterms:valid>
      <mi:expirationDate>2018-10-02T13:00:00.52Z</mi:expirationDate>

      <!-- Description & Metadata -->
      <description>Video description</description>
      <media:keywords>keyword1,keyword2,keyword3</media:keywords>
      <category>News</category>
      <category>Sports</category>

      <!-- Video Metadata -->
      <media:content
          url="https://v3spec.msn.com/video.mp4"
          duration="512"
          type="video/mp4"
          medium="video">

        <!-- Thumbnail -->
        <media:thumbnail 
            url="https://v3spec.msn.com/image.jpg"
            height="480"
            width="853" />

        <!-- Title & Description (Overrides) -->
        <media:title>Video title</media:title>
        <media:description>Video description</media:description>

        <!-- Attribution -->
        <media:credit>Joe Gargery/Fabrikam Videos</media:credit>

        <!-- Captions (TTML format) -->
        <media:subTitle 
            type="application/ttml"
            lang="en"
            href="https://www.contols.org/closedcaptions.ttml" />

      </media:content>

    </item>

  </channel>
</rss>

บันทึกย่อสําคัญ

ส่วน วัตถุประสงค์
<guid> ระบุรายการวิดีโอโดยไม่ซ้ํากัน
<media:content> ฝังเมตาดาต้าเกี่ยวกับไฟล์วิดีโอจริง (URL, ชนิด, ระยะเวลา ฯลฯ)
<media:subTitle> ชี้ไปยังไฟล์ TTML เพิ่มเติมสําหรับคําบรรยายทดแทนการได้ยิน
<media:title/description> แทนที่ชื่อเรื่อง/คําอธิบายระดับรายการเมื่อระบุ
<mi:expirationDate> ไม่บังคับสําหรับอายุการใช้งานรายการ 1 ปีเริ่มต้น
dcterms:valid นอกจากนี้ยังรองรับหน้าต่างความพร้อมใช้งานที่จํากัดเวลาด้วย

คําขอการ Takedown

ตัวอย่างคําขอ Takedown (รูปแบบรายการ RSS)


<!-- Example of a takedown request.
     You must provide a <guid> of an existing item,
     a modified date, and an expiration date in the past. -->

<item>

  <!-- REQUIRED: Unique identifier of the content to be removed.
       This ID must reference an already ingested document. -->
  <guid isPermaLink="false">477649</guid>

  <!-- REQUIRED: Use <dcterms:modified> to signal that this is a new update. -->
  <dcterms:modified>2017-10-10T10:00:00+0100</dcterms:modified>

  <!-- REQUIRED: Use <dcterms:valid> to specify an end date in the past.
       This will trigger the takedown of the associated content. -->
  <dcterms:valid>end=1990-10-02T10:00:00+0100; scheme=W3C-DTF</dcterms:valid>

</item>

หมายเหตุ

  • ต้อง <guid> ตรงกับรายการที่มีอยู่แล้วในประวัติการกลืนของคุณ
  • <dcterms:modified>จําเป็นต้องระบุองค์ประกอบนี้เพื่อลงทะเบียนเป็นการอัพเดต
  • องค์ประกอบ <dcterms:valid> ต้องมีวันที่สิ้นสุดในอดีตเพื่อเอารายการออกจากการมองเห็น