Add gifv support
https://hachyderm.io/@Impossible_PhD/111444541628207638
This commit is contained in:
parent
7fe118f303
commit
c92b063581
|
@ -427,6 +427,13 @@ static inline Element serialize_media(const Media& media) {
|
||||||
return video;
|
return video;
|
||||||
} else if (media.type == "audio") {
|
} else if (media.type == "audio") {
|
||||||
return Element("audio", {{"controls", ""}, {"src", media.url}}, {});
|
return Element("audio", {{"controls", ""}, {"src", media.url}}, {});
|
||||||
|
} else if (media.type == "gifv") {
|
||||||
|
// https://hachyderm.io/@Impossible_PhD/111444541628207638
|
||||||
|
Element video("video", {{"controls", ""}, {"loop", ""}, {"muted", ""}, {"autoplay", ""}, {"src", media.url}}, {});
|
||||||
|
if (media.preview_url) {
|
||||||
|
video.attributes.push_back({"poster", *media.preview_url});
|
||||||
|
}
|
||||||
|
return video;
|
||||||
} else if (media.type == "unknown" && media.remote_url) {
|
} else if (media.type == "unknown" && media.remote_url) {
|
||||||
if (media.remote_url) {
|
if (media.remote_url) {
|
||||||
// https://botsin.space/@lina@vt.social/111053598696451525
|
// https://botsin.space/@lina@vt.social/111053598696451525
|
||||||
|
|
Loading…
Reference in New Issue