15 lines
380 B
Swift
15 lines
380 B
Swift
|
|
struct PostVideo: HtmlProducer {
|
|
|
|
let videos: [FileResource]
|
|
|
|
func populate(_ result: inout String) {
|
|
result += "<video autoplay loop muted playsinline>"
|
|
result += "Video not supported."
|
|
for video in videos {
|
|
result += "<source src='\(video.absoluteUrl)' type='\(video.type.htmlType!)'>"
|
|
}
|
|
result += "</video>"
|
|
}
|
|
}
|