0xced / XCDYouTubeKit

YouTube video player for iOS, tvOS and macOS
MIT License
2.92k stars 627 forks source link

unsupported URL #318

Closed red010182 closed 7 years ago

red010182 commented 7 years ago

Nice work for this project! However, most youtube videos work, but some fail.

Failed to play videos: https://www.youtube.com/watch?v=JRMOMjCoR58 https://www.youtube.com/watch?v=--zku6TB5NY

ENV: iPhone 6, iOS 10 non-fullscreen everything default setting

I'm not sure if it's due to youtube ads, because both video get over 40 million watches and typically more popular video get higher possibilities to show ads.

Full error message:

[XCDYouTubeKit] Video operation finished with error: unsupported URL
Domain: XCDYouTubeVideoErrorDomain
Code:   -1
User Info: {
    NSLocalizedDescription = "unsupported URL";
    NSUnderlyingError = "Error Domain=NSURLErrorDomain Code=-1002 \"unsupported URL\" UserInfo={NSUnderlyingError=0x17025de80 {Error Domain=kCFErrorDomainCFNetwork Code=-1002 \"(null)\"}, NSErrorFailingURLStringKey=/yts/jsbin/player-en_US-vflOnuOF-/base.js, NSErrorFailingURLKey=/yts/jsbin/player-en_US-vflOnuOF-/base.js, NSLocalizedDescription=unsupported URL}";
}
Hamza-Almass commented 7 years ago

i also got the same message with the the operation couldn't be completed (XCDYoutubeVideoErrorDomain error -2) after yesterday updating please help

0xced commented 7 years ago

Please make sure to use the latest version of XCDYouTubeKit, i.e. version 2.5.5. If you ran pod update without updating the iOS platform to iOS 8 in your Podfile, XCDYouTubeKit will be stuck at version 2.5.3.

platform :ios, '8.0'