diff --git a/WebsiteGenerator/Files/MediaType.swift b/WebsiteGenerator/Files/MediaType.swift index c442341..ae306aa 100644 --- a/WebsiteGenerator/Files/MediaType.swift +++ b/WebsiteGenerator/Files/MediaType.swift @@ -8,19 +8,22 @@ private let supportedImageExtensions: [String : NSBitmapImageRep.FileType] = [ ] private let supportedVideoExtensions: Set = [ - "mp4", "mov" + "mp4", "mov", "m4v" ] enum MediaType { case image case video case file + case svg init(fileExtension: String) { if supportedImageExtensions[fileExtension] != nil { self = .image } else if supportedVideoExtensions.contains(fileExtension) { self = .video + } else if fileExtension == "svg" { + self = .svg } else { self = .file } diff --git a/WebsiteGenerator/Files/VideoType.swift b/WebsiteGenerator/Files/VideoType.swift index 849d79f..3a85664 100644 --- a/WebsiteGenerator/Files/VideoType.swift +++ b/WebsiteGenerator/Files/VideoType.swift @@ -2,11 +2,14 @@ import Foundation enum VideoType: String { case mp4 + case m4v var htmlType: String { switch self { case .mp4: return "video/mp4" + case .m4v: + return "video/mp4" } } }