Changed video source so that we have audio track included
This commit is contained in:
parent
2d8cbb8017
commit
0f06618c1f
@ -73,7 +73,7 @@ struct RedditLinkData: Codable {
|
|||||||
return "<img src=\"\(url)\">"
|
return "<img src=\"\(url)\">"
|
||||||
}
|
}
|
||||||
|
|
||||||
if isVideo ?? false, let videoURL = media?.video?.fallbackURL {
|
if isVideo ?? false, let videoURL = media?.video?.hlsURL {
|
||||||
var html = "<video "
|
var html = "<video "
|
||||||
if let previewImageURL = preview?.images?.first?.source?.url {
|
if let previewImageURL = preview?.images?.first?.source?.url {
|
||||||
html += "poster=\"\(previewImageURL)\" "
|
html += "poster=\"\(previewImageURL)\" "
|
||||||
|
@ -21,11 +21,13 @@ struct RedditMedia: Codable {
|
|||||||
struct RedditVideo: Codable {
|
struct RedditVideo: Codable {
|
||||||
|
|
||||||
let fallbackURL: String?
|
let fallbackURL: String?
|
||||||
|
let hlsURL: String?
|
||||||
let height: Int?
|
let height: Int?
|
||||||
let width: Int?
|
let width: Int?
|
||||||
|
|
||||||
enum CodingKeys: String, CodingKey {
|
enum CodingKeys: String, CodingKey {
|
||||||
case fallbackURL = "fallback_url"
|
case fallbackURL = "fallback_url"
|
||||||
|
case hlsURL = "hls_url"
|
||||||
case height = "height"
|
case height = "height"
|
||||||
case width = "width"
|
case width = "width"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user