react-native-video/ios/Video/DataStructures/SelectedTrackCriteria.swift

23 lines
539 B
Swift
Raw Permalink Normal View History

struct SelectedTrackCriteria {
let type: String
let value: String?
let json: NSDictionary?
init(_ json: NSDictionary!) {
guard json != nil else {
self.json = nil
self.type = ""
self.value = nil
return
}
self.json = json
self.type = json["type"] as? String ?? ""
self.value = json["value"] as? String
}
static func none() -> SelectedTrackCriteria {
return SelectedTrackCriteria(["type": "none", "value": ""])
}
}