react-native-video/ios/Video/DataStructures/Chapter.swift
Krzysztof Moch 800aee09de
chore: lint project (#3395)
* chore: format swift code
* chore: format clang code
* chore: format kotlin code
* refactor: rename folder "API" to "api"
2023-12-07 08:47:40 +01:00

25 lines
620 B
Swift

struct Chapter {
let title: String
let uri: String?
let startTime: Double
let endTime: Double
let json: NSDictionary?
init(_ json: NSDictionary!) {
guard json != nil else {
self.json = nil
self.title = ""
self.uri = nil
self.startTime = 0
self.endTime = 0
return
}
self.json = json
self.title = json["title"] as? String ?? ""
self.uri = json["uri"] as? String
self.startTime = json["startTime"] as? Double ?? 0
self.endTime = json["endTime"] as? Double ?? 0
}
}