0xced / XCDYouTubeKit

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

Can't play official video #264

Closed ziopiero closed 8 years ago

ziopiero commented 8 years ago

Hi, I update to new 2.5.3 version, but I can't play some videos. Below the error:

NSLocalizedDescription = "This video contains content from VEVO. It is restricted from playback on certain sites. Watch on YouTube"; NSURL = "https://www.youtube.com/get_video_info?el=embedded&hl=en-US&ps=default&video_id=fk4BbF7B29w"

Probably the YouTube algorithm is changed again.

0xced commented 8 years ago

Can you please double-check that you are using version 2.5.3 ? This video is working fine for me.

screen shot video fk4BbF7B29w

ziopiero commented 8 years ago

I checked in my pod file, I use pod "XCDYouTubeKit", "~> 2.5"

I tried to clean my build file and run again.

I tried with some videos without success, please see below my log from Xcode: 2016-06-27 22:04:25.202 VideoBox[11460:1068971] [XCDYouTubeKit] JavaScript exception: ReferenceError: Can't find variable: g 2016-06-27 22:04:25.206 VideoBox[11460:1068971] [XCDYouTubeKit] JavaScript exception: TypeError: undefined is not an object 2016-06-27 22:04:25.207 VideoBox[11460:1068971] [XCDYouTubeKit] JavaScript exception: TypeError: undefined is not an object 2016-06-27 22:04:25.208 VideoBox[11460:1068971] [XCDYouTubeKit] JavaScript exception: TypeError: undefined is not an object 2016-06-27 22:04:25.208 VideoBox[11460:1068971] [XCDYouTubeKit] JavaScript exception: TypeError: undefined is not an object 2016-06-27 22:04:25.209 VideoBox[11460:1068971] [XCDYouTubeKit] JavaScript exception: TypeError: undefined is not an object 2016-06-27 22:04:25.210 VideoBox[11460:1068971] [XCDYouTubeKit] JavaScript exception: TypeError: undefined is not an object 2016-06-27 22:04:25.210 VideoBox[11460:1068971] [XCDYouTubeKit] JavaScript exception: TypeError: undefined is not an object 2016-06-27 22:04:25.211 VideoBox[11460:1068971] [XCDYouTubeKit] JavaScript exception: TypeError: undefined is not an object 2016-06-27 22:04:25.211 VideoBox[11460:1068971] [XCDYouTubeKit] JavaScript exception: TypeError: undefined is not an object 2016-06-27 22:04:25.212 VideoBox[11460:1068971] [XCDYouTubeKit] JavaScript exception: TypeError: undefined is not an object 2016-06-27 22:04:25.213 VideoBox[11460:1068971] [XCDYouTubeKit] JavaScript exception: TypeError: undefined is not an object 2016-06-27 22:04:25.213 VideoBox[11460:1068971] [XCDYouTubeKit] JavaScript exception: TypeError: undefined is not an object 2016-06-27 22:04:25.214 VideoBox[11460:1068971] [XCDYouTubeKit] JavaScript exception: TypeError: undefined is not an object 2016-06-27 22:04:25.214 VideoBox[11460:1068971] [XCDYouTubeKit] JavaScript exception: TypeError: undefined is not an object 2016-06-27 22:04:25.215 VideoBox[11460:1068971] [XCDYouTubeKit] JavaScript exception: TypeError: undefined is not an object 2016-06-27 22:04:25.215 VideoBox[11460:1068971] [XCDYouTubeKit] JavaScript exception: TypeError: undefined is not an object 2016-06-27 22:04:25.216 VideoBox[11460:1068971] [XCDYouTubeKit] JavaScript exception: TypeError: undefined is not an object 2016-06-27 22:04:25.217 VideoBox[11460:1068971] [XCDYouTubeKit] JavaScript exception: TypeError: undefined is not an object 2016-06-27 22:04:25.217 VideoBox[11460:1068971] [XCDYouTubeKit] JavaScript exception: TypeError: undefined is not an object 2016-06-27 22:04:25.218 VideoBox[11460:1068971] [XCDYouTubeKit] JavaScript exception: TypeError: undefined is not an object 2016-06-27 22:04:25.219 VideoBox[11460:1068971] [XCDYouTubeKit] JavaScript exception: TypeError: undefined is not an object 2016-06-27 22:04:25.220 VideoBox[11460:1068971] [XCDYouTubeKit] JavaScript exception: TypeError: undefined is not an object 2016-06-27 22:04:25.221 VideoBox[11460:1068971] [XCDYouTubeKit] Video operation finished with error: This video contains content from VEVO. It is restricted from playback on certain sites. Watch on YouTube Domain: XCDYouTubeVideoErrorDomain Code: 150 User Info: { AllowedCountries = "{(\n Hungary,\n Vietnam,\n \"New Caledonia\",\n Burundi,\n Andorra,\n \"Pitcairn Islands\",\n Guinea,\n \"Norfolk Island\",\n Togo,\n Eritrea,\n Zambia,\n China,\n Syria,\n Mongolia,\n Thailand,\n Netherlands,\n \"French Guiana\",\n India,\n Sudan,\n Nicaragua,\n Tanzania,\n Algeria,\n Grenada,\n Venezuela,\n \"Dominican Republic\",\n Turkey,\n \"New Zealand\",\n Serbia,\n Japan,\n Monaco,\n Finland,\n Paraguay,\n Lithuania,\n Suriname,\n Dominica,\n Mauritania,\n Armenia,\n Panama,\n \"St. Martin\",\n Guernsey,\n Cambodia,\n \"Western Sahara\",\n Azerbaijan,\n Gabon,\n Macedonia,\n Tonga,\n Bhutan,\n Lebanon,\n \"Svalbard & Jan Mayen\",\n \"Falkland Islands\",\n Montserrat,\n \"Cura\U00e7ao\",\n \"St. Helena\",\n Peru,\n \"Isle of Man\",\n \"Congo - Kinshasa\",\n Liberia,\n Oman,\n Ethiopia,\n Vanuatu,\n Romania,\n Nepal,\n Norway,\n Niger,\n \"South Sudan\",\n \"So. Georgia & So. Sandwich Isl.\",\n Turkmenistan,\n \"Hong Kong SAR China\",\n Germany,\n Aruba,\n Comoros,\n \"French Polynesia\",\n Belgium,\n Somalia,\n \"U.S. Outlying Islands\",\n \"American Samoa\",\n Albania,\n \"Sint Maarten\",\n \"Myanmar (Burma)\",\n Anguilla,\n Botswana,\n \"Faroe Islands\",\n \"Solomon Islands\",\n Cuba,\n Guyana,\n Nauru,\n \"North Korea\",\n \"El Salvador\",\n Honduras,\n Moldova,\n Taiwan,\n \"Equatorial Guinea\",\n Chile,\n Uzbekistan,\n Bermuda,\n \"British Indian Ocean Territory\",\n Liechtenstein,\n Argentina,\n Libya,\n Tajikistan,\n \"Costa Rica\",\n Canada,\n Italy,\n \"Congo - Brazzaville\",\n Guam,\n Qatar,\n Mexico,\n \"R\U00e9union\",\n Malaysia,\n Cameroon,\n Slovakia,\n \"Cayman Islands\",\n \"\U00c5land Islands\",\n Iran,\n Micronesia,\n \"San Marino\",\n Poland,\n Maldives,\n Cyprus,\n Israel,\n Uruguay,\n Palau,\n Belarus,\n Bangladesh,\n Nigeria,\n Russia,\n Gibraltar,\n \"Northern Mariana Islands\",\n Ireland,\n Croatia,\n \"Timor-Leste\",\n Brazil,\n Barbados,\n Colombia,\n \"Cook Islands\",\n Portugal,\n \"Christmas Island\",\n Bahamas,\n Pakistan,\n Bolivia,\n \"Heard & McDonald Islands\",\n Mali,\n Ghana,\n \"Antigua & Barbuda\",\n \"Sri Lanka\",\n Iraq,\n \"South Africa\",\n Kuwait,\n \"Puerto Rico\",\n Gambia,\n \"Cape Verde\",\n Latvia,\n Fiji,\n \"Palestinian Territories\",\n Martinique,\n \"St. Lucia\",\n Mayotte,\n Iceland,\n \"Czech Republic\",\n \"British Virgin Islands\",\n Switzerland,\n Singapore,\n \"Guinea-Bissau\",\n Austria,\n Namibia,\n Mauritius,\n Benin,\n \"Macau SAR China\",\n Tokelau,\n Afghanistan,\n \"St. Kitts & Nevis\",\n Swaziland,\n Bahrain,\n \"United States\",\n Chad,\n Brunei,\n Angola,\n \"Papua New Guinea\",\n \"United Arab Emirates\",\n Kazakhstan,\n Spain,\n Guatemala,\n \"Cocos (Keeling) Islands\",\n \"U.S. Virgin Islands\",\n Ukraine,\n \"French Southern Territories\",\n Philippines,\n \"S\U00e3o Tom\U00e9 & Pr\U00edncipe\",\n \"South Korea\",\n Djibouti,\n Jamaica,\n Slovenia,\n Samoa,\n Luxembourg,\n Tuvalu,\n Senegal,\n \"Wallis & Futuna\",\n Estonia,\n Seychelles,\n \"Saudi Arabia\",\n Morocco,\n Greece,\n Georgia,\n Kenya,\n Tunisia,\n Malta,\n \"St. Vincent & Grenadines\",\n \"Vatican City\",\n \"Marshall Islands\",\n Jersey,\n \"Turks & Caicos Islands\",\n \"St. Barth\U00e9lemy\",\n Laos,\n Ecuador,\n Yemen,\n Belize,\n Malawi,\n Antarctica,\n Sweden,\n Greenland,\n \"Bosnia & Herzegovina\",\n Jordan,\n Zimbabwe,\n \"Bouvet Island\",\n France,\n \"Trinidad & Tobago\",\n Mozambique,\n Egypt,\n \"United Kingdom\",\n Lesotho,\n Australia,\n Uganda,\n Kyrgyzstan,\n Denmark,\n \"Central African Republic\",\n \"Sierra Leone\",\n Montenegro,\n Kiribati,\n \"Burkina Faso\",\n Niue,\n Guadeloupe,\n Indonesia,\n Madagascar,\n \"C\U00f4te d\U2019Ivoire\",\n \"St. Pierre & Miquelon\",\n Rwanda,\n Haiti,\n Bulgaria,\n \"Caribbean Netherlands\"\n)}"; NSLocalizedDescription = "This video contains content from VEVO. It is restricted from playback on certain sites. Watch on YouTube"; NSURL = "https://www.youtube.com/get_video_info?el=embedded&hl=en-US&ps=default&video_id=fk4BbF7B29w"; }

0xced commented 8 years ago

Have you run the pod update command to actually update to version 2.5.3?

ziopiero commented 8 years ago

Yes, below the log:

pod update Update all pods Updating local specs repositories Analyzing dependencies Downloading dependencies Using Google-Mobile-Ads-SDK (7.8.1) Using SDWebImage (3.8.1) Using XCDYouTubeKit (2.5.3) Generating Pods project Integrating client project Sending stats Pod installation complete! There are 3 dependencies from the Podfile and 3 total pods installed.

ziopiero commented 8 years ago

Hi, I apologize, but after a deep investigation in my code I presume that it's my error. I tried to write a snippet of code only to load the video "fk4BbF7B29w" and your everything work fine, so the problem is in my old code not in your library. Thank you again for your attention and support.

0xced commented 8 years ago

Glad you solved it!

vickyg27 commented 7 years ago

Hi zippier.. Can you please tell me what is a issue in your code because i am getting same issue like above

ziopiero commented 7 years ago

Hi, in my case, after long investigation, I found that my Pods library was not updated. The 'pod update' command work fine, the new file has been downloaded from github, but the .a library is not re-created. So, the workaround for my case is simple: delete the libPods-(your app name).a inside the ../../build folder and re-comp[ile your app. I hope that this help you. Good luck.

vickyg27 commented 7 years ago

Hi ziopiero

Thanks for your help. i have done this think same as you tell and my issue has been resolved