Determine video codecs
This commit is contained in:
@@ -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>"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user