Open fluffy-critter opened 5 years ago
Add an API, entry.media, which renders the HTML of an entry and extracts out the elements which could be considered media attachments in a feed context - img audio video.
entry.media
img
audio
video
Provide the attachments as a list of property bags, e.g.
[{ 'href':'http://example.com/foo/image123.jpg', 'content-type':'image/jpeg', 'attachment-type':'photo' },{ 'href':'http://example.com/bar/video.mp4', 'content-type':'video/mpeg-4', 'attachment-type':'video' }]
Semantic-type should be compatible with mf2 u-type specifiers (e.g. u-photo). This way we can support both Atom/RSS and mf2 feeds.
u-type
u-photo
The attachments function should be a CallableProxy that accepts the standard rendition args (max_width/max_height etc.).
attachments
max_width
max_height
Possibly support srcset although it's unclear if that would provide any real benefit in this context.
srcset
Provides better attachment support for rich feed readers that understand attachments.
Relevant IndieWeb Chat discussion
Changed to media instead of attachments, as attachments now exists but refers to something entirely different (attaching other entries).
media
Expected Behavior
Add an API,
entry.media
, which renders the HTML of an entry and extracts out the elements which could be considered media attachments in a feed context -img
audio
video
.Possible solution
Provide the attachments as a list of property bags, e.g.
Semantic-type should be compatible with mf2
u-type
specifiers (e.g.u-photo
). This way we can support both Atom/RSS and mf2 feeds.The
attachments
function should be a CallableProxy that accepts the standard rendition args (max_width
/max_height
etc.).Possibly support
srcset
although it's unclear if that would provide any real benefit in this context.Context
Provides better attachment support for rich feed readers that understand attachments.
Relevant IndieWeb Chat discussion