fix(ios): fix startPosition, cropStart and cropEnd to handle float values correctly (#3589)
* refactor(ios): refactor setPlaybackRange function * fix(ios): fix props to handle float values correctly - fix startPosition, cropStart, cropEnd * refactor(ios): apply lint
This commit is contained in:
@@ -5,7 +5,7 @@ struct VideoSource {
|
||||
let isAsset: Bool
|
||||
let shouldCache: Bool
|
||||
let requestHeaders: [String: Any]?
|
||||
let startPosition: Int64?
|
||||
let startPosition: Float64?
|
||||
let cropStart: Int64?
|
||||
let cropEnd: Int64?
|
||||
// Custom Metadata
|
||||
@@ -51,9 +51,9 @@ struct VideoSource {
|
||||
} else {
|
||||
self.requestHeaders = nil
|
||||
}
|
||||
self.startPosition = json["startPosition"] as? Int64
|
||||
self.cropStart = json["cropStart"] as? Int64
|
||||
self.cropEnd = json["cropEnd"] as? Int64
|
||||
self.startPosition = json["startPosition"] as? Float64
|
||||
self.cropStart = (json["cropStart"] as? Float64).flatMap { Int64(round($0)) }
|
||||
self.cropEnd = (json["cropEnd"] as? Float64).flatMap { Int64(round($0)) }
|
||||
self.title = json["title"] as? String
|
||||
self.subtitle = json["subtitle"] as? String
|
||||
self.description = json["description"] as? String
|
||||
|
Reference in New Issue
Block a user