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
04d27a83
Commit
04d27a83
authored
Jun 25, 2014
by
Anton Stupak
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2571 from Szczork/szczork/log-video-ended
log stop_video event
parents
08011284
77fc849c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
common/lib/xmodule/xmodule/js/spec/video/video_player_spec.js
+10
-0
common/lib/xmodule/xmodule/js/src/video/03_video_player.js
+6
-0
No files found.
common/lib/xmodule/xmodule/js/spec/video/video_player_spec.js
View file @
04d27a83
...
...
@@ -335,6 +335,7 @@ function (VideoPlayer) {
state
.
videoEl
=
$
(
'video, iframe'
);
spyOn
(
state
.
videoPlayer
,
'log'
).
andCallThrough
();
spyOn
(
state
.
videoControl
,
'pause'
).
andCallThrough
();
spyOn
(
$
.
fn
,
'trigger'
).
andCallThrough
();
...
...
@@ -350,6 +351,15 @@ function (VideoPlayer) {
it
(
'pause the video caption'
,
function
()
{
expect
(
$
.
fn
.
trigger
).
toHaveBeenCalledWith
(
'ended'
,
{});
});
it
(
'log stop_video event'
,
function
()
{
expect
(
state
.
videoPlayer
.
log
).
toHaveBeenCalledWith
(
'stop_video'
,
{
currentTime
:
state
.
videoPlayer
.
currentTime
}
);
});
});
});
...
...
common/lib/xmodule/xmodule/js/src/video/03_video_player.js
View file @
04d27a83
...
...
@@ -506,6 +506,12 @@ function (HTML5Video, Resizer) {
function
onEnded
()
{
var
time
=
this
.
videoPlayer
.
duration
();
this
.
videoPlayer
.
log
(
'stop_video'
,
{
currentTime
:
this
.
videoPlayer
.
currentTime
}
);
this
.
trigger
(
'videoControl.pause'
,
null
);
this
.
trigger
(
'videoProgressSlider.notifyThroughHandleEnd'
,
{
...
...
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