Determine video codecs

This commit is contained in:
Christoph Hagen
2025-08-31 18:04:00 +02:00
parent 96bd07bdb7
commit 9848de02cb
9 changed files with 93 additions and 17 deletions

View File

@@ -1,13 +1,18 @@
struct PostVideo: HtmlProducer {
let videos: [FileResource]
struct Video {
let path: String
let type: String
}
let videos: [Video]
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 += "<source src='\(video.path)' type='\(video.type)'>"
}
result += "</video>"
}