Swift-YouTube-Player icon indicating copy to clipboard operation
Swift-YouTube-Player copied to clipboard

NSURLConnection finished with error - code - 1002

Open josmanperez opened this issue 6 years ago • 3 comments

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

josmanperez avatar Feb 26 '18 16:02 josmanperez

same here i have a problem have you got solutions?

kalpeshjethva18 avatar Nov 05 '18 10:11 kalpeshjethva18

also getting this - error 1003

gitCommitLit avatar Nov 06 '18 13:11 gitCommitLit

ok for me it was because outgoing connections was unchecked

gitCommitLit avatar Nov 06 '18 16:11 gitCommitLit