84a27f3d9f
* fix: refactor side loaded text tracks management More textTracks in source. android/ios: ensure text tracks are not selected by default android/ios make textTrack field not nullable clean up doc check compatibility with the old api Add comments on deprecated JS apis Apply API change on basic sample * chore: fix linter * fix(ios): fix build with caching & remove warnings
23 lines
539 B
Swift
23 lines
539 B
Swift
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": ""])
|
|
}
|
|
}
|