Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. func fetchVideoURL() {
  2. Database.database().reference().child("programs").child(refWorkout).child("exercises").child("videoURL").observeSingleEvent(of: .value) { (snapshot) in
  3. self.url = snapshot.value as! String
  4.  
  5. }
  6.  
  7. let newURL = URL(string: url)
  8. let player = AVPlayer(url: newURL!)
  9. vc.player = player
  10. present(vc, animated: true) {
  11. self.vc.player?.play()
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement