Generate pages, image descriptions
This commit is contained in:
@ -0,0 +1,19 @@
|
||||
|
||||
struct ContentPageVideo: HtmlProducer {
|
||||
|
||||
let filePath: String
|
||||
|
||||
let videoType: String
|
||||
|
||||
let options: [VideoOption]
|
||||
|
||||
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()
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user