enclosure
(Atom)#✎[10] リンク関係 enclosure
(http://www.iana.org/assignments/relation/enclosure
)
は、href
属性値の IRI が、サイズが大きいかもしれず特別な扱いを要するかもしれない関連資源を識別することを表します
RFC 4287 4.2.7.2.。
enclosure
要素 (RSS)#✎[1] RSS の enclosure
要素は、
項目に添付されている媒体物体を表します
RSS 2.0。
仕様書:
[2] この要素には length
、
url
、
type
の3つの属性があり、いずれも必須です RSS 2.0, RSS Best Practices Profile。
[5] この要素の内容は空です RSS Best Practices Profile。
[6] この要素は item
要素内で高々1つ使うことができます。
それが元々の RSS 2.0 の意図でしたが、明記されていませんでした。
RSS Best Practices Profile
[7] Blogware, Movable Type, WordPress では1つの item
に enclosure
を複数含めることができます。
BottomFeeder, FeederReader, NewsGator, Safari
は複数の enclosure
に対応しています。RSS Best Practices Profile
[8] Bloglines, FeedDemon, Google Reader, Microsoft Internet Explorer 7
は複数の enclosure
に対応していません。
複数に対応していないと、最初のものだけで残りは無視されたり、
自動的にダウンロードされる場合には最初のものだけで残りは手動でダウンロードしなければならなかったりします。
RSS Best Practices Profile
<enclosure url="http://www.scripting.com/mp3s/weatherReportSuite.mp3" length="12216320" type="audio/mpeg" />
<enclosure length="24986239" type="audio/mpeg" url="http://dallas.example.com/joebob_050689.mp3" />
<enclosure url="http://jp.youtube.com/watch?v=iZ97gbsZWYg" type="" length="" />
[14] RFC 5988 - Web Linking ( ( 版)) http://tools.ietf.org/html/rfc5988#page-13
The <enclosure> tag has three attributes: URL, length, and type:
URL. The URL attribute points to your podcast content. The file extension specified within the URL attribute determines whether or note content appears in the podcast directory. Supported file formats include M4A, MP3, MOV, MP4, M4V, PDF, and EPUB.
Length. The length attribute is the file size in bytes. You can find this information in the properties of your podcast file (on a Mac, choose File > Get Info and refer to the size row).
Type. The type attribute provides the correct category for the type of file you are using. The type values for the supported file formats are: audio/x-m4a, audio/mpeg, video/quicktime, video/mp4, video/x-m4v, application/pdf, and document/x-epub.
<enclosure url="http://example.com/podcasts/everything/AllAboutEverythingEpisode2.mp3" length="5650889" type=“audio/mpeg"/>
<link>http://podcast.tbsradio.jp/tsutaya/files/20160314.mp3</link>
<guid>http://podcast.tbsradio.jp/tsutaya/files/20160314.mp3</guid>
<enclosure url="http://podcast.tbsradio.jp/tsutaya/files/20160314.mp3" type="audio/mpeg"/>
<link>http://automagic.fm/post/141135511895/magical-remix2</link>
<enclosure url="http://yhassy.heteml.jp/mp3/automagic161.5.mp3" length="4326236" type="audio/mpeg"/>
<enclosure url="http://podcast.joqr.co.jp/podcast_qr/ootake-opening/ootake-opening160316.mp3" length="15000576" type="audio/mpeg"/>
<enclosure url="http://www.nhk.or.jp/lesson/arabic/learn/mp3/47-ar-le_01.mp3" length="4801831" type="audio/mpeg"/>
<enclosure url="http://cpa.ds.npr.org/wunc/audio/2016/03/sot031816segA.mp3?origin=body" length="0" type="audio/mpeg"/>
The enclosure tag MUST have a type attribute set to "application/x-bittorrent" and MUST store the torrent link in a url attribute. It MAY have a length attribute, which should indicate the size of the .torrent file, in bytes.
Example:
<enclosure type="application/x-bittorrent" length="12216" url="http://featuredcontent.utorrent.com/torrents/WillisEarlBeal-BitTorrent.torrent"/>
<enclosure length="133" url="http://i.yimg.jp/images/icon/photo.gif" type="image/gif"></enclosure>
<enclosure url="http://omocoro.jp/assets/img/rss/no-image.png"/>
<enclosure url="https://s3.amazonaws.com/security-bytes-podcast/Mozilla+Security+Bytes+-+Episode+1+-+Content+Security+Policy.mp3" length="39916433" type="audio/mpeg" />
<enclosure url="http://www.dra.go.th/upload/cms_19/thumbnail_picture/img-1c628154a44069042e4b326df79fd38f.jpg" length="2246" type="image/jpeg" />
<enclosure url="" length="2246" type="image/jpeg" />
[27] https://sizu.me/catnose/rss, https://sizu.me/catnose/rss
<enclosure length="0" type="image/png" url="https://static.sizu.me/api/og-image/f63fc416e7df?avatarUrl=https%3A%2F%2Fr2.sizu.me%2Fusers%2F1%2Favatar.png%3Fv%3D1700028666631&theme=user&username=catnose"/>
[28]
>>27 og:image
の代用に使われている感あるが、それは RSS 仕様が想定した使い方なんだろうか。
[29] フィードリーダーでそれっぽい画像が表示されるのを期待して指定しているのかも。 本来の RSS 仕様の想定とは違う気が。
Google search: http://www.iana.org/assignments/relation/enclosure
三
item
の節で MUST、enclosure
の項で SHOULD としており、矛盾しています。