CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.

Swiftyard 1.0.1

Swiftyard 1.0.1

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
 

Swiftyard 1.0.1

  • By
  • Carlos Corvaia and Thomas Morrison

Swiftyard: A Vidyard iOS SDK

CircleCI

Features

  • [x] Allows you to retrieve your players from Vidyard platform
  • [x] Create a new Player and upload it to Vidyard platform
  • [x] Delete a Player from Vidyard platform
  • [x] Customizable Video Player
  • [x] Ability to have send Analytics to Vidyard of people viewing your videos
  • [x] Use Vidyard’s Identity Management to initialize SDK
  • [x] Vidyard’s Identity Management Allows you to switch Vidyard Groups.
  • [x] Create a RTMP Livestream and Stream to Vidyard platform from your iOS device (Beta)
  • [ ] Complete Documentation (Coming soon)

Usage

Login via email / password

// 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)
  }
)

User api token

let swiftYard = Swiftyard.init(token: "abc123") // Retrieved from the Vidyard dashboard

Get List of Players

let players = [VidyardPlayer]
swiftYard?.getPlayers(page: 1, perPage: 20, order: "created_at", direction: "asc", query: "") { vidyardPlayers in
  players.append(vidyardPlayers)
  self.tableView.reloadData()
}

Offline Workflow

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()

Example

To run the example project, clone the repo, and run pod install from the Example directory you would like to run.

Requirements

Authors

Carlos Corvaia, [email protected]

Thomas Morrison, [email protected]

License

Swiftyard is available under the MIT license. See the LICENSE file for more info.