Allow videos in posts, simplify post image view
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
|
||||
struct PostVideo: HtmlProducer {
|
||||
|
||||
let videos: [FileResource]
|
||||
|
||||
func populate(_ result: inout String) {
|
||||
result += "<video autoplay loop muted>"
|
||||
result += "Video not supported."
|
||||
for video in videos {
|
||||
result += "<source src='\(video.absoluteUrl)' type='\(video.type.htmlType!)'>"
|
||||
}
|
||||
result += "</video>"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user