From 6f431df9108bf087a574f3f2a8e56920b0c75d2f Mon Sep 17 00:00:00 2001 From: Valera Rozuvan Date: Wed, 7 Aug 2013 14:33:44 +0300 Subject: [PATCH] Fixed bug dealing with empty subtitles Url string. Now when subs parameter is empty or the YouTube IDs are not specified, captions will not try to fetch non-existent file. --- .../lib/xmodule/xmodule/js/src/videoalpha/09_video_caption.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/lib/xmodule/xmodule/js/src/videoalpha/09_video_caption.js b/common/lib/xmodule/xmodule/js/src/videoalpha/09_video_caption.js index 4210d927a2..b8bc432a1b 100644 --- a/common/lib/xmodule/xmodule/js/src/videoalpha/09_video_caption.js +++ b/common/lib/xmodule/xmodule/js/src/videoalpha/09_video_caption.js @@ -123,6 +123,10 @@ function () { this.videoCaption.hideCaptions(this.hide_captions); + if (!this.youtubeId('1.0')) { + return; + } + $.ajaxWithPrefix({ url: _this.videoCaption.captionURL(), notifyOnError: false,