0xced / XCDYouTubeKit

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

many videos return an error #297

Closed Hamza-Almass closed 7 years ago

Hamza-Almass commented 7 years ago

please help i get this message from many videos on youtube

the error is:

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

please help

vdugnist commented 7 years ago

@Hamza-Almass looks like it works with my fix https://github.com/0xced/XCDYouTubeKit/pull/298 If it will take long time to merge you can put pod 'XCDYouTubeKit', :git => 'https://github.com/vdugnist/XCDYouTubeKit.git', :commit => '54e4bc9970862914a7692b7c779fee1d35fc9aea' in your Podfile.

appcornerit commented 7 years ago

@vdugnist thanks, it works, nice job!

ChristianDeckert commented 7 years ago

@vdugnist Thanks, everything's fine now! 👍

Hamza-Almass commented 7 years ago

it is not working i have problem it tell me unable to read module map contents from target support file? have you example on how can i add it ? thank you

Hamza-Almass commented 7 years ago

it's working my friend nice job thank you very much

Pranoy1c commented 7 years ago

@vdugnist It still doesn't work. I am getting error even after updating the podfile with your change:

[XCDYouTubeKit] Video operation finished with error: This video contains content from VEVO. It is restricted from playback on certain sites or applications. 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    Peru,\n    \"St. Helena\",\n    \"Isle of Man\",\n    \"Congo - Kinshasa\",\n    Liberia,\n    Oman,\n    Ethiopia,\n    Vanuatu,\n    Romania,\n    Nepal,\n    Norway,\n    Niger,\n    \"So. Georgia & So. Sandwich Isl.\",\n    Turkmenistan,\n    Germany,\n    Aruba,\n    Comoros,\n    \"French Polynesia\",\n    Belgium,\n    Somalia,\n    \"U.S. Outlying Islands\",\n    \"American Samoa\",\n    Albania,\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    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    \"Hong Kong (China)\",\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    \"Macau (China)\"\n)}";
    NSLocalizedDescription = "This video contains content from VEVO. It is restricted from playback on certain sites or applications. Watch on YouTube";
    NSURL = "https://www.youtube.com/get_video_info?el=embedded&hl=en&ps=default&video_id=y-JqH1M4Ya8";
}
2017-01-31 12:18:51.839551 Music tube[718:154457] Error from XCD when playing videoID: y-JqH1M4Ya8 

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

I just released version 2.5.4 which addresses this issue.