Swift-YouTube-Player
Swift-YouTube-Player copied to clipboard
NSURLConnection finished with error - code - 1002
Hello!,
I've trying to use this library in my application since I have a model UIViewController that use like an on boarding view, on this view I want to be able to put a youtube video, but I the video never loads...
I have this error:
NSURLConnection finished with error - code -1002
Error: Error Domain=NSURLErrorDomain Code=-1002 "URL incompatible" UserInfo={NSUnderlyingError=0x10a571df0 {Error Domain=kCFErrorDomainCFNetwork Code=-1002 "URL incompatible" UserInfo={NSErrorFailingURLStringKey=ytplayer://onYouTubeIframeAPIReady, NSLocalizedDescription=URL incompatible, NSErrorFailingURLKey=ytplayer://onYouTubeIframeAPIReady}}, NSErrorFailingURLStringKey=ytplayer://onYouTub2018-02-26 17:50:10.992113+0100 TEST App[644:495963] NSURLConnection finished with error - code -1002
This is the code on the ViewController that holds the video:
import UIKit
import YouTubePlayer
class YoutubePlayerOnBoardingViewController: UIViewController {
@IBOutlet weak var playerView: YouTubePlayerView!
override func viewDidLoad() {
super.viewDidLoad()
playerView.delegate = self
playerView.loadVideoID("ljbhiEuGKSI")
}
}
extension YoutubePlayerOnBoardingViewController: YouTubePlayerDelegate {
func playerReady(_ videoPlayer: YouTubePlayerView) {
playerView.play()
}
}
By the way the delegate is never called..
What am I doing wrong?
Thank you so much
Regards
same here i have a problem have you got solutions?
also getting this - error 1003
ok for me it was because outgoing connections was unchecked