Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
9242d97b
Commit
9242d97b
authored
Mar 16, 2016
by
Diana Huang
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11817 from edx/diana/hide-video-error
Use is-hidden instead of hidden for video errors.
parents
b91f940a
091dc27c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
6 deletions
+10
-6
common/lib/xmodule/xmodule/js/src/video/01_initialize.js
+2
-2
common/lib/xmodule/xmodule/js/src/video/02_html5_video.js
+3
-3
common/test/acceptance/tests/video/test_studio_video_module.py
+4
-0
lms/templates/video.html
+1
-1
No files found.
common/lib/xmodule/xmodule/js/src/video/01_initialize.js
View file @
9242d97b
...
...
@@ -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.
...
...
common/lib/xmodule/xmodule/js/src/video/02_html5_video.js
View file @
9242d97b
...
...
@@ -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
();
...
...
common/test/acceptance/tests/video/test_studio_video_module.py
View file @
9242d97b
...
...
@@ -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
...
...
lms/templates/video.html
View file @
9242d97b
...
...
@@ -23,7 +23,7 @@
<div
class=
"video-player-pre"
></div>
<section
class=
"video-player"
>
<div
id=
"${id}"
></div>
<h4
class=
"hd hd-4 video-error hidden"
>
${_('No playable video sources found.')}
</h4>
<h4
class=
"hd hd-4 video-error
is-
hidden"
>
${_('No playable video sources found.')}
</h4>
</section>
<div
class=
"video-player-post"
></div>
<div
class=
"closed-captions"
></div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment