2022-05-19 07:29:25 -06:00
|
|
|
|
|
|
|
struct VideoSource {
|
|
|
|
let type: String?
|
|
|
|
let uri: String?
|
|
|
|
let isNetwork: Bool
|
|
|
|
let isAsset: Bool
|
|
|
|
let shouldCache: Bool
|
|
|
|
let requestHeaders: Dictionary<String,Any>?
|
2023-11-24 04:52:46 -07:00
|
|
|
let startPosition: Int64?
|
|
|
|
let cropStart: Int64?
|
|
|
|
let cropEnd: Int64?
|
2023-08-12 16:01:27 -06:00
|
|
|
// Custom Metadata
|
|
|
|
let title: String?
|
|
|
|
let subtitle: String?
|
|
|
|
let description: String?
|
2023-10-07 07:14:10 -06:00
|
|
|
let customImageUri: String?
|
2022-05-19 07:29:25 -06:00
|
|
|
|
|
|
|
let json: NSDictionary?
|
|
|
|
|
|
|
|
init(_ json: NSDictionary!) {
|
|
|
|
guard json != nil else {
|
|
|
|
self.json = nil
|
|
|
|
self.type = nil
|
|
|
|
self.uri = nil
|
|
|
|
self.isNetwork = false
|
|
|
|
self.isAsset = false
|
|
|
|
self.shouldCache = false
|
|
|
|
self.requestHeaders = nil
|
2023-11-24 04:52:46 -07:00
|
|
|
self.startPosition = nil
|
|
|
|
self.cropStart = nil
|
|
|
|
self.cropEnd = nil
|
2023-08-12 16:01:27 -06:00
|
|
|
self.title = nil
|
|
|
|
self.subtitle = nil
|
|
|
|
self.description = nil
|
2023-10-07 07:14:10 -06:00
|
|
|
self.customImageUri = nil
|
2022-05-19 07:29:25 -06:00
|
|
|
return
|
|
|
|
}
|
|
|
|
self.json = json
|
|
|
|
self.type = json["type"] as? String
|
|
|
|
self.uri = json["uri"] as? String
|
|
|
|
self.isNetwork = json["isNetwork"] as? Bool ?? false
|
|
|
|
self.isAsset = json["isAsset"] as? Bool ?? false
|
|
|
|
self.shouldCache = json["shouldCache"] as? Bool ?? false
|
|
|
|
self.requestHeaders = json["requestHeaders"] as? Dictionary<String,Any>
|
2023-11-24 04:52:46 -07:00
|
|
|
self.startPosition = json["startPosition"] as? Int64
|
|
|
|
self.cropStart = json["cropStart"] as? Int64
|
|
|
|
self.cropEnd = json["cropEnd"] as? Int64
|
2023-08-12 16:01:27 -06:00
|
|
|
self.title = json["title"] as? String
|
|
|
|
self.subtitle = json["subtitle"] as? String
|
|
|
|
self.description = json["description"] as? String
|
2023-10-07 07:14:10 -06:00
|
|
|
self.customImageUri = json["customImageUri"] as? String
|
2022-05-19 07:29:25 -06:00
|
|
|
}
|
|
|
|
}
|