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
6910ac95
Commit
6910ac95
authored
Nov 19, 2013
by
Valera Rozuvan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Addressing reviewer's comments.
Updated Change Log. BLD-488
parent
75285174
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
30 deletions
+29
-30
CHANGELOG.rst
+2
-0
common/lib/xmodule/xmodule/js/spec/video/video_player_spec.js
+24
-28
common/lib/xmodule/xmodule/js/src/video/06_video_progress_slider.js
+3
-2
No files found.
CHANGELOG.rst
View file @
6910ac95
...
...
@@ -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
the top. Include a label indicating the component affected.
Blades: a11y - Videos will alert screenreaders when the video is over.
LMS: Trap focus on the loading element when a user loads more threads
in the forum sidebar to improve accessibility.
...
...
common/lib/xmodule/xmodule/js/spec/video/video_player_spec.js
View file @
6910ac95
...
...
@@ -4,28 +4,23 @@
videoProgressSlider
,
videoSpeedControl
,
videoVolumeControl
,
oldOTBD
;
function
initialize
(
config
)
{
if
(
config
)
{
if
(
config
.
fixture
)
{
loadFixtures
(
config
.
fixture
);
}
else
{
loadFixtures
(
'video_all.html'
)
;
function
initialize
(
fixture
,
params
)
{
if
(
_
.
isString
(
fixture
)
)
{
loadFixtures
(
fixture
);
}
else
{
if
(
_
.
isObject
(
fixture
))
{
params
=
fixture
;
}
if
(
config
.
startTime
)
{
$
(
'#example'
)
.
find
(
'#video_id'
)
.
data
(
'start'
,
config
.
startTime
);
}
if
(
config
.
endTime
)
{
$
(
'#example'
)
.
find
(
'#video_id'
)
.
data
(
'end'
,
config
.
endTime
);
}
}
else
{
loadFixtures
(
'video_all.html'
);
}
if
(
_
.
isObject
(
params
))
{
$
(
'#example'
)
.
find
(
'#video_id'
)
.
data
(
params
);
}
state
=
new
Video
(
'#example'
);
state
.
videoEl
=
$
(
'video, iframe'
);
...
...
@@ -56,7 +51,7 @@
}
function
initializeYouTube
()
{
initialize
(
{
fixture
:
'video.html'
}
);
initialize
(
'video.html'
);
}
beforeEach
(
function
()
{
...
...
@@ -548,10 +543,10 @@
});
describe
(
'update with start & end time'
,
function
()
{
var
START_TIME
=
2
,
END_TIME
=
4
;
var
START_TIME
=
1
,
END_TIME
=
2
;
beforeEach
(
function
()
{
initialize
({
start
Time
:
START_TIME
,
endTime
:
END_TIME
});
initialize
({
start
:
START_TIME
,
end
:
END_TIME
});
spyOn
(
videoPlayer
,
'update'
).
andCallThrough
();
spyOn
(
videoPlayer
,
'pause'
).
andCallThrough
();
...
...
@@ -673,9 +668,12 @@
});
});
describe
(
'updatePlayTime with start & end times'
,
function
()
{
describe
(
'updatePlayTime when start & end times are defined'
,
function
()
{
var
START_TIME
=
1
,
END_TIME
=
2
;
beforeEach
(
function
()
{
initialize
({
start
Time
:
2
,
endTime
:
4
});
initialize
({
start
:
START_TIME
,
end
:
END_TIME
});
spyOn
(
videoPlayer
,
'updatePlayTime'
).
andCallThrough
();
spyOn
(
videoPlayer
.
player
,
'seekTo'
).
andCallThrough
();
...
...
@@ -699,16 +697,14 @@
},
'duration becomes available'
,
1000
);
runs
(
function
()
{
expect
(
videoPlayer
.
startTime
).
toBe
(
2
);
expect
(
videoPlayer
.
endTime
).
toBe
(
4
);
expect
(
videoPlayer
.
startTime
).
toBe
(
START_TIME
);
expect
(
videoPlayer
.
endTime
).
toBe
(
END_TIME
);
expect
(
videoPlayer
.
player
.
seekTo
).
toHaveBeenCalledWith
(
2
);
expect
(
videoPlayer
.
player
.
seekTo
).
toHaveBeenCalledWith
(
START_TIME
);
expect
(
videoProgressSlider
.
updateStartEndTimeRegion
)
.
toHaveBeenCalledWith
({
duration
:
duration
});
// videoProgressSlider.updateStartEndTimeRegion
expect
(
videoPlayer
.
seekToStartTimeOldSpeed
).
toBe
(
state
.
speed
);
});
});
...
...
@@ -716,7 +712,7 @@
describe
(
'updatePlayTime with invalid endTime'
,
function
()
{
beforeEach
(
function
()
{
initialize
({
end
Time
:
100000
});
initialize
({
end
:
100000
});
spyOn
(
videoPlayer
,
'updatePlayTime'
).
andCallThrough
();
});
...
...
common/lib/xmodule/xmodule/js/src/video/06_video_progress_slider.js
View file @
6910ac95
...
...
@@ -228,8 +228,9 @@ function () {
// onPlay(), and update() (update method handles endTime).
function
notifyThroughHandleEnd
(
params
)
{
if
(
params
.
end
)
{
this
.
videoProgressSlider
.
handle
.
attr
(
'title'
,
'video ended'
);
this
.
videoProgressSlider
.
handle
.
focus
();
this
.
videoProgressSlider
.
handle
.
attr
(
'title'
,
'video ended'
)
.
focus
();
}
else
{
this
.
videoProgressSlider
.
handle
.
attr
(
'title'
,
'video position'
);
}
...
...
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