forked from TheWidlarzGroup/react-native-video
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VEX-5682: iOS Swift Conversion (#11)
Converts ios implementation from objective-c to swift.
- Loading branch information
1 parent
3bcf2c6
commit 8b75438
Showing
34 changed files
with
2,659 additions
and
2,311 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,9 @@ project.xcworkspace | |
.gradle | ||
local.properties | ||
*.hprof | ||
.project | ||
.settings | ||
.classpath | ||
|
||
# node.js | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
struct DRMParams { | ||
let type: String? | ||
let licenseServer: String? | ||
let headers: Dictionary<String,Any>? | ||
let contentId: String? | ||
let certificateUrl: String? | ||
let base64Certificate: Bool? | ||
|
||
let json: NSDictionary? | ||
|
||
init(_ json: NSDictionary!) { | ||
guard json != nil else { | ||
self.json = nil | ||
self.type = nil | ||
self.licenseServer = nil | ||
self.contentId = nil | ||
self.certificateUrl = nil | ||
self.base64Certificate = nil | ||
self.headers = nil | ||
return | ||
} | ||
self.json = json | ||
self.type = json["type"] as? String | ||
self.licenseServer = json["licenseServer"] as? String | ||
self.contentId = json["contentId"] as? String | ||
self.certificateUrl = json["certificateUrl"] as? String | ||
self.base64Certificate = json["base64Certificate"] as? Bool | ||
self.headers = json["headers"] as? Dictionary<String,Any> | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
struct SelectedTrackCriteria { | ||
let type: String | ||
let value: Any? | ||
|
||
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"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
struct TextTrack { | ||
let type: String | ||
let language: String | ||
let title: String | ||
let uri: String | ||
|
||
let json: NSDictionary? | ||
|
||
init(_ json: NSDictionary!) { | ||
guard json != nil else { | ||
self.json = nil | ||
self.type = "" | ||
self.language = "" | ||
self.title = "" | ||
self.uri = "" | ||
return | ||
} | ||
self.json = json | ||
self.type = json["type"] as? String ?? "" | ||
self.language = json["language"] as? String ?? "" | ||
self.title = json["title"] as? String ?? "" | ||
self.uri = json["uri"] as? String ?? "" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
struct VideoSource { | ||
let type: String? | ||
let uri: String? | ||
let isNetwork: Bool | ||
let isAsset: Bool | ||
let shouldCache: Bool | ||
let requestHeaders: Dictionary<String,Any>? | ||
|
||
let json: NSDictionary? | ||
|
||
init(_ json: NSDictionary!) { | ||
guard json != nil else { | ||
self.json = nil | ||
self.type = nil | ||
self.uri = nil | ||
self.isNetwork = false | ||
self.isAsset = false | ||
self.shouldCache = false | ||
self.requestHeaders = nil | ||
return | ||
} | ||
self.json = json | ||
self.type = json["type"] as? String | ||
self.uri = json["uri"] as? String | ||
self.isNetwork = json["isNetwork"] as? Bool ?? false | ||
self.isAsset = json["isAsset"] as? Bool ?? false | ||
self.shouldCache = json["shouldCache"] as? Bool ?? false | ||
self.requestHeaders = json["requestHeaders"] as? Dictionary<String,Any> | ||
} | ||
} |
Oops, something went wrong.