Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func fetchVideoURL() {
- Database.database().reference().child("programs").child(refWorkout).child("exercises").child("videoURL").observeSingleEvent(of: .value) { (snapshot) in
- self.url = snapshot.value as! String
- }
- let newURL = URL(string: url)
- let player = AVPlayer(url: newURL!)
- vc.player = player
- present(vc, animated: true) {
- self.vc.player?.play()
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement