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
77c3233f
Commit
77c3233f
authored
10 years ago
by
Anton Stupak
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3824 from edx/anton/fix-transcript-on-ipad
Video: Fix transcript displaying on iPad.
parents
b6f933a1
2133ebd0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
12 deletions
+40
-12
CHANGELOG.rst
+2
-0
common/lib/xmodule/xmodule/js/spec/video/video_caption_spec.js
+35
-9
common/lib/xmodule/xmodule/js/src/video/09_video_caption.js
+3
-3
No files found.
CHANGELOG.rst
View file @
77c3233f
...
@@ -5,6 +5,8 @@ These are notable changes in edx-platform. This is a rolling list of changes,
...
@@ -5,6 +5,8 @@ These are notable changes in edx-platform. This is a rolling list of changes,
in roughly chronological order, most recent first. Add your entries at or near
in roughly chronological order, most recent first. Add your entries at or near
the top. Include a label indicating the component affected.
the top. Include a label indicating the component affected.
Blades: Fix displaying transcripts on touch devices. BLD-1033.
Blades: Tolerance expressed in percentage now computes correctly. BLD-522.
Blades: Tolerance expressed in percentage now computes correctly. BLD-522.
Studio: Support add, delete and duplicate on the container page. STUD-1490.
Studio: Support add, delete and duplicate on the container page. STUD-1490.
...
...
This diff is collapsed.
Click to expand it.
common/lib/xmodule/xmodule/js/spec/video/video_caption_spec.js
View file @
77c3233f
...
@@ -236,18 +236,18 @@
...
@@ -236,18 +236,18 @@
it
(
'render the caption'
,
function
()
{
it
(
'render the caption'
,
function
()
{
runs
(
function
()
{
runs
(
function
()
{
var
captionsData
;
var
captionsData
=
jasmine
.
stubbedCaption
,
items
=
$
(
'.subtitles li[data-index]'
);
captionsData
=
jasmine
.
stubbedCaption
;
_
.
each
(
captionsData
.
text
,
function
(
text
,
index
)
{
$
(
'.subtitles li[data-index]'
).
each
(
var
item
=
items
.
eq
(
index
);
function
(
index
,
link
)
{
expect
(
$
(
link
)
).
toHaveData
(
'index'
,
index
);
expect
(
item
).
toHaveData
(
'index'
,
index
);
expect
(
$
(
link
)
).
toHaveData
(
expect
(
item
).
toHaveData
(
'start'
,
captionsData
.
start
[
index
]
'start'
,
captionsData
.
start
[
index
]
);
);
expect
(
$
(
link
)
).
toHaveAttr
(
'tabindex'
,
0
);
expect
(
item
).
toHaveAttr
(
'tabindex'
,
0
);
expect
(
$
(
link
)).
toHaveText
(
captionsData
.
text
[
index
]
);
expect
(
item
).
toHaveText
(
text
);
});
});
});
});
});
});
...
@@ -324,13 +324,39 @@
...
@@ -324,13 +324,39 @@
$
.
fn
.
scrollTo
.
reset
();
$
.
fn
.
scrollTo
.
reset
();
});
});
it
(
'show expla
i
nation message'
,
function
()
{
it
(
'show explanation message'
,
function
()
{
expect
(
$
(
'.subtitles li'
)).
toHaveHtml
(
expect
(
$
(
'.subtitles li'
)).
toHaveHtml
(
'Caption will be displayed when you start playing '
+
'Caption will be displayed when you start playing '
+
'the video.'
'the video.'
);
);
});
});
it
(
'show captions on play'
,
function
()
{
runs
(
function
()
{
state
.
el
.
trigger
(
'play'
);
});
waitsFor
(
function
()
{
return
state
.
videoCaption
.
rendered
;
},
'Captions are not rendered'
,
WAIT_TIMEOUT
);
runs
(
function
()
{
var
captionsData
=
jasmine
.
stubbedCaption
,
items
=
$
(
'.subtitles li[data-index]'
);
_
.
each
(
captionsData
.
text
,
function
(
text
,
index
)
{
var
item
=
items
.
eq
(
index
);
expect
(
item
).
toHaveData
(
'index'
,
index
);
expect
(
item
).
toHaveData
(
'start'
,
captionsData
.
start
[
index
]
);
expect
(
item
).
toHaveAttr
(
'tabindex'
,
0
);
expect
(
item
).
toHaveText
(
text
);
});
});
});
it
(
'does not set rendered to true'
,
function
()
{
it
(
'does not set rendered to true'
,
function
()
{
expect
(
state
.
videoCaption
.
rendered
).
toBeFalsy
();
expect
(
state
.
videoCaption
.
rendered
).
toBeFalsy
();
});
});
...
...
This diff is collapsed.
Click to expand it.
common/lib/xmodule/xmodule/js/src/video/09_video_caption.js
View file @
77c3233f
...
@@ -119,10 +119,10 @@ function (Sjson, AsyncProcess) {
...
@@ -119,10 +119,10 @@ function (Sjson, AsyncProcess) {
'caption:update'
:
function
(
event
,
time
)
{
'caption:update'
:
function
(
event
,
time
)
{
self
.
updatePlayTime
(
time
);
self
.
updatePlayTime
(
time
);
},
},
'ended'
:
this
.
pause
,
'ended'
:
this
.
pause
.
bind
(
this
)
,
'fullscreen'
:
this
.
onResize
.
bind
(
this
),
'fullscreen'
:
this
.
onResize
.
bind
(
this
),
'pause'
:
this
.
pause
,
'pause'
:
this
.
pause
.
bind
(
this
)
,
'play'
:
this
.
play
,
'play'
:
this
.
play
.
bind
(
this
)
});
});
if
((
state
.
videoType
===
'html5'
)
&&
(
state
.
config
.
autohideHtml5
))
{
if
((
state
.
videoType
===
'html5'
)
&&
(
state
.
config
.
autohideHtml5
))
{
...
...
This diff is collapsed.
Click to expand it.
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