Changed video source so that we have audio track included

This commit is contained in:
Maurice Parker 2020-05-06 21:40:20 -05:00
parent 2d8cbb8017
commit 0f06618c1f
2 changed files with 3 additions and 1 deletions

View File

@ -73,7 +73,7 @@ struct RedditLinkData: Codable {
return "<img src=\"\(url)\">"
}
if isVideo ?? false, let videoURL = media?.video?.fallbackURL {
if isVideo ?? false, let videoURL = media?.video?.hlsURL {
var html = "<video "
if let previewImageURL = preview?.images?.first?.source?.url {
html += "poster=\"\(previewImageURL)\" "

View File

@ -21,11 +21,13 @@ struct RedditMedia: Codable {
struct RedditVideo: Codable {
let fallbackURL: String?
let hlsURL: String?
let height: Int?
let width: Int?
enum CodingKeys: String, CodingKey {
case fallbackURL = "fallback_url"
case hlsURL = "hls_url"
case height = "height"
case width = "width"
}