Commit f9fe00ff by Waheed Ahmed Committed by Awais Jibran

Fixed youtube video was not loading even youtube is available.

TNL-2361
parent 44bea2ea
...@@ -532,12 +532,9 @@ function (VideoPlayer, VideoStorage, i18n) { ...@@ -532,12 +532,9 @@ function (VideoPlayer, VideoStorage, i18n) {
this.youtubeXhr this.youtubeXhr
.always(function (json, status) { .always(function (json, status) {
var err = $.isPlainObject(json.error) || // It will work for both if statusCode is 200 or 410.
( var didSucceed = (json.error && json.error.code === 410) || status === 'success' || status === 'notmodified';
status !== 'success' && if (!didSucceed) {
status !== 'notmodified'
);
if (err) {
console.log( console.log(
'[Video info]: YouTube returned an error for ' + '[Video info]: YouTube returned an error for ' +
'video with id "' + id + '".' 'video with id "' + id + '".'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment