2025-01-06 10:00:51 +01:00

20 lines
443 B
Swift

struct ContentPageVideo: HtmlProducer {
let filePath: String
let videoType: String
let options: [VideoCommand.Option]
func populate(_ result: inout String) {
result += "<video\(optionString)>Video not supported."
result += "<source src='\(filePath)' type='\(videoType)'>"
result += "</video>"
}
private var optionString: String {
options.map { " " + $0.rawValue }.joined()
}
}