https://www.youtube.com/watch?v=etoGsO7gIZs
trying to run videos but video is not playing. actually i am successfully fetch code from url and seting itlike this and try to play but nothing happen. even error is not showing.
override func viewDidLoad() {
super.viewDidLoad()
playerView.delegate = self
activityInd.hidesWhenStopped = true
}
override func viewWillAppear(_ animated: Bool) {
let playerVars: [String: Any] = [
"controls": 0,
"modestbranding": 0,
"playsinline": 0,
"rel": 0,
"showinfo": 0,
"autoplay": 1,
"origin": "https://youtube.com"
]
let shortUrl = extractYoutubeId(from: youtubeVideoLink)
playerView.loadWithVideoId(shortUrl ?? "", with: playerVars)
activityInd.startAnimating()
NotificationCenter.default.addObserver(self, selector: #selector(videoExitFullScreen), name: UIWindow.didResignKeyNotification, object: view.window)
}
even these method is not called but sometime it is called
func playerViewDidBecomeReady
https://www.youtube.com/watch?v=etoGsO7gIZs
trying to run videos but video is not playing. actually i am successfully fetch code from url and seting itlike this and try to play but nothing happen. even error is not showing.
override func viewDidLoad() {
super.viewDidLoad()
override func viewWillAppear(_ animated: Bool) {
let playerVars: [String: Any] = [
"controls": 0,
"modestbranding": 0,
"playsinline": 0,
"rel": 0,
"showinfo": 0,
"autoplay": 1,
"origin": "https://youtube.com"
]
even these method is not called but sometime it is called
func playerViewDidBecomeReady