CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.
TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Mar 2018 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by Carlos Corvaia.
Depends on: | |
Alamofire | >= 0 |
SwiftyJSON | >= 0 |
lf | >= 0 |
// Using Vidyard Identity Manager to get a Swiftyard instance
VidyardLoginManager.login(username: "[email protected]", password: "supersecretpassword",
completion: { (sessionCookie) in
// Use this object for all communication with vidyard assets
let swiftYard = Swiftyard.init(cookie: sessionCookie)
}, error: { (error) in
// Login failed, good idea to show an alert etc
let alertController = UIAlertController(title: "Login Failed", message: "Please check your email / password and try again", preferredStyle: UIAlertControllerStyle.alert)
alertController.addAction(UIAlertAction(title: "Okay", style: UIAlertActionStyle.default,handler: nil))
self.show(alertController, sender: self)
}
)
let swiftYard = Swiftyard.init(token: "abc123") // Retrieved from the Vidyard dashboard
let players = [VidyardPlayer]
swiftYard?.getPlayers(page: 1, perPage: 20, order: "created_at", direction: "asc", query: "") { vidyardPlayers in
players.append(vidyardPlayers)
self.tableView.reloadData()
}
Store a Player for offline Viewing
player.store {
print("Player has stored all videos and splash screens for offline use")
}
Get a list of offline Players
var offlinePlayers = [VidyardPlayer]()
swiftYard.getOfflinePlayers { (offlineVYPlayers) in
offlinePlayers = offlineVYPlayers
}
Sync viewing analytics that were captured while offline
swiftYard.syncAnalytics()
To run the example project, clone the repo, and run pod install
from the Example directory you would like to run.
Carlos Corvaia, [email protected]
Thomas Morrison, [email protected]
Swiftyard is available under the MIT license. See the LICENSE file for more info.