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
fb2f4fda
Commit
fb2f4fda
authored
Jun 09, 2015
by
Waheed Ahmed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed two paly_video events emitted on video replay.
TNL-2166
parent
698f6fb2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
common/lib/xmodule/xmodule/js/spec/video/html5_video_spec.js
+4
-4
common/lib/xmodule/xmodule/js/src/video/02_html5_video.js
+2
-4
No files found.
common/lib/xmodule/xmodule/js/spec/video/html5_video_spec.js
View file @
fb2f4fda
...
...
@@ -51,14 +51,14 @@
});
});
it
(
'callback was called'
,
function
()
{
it
(
'callback was
not
called'
,
function
()
{
waitsFor
(
function
()
{
return
state
.
videoPlayer
.
player
.
getPlayerState
()
!==
STATUS
.
PAUSED
;
},
'Player state should be changed'
,
WAIT_TIMEOUT
);
runs
(
function
()
{
expect
(
state
.
videoPlayer
.
player
.
callStateChangeCallback
)
.
toHaveBeenCalled
();
.
not
.
toHaveBeenCalled
();
});
});
});
...
...
@@ -85,14 +85,14 @@
});
});
it
(
'callback was called'
,
function
()
{
it
(
'callback was
not
called'
,
function
()
{
waitsFor
(
function
()
{
return
state
.
videoPlayer
.
player
.
getPlayerState
()
!==
STATUS
.
PLAYING
;
},
'Player state should be changed'
,
WAIT_TIMEOUT
);
runs
(
function
()
{
expect
(
state
.
videoPlayer
.
player
.
callStateChangeCallback
)
.
toHaveBeenCalled
();
.
not
.
toHaveBeenCalled
();
});
});
});
...
...
common/lib/xmodule/xmodule/js/src/video/02_html5_video.js
View file @
fb2f4fda
...
...
@@ -290,13 +290,11 @@ function () {
var
PlayerState
=
HTML5Video
.
PlayerState
;
if
(
_this
.
playerState
===
PlayerState
.
PLAYING
)
{
_this
.
pauseVideo
();
_this
.
playerState
=
PlayerState
.
PAUSED
;
_this
.
callStateChangeCallback
();
_this
.
pauseVideo
();
}
else
{
_this
.
playVideo
();
_this
.
playerState
=
PlayerState
.
PLAYING
;
_this
.
callStateChangeCallback
();
_this
.
playVideo
();
}
});
...
...
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