diff --git a/common/lib/xmodule/xmodule/js/src/video/01_initialize.js b/common/lib/xmodule/xmodule/js/src/video/01_initialize.js index bc9342c232..9a6300442f 100644 --- a/common/lib/xmodule/xmodule/js/src/video/01_initialize.js +++ b/common/lib/xmodule/xmodule/js/src/video/01_initialize.js @@ -296,7 +296,7 @@ function (VideoPlayer, i18n, moment) { .addClass('hidden'); state.el .find('.video-player .video-error') - .removeClass('hidden'); + .removeClass('is-hidden'); return false; } @@ -498,7 +498,7 @@ function (VideoPlayer, i18n, moment) { this.el.find('.video-player div') .removeClass('hidden'); this.el.find('.video-player .video-error') - .addClass('hidden'); + .addClass('is-hidden'); // If in reality the timeout was to short, try to // continue loading the YouTube video anyways. diff --git a/common/lib/xmodule/xmodule/js/src/video/02_html5_video.js b/common/lib/xmodule/xmodule/js/src/video/02_html5_video.js index 6862daf26a..4a6c6096b4 100644 --- a/common/lib/xmodule/xmodule/js/src/video/02_html5_video.js +++ b/common/lib/xmodule/xmodule/js/src/video/02_html5_video.js @@ -100,7 +100,7 @@ function () { .addClass('hidden') .end() .find('.video-player .video-error') - .removeClass('hidden') + .removeClass('is-hidden') .end() .addClass('is-initialized') .find('.spinner') @@ -123,9 +123,9 @@ function () { this.video.removeEventListener('pause', this.onPause, false); this.video.removeEventListener('ended', this.onEnded, false); this.el - .find('.video-player div').removeClass('hidden') + .find('.video-player div').removeClass('is-hidden') .end() - .find('.video-player .video-error').addClass('hidden') + .find('.video-player .video-error').addClass('is-hidden') .end().removeClass('is-initialized') .find('.spinner').attr({'aria-hidden': 'false'}); this.videoEl.remove(); diff --git a/common/test/acceptance/tests/video/test_studio_video_module.py b/common/test/acceptance/tests/video/test_studio_video_module.py index d38036e064..18a4d59f35 100644 --- a/common/test/acceptance/tests/video/test_studio_video_module.py +++ b/common/test/acceptance/tests/video/test_studio_video_module.py @@ -234,6 +234,7 @@ class CMSVideoTest(CMSVideoBaseTest): And first is private video When I reload the page Then video controls for all videos are visible + And the error message isn't shown """ self._create_course_unit(youtube_stub_config={'youtube_api_private_video': True}) self.video.create_video() @@ -248,6 +249,9 @@ class CMSVideoTest(CMSVideoBaseTest): self._navigate_to_course_unit_page() self.assertTrue(self.video.is_controls_visible()) + # verify that the error message isn't shown by default + self.assertFalse(self.video.is_error_message_shown) + def test_captions_shown_correctly(self): """ Scenario: Captions are shown correctly diff --git a/lms/templates/video.html b/lms/templates/video.html index 8e1efb9ea5..622b342839 100644 --- a/lms/templates/video.html +++ b/lms/templates/video.html @@ -23,7 +23,7 @@