feat: implement startPosition (#3355)
* feat(android): implement startPosition * feat(ios): implement startPosition * feat: implement startPosition type * docs: fix typo * docs: update startPosition * refactor: put startPosition inside source prop - put startPosition inside source prop - rename existing prop (startTime, endTime) * docs: update startPosition property description * fix: fix invalid assignments * refactor: remove redundant optional chaining * feat: allow "0" to work too
This commit is contained in:
@@ -6,8 +6,9 @@ struct VideoSource {
|
||||
let isAsset: Bool
|
||||
let shouldCache: Bool
|
||||
let requestHeaders: Dictionary<String,Any>?
|
||||
let startTime: Int64?
|
||||
let endTime: Int64?
|
||||
let startPosition: Int64?
|
||||
let cropStart: Int64?
|
||||
let cropEnd: Int64?
|
||||
// Custom Metadata
|
||||
let title: String?
|
||||
let subtitle: String?
|
||||
@@ -25,8 +26,9 @@ struct VideoSource {
|
||||
self.isAsset = false
|
||||
self.shouldCache = false
|
||||
self.requestHeaders = nil
|
||||
self.startTime = nil
|
||||
self.endTime = nil
|
||||
self.startPosition = nil
|
||||
self.cropStart = nil
|
||||
self.cropEnd = nil
|
||||
self.title = nil
|
||||
self.subtitle = nil
|
||||
self.description = nil
|
||||
@@ -40,8 +42,9 @@ struct VideoSource {
|
||||
self.isAsset = json["isAsset"] as? Bool ?? false
|
||||
self.shouldCache = json["shouldCache"] as? Bool ?? false
|
||||
self.requestHeaders = json["requestHeaders"] as? Dictionary<String,Any>
|
||||
self.startTime = json["startTime"] as? Int64
|
||||
self.endTime = json["endTime"] as? Int64
|
||||
self.startPosition = json["startPosition"] as? Int64
|
||||
self.cropStart = json["cropStart"] as? Int64
|
||||
self.cropEnd = json["cropEnd"] as? Int64
|
||||
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