Fixed youtube video was not loading even youtube is available.
TNL-2361
This commit is contained in:
committed by
Awais Jibran
parent
44bea2eacb
commit
f9fe00ff6c
@@ -532,12 +532,9 @@ function (VideoPlayer, VideoStorage, i18n) {
|
||||
|
||||
this.youtubeXhr
|
||||
.always(function (json, status) {
|
||||
var err = $.isPlainObject(json.error) ||
|
||||
(
|
||||
status !== 'success' &&
|
||||
status !== 'notmodified'
|
||||
);
|
||||
if (err) {
|
||||
// It will work for both if statusCode is 200 or 410.
|
||||
var didSucceed = (json.error && json.error.code === 410) || status === 'success' || status === 'notmodified';
|
||||
if (!didSucceed) {
|
||||
console.log(
|
||||
'[Video info]: YouTube returned an error for ' +
|
||||
'video with id "' + id + '".'
|
||||
|
||||
Reference in New Issue
Block a user