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
cfb9a54e
Commit
cfb9a54e
authored
Jun 11, 2013
by
Anton Stupak
Committed by
Vasyl Nakvasiuk
Jun 18, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for additional events
parent
78e22a91
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
2 deletions
+19
-2
common/lib/xmodule/xmodule/js/spec/videoalpha/display/video_caption_spec.coffee
+9
-0
common/lib/xmodule/xmodule/js/spec/videoalpha/display/video_player_spec.coffee
+10
-0
common/lib/xmodule/xmodule/js/src/videoalpha/display/video_player.coffee
+0
-2
No files found.
common/lib/xmodule/xmodule/js/spec/videoalpha/display/video_caption_spec.coffee
View file @
cfb9a54e
...
...
@@ -337,6 +337,7 @@ describe 'VideoCaptionAlpha', ->
describe
'toggle'
,
->
beforeEach
->
@
player
=
jasmine
.
stubVideoPlayerAlpha
@
spyOn
@
video
,
'log'
@
caption
=
@
player
.
caption
$
(
'.subtitles li[data-index=1]'
).
addClass
'current'
...
...
@@ -345,6 +346,10 @@ describe 'VideoCaptionAlpha', ->
@
caption
.
el
.
removeClass
'closed'
@
caption
.
toggle
jQuery
.
Event
(
'click'
)
it
'log the hide_transcript event'
,
->
expect
(
@
video
.
log
).
toHaveBeenCalledWith
'hide_transcript'
,
currentTime
:
@
player
.
currentTime
it
'hide the caption'
,
->
expect
(
@
caption
.
el
).
toHaveClass
'closed'
...
...
@@ -353,6 +358,10 @@ describe 'VideoCaptionAlpha', ->
@
caption
.
el
.
addClass
'closed'
@
caption
.
toggle
jQuery
.
Event
(
'click'
)
it
'log the show_transcript event'
,
->
expect
(
@
video
.
log
).
toHaveBeenCalledWith
'show_transcript'
,
currentTime
:
@
player
.
currentTime
it
'show the caption'
,
->
expect
(
@
caption
.
el
).
not
.
toHaveClass
'closed'
...
...
common/lib/xmodule/xmodule/js/spec/videoalpha/display/video_player_spec.coffee
View file @
cfb9a54e
...
...
@@ -432,9 +432,14 @@ describe 'VideoPlayerAlpha', ->
describe
'when the video player is not full screen'
,
->
beforeEach
->
spyOn
@
video
,
'log'
@
player
.
el
.
removeClass
'fullscreen'
@
player
.
toggleFullScreen
(
jQuery
.
Event
(
"click"
))
it
'log the fullscreen event'
,
->
expect
(
@
video
.
log
).
toHaveBeenCalledWith
'fullscreen'
,
currentTime
:
@
player
.
currentTime
it
'replace the full screen button tooltip'
,
->
expect
(
$
(
'.add-fullscreen'
)).
toHaveAttr
'title'
,
'Exit fill browser'
...
...
@@ -446,9 +451,14 @@ describe 'VideoPlayerAlpha', ->
describe
'when the video player already full screen'
,
->
beforeEach
->
spyOn
@
video
,
'log'
@
player
.
el
.
addClass
'fullscreen'
@
player
.
toggleFullScreen
(
jQuery
.
Event
(
"click"
))
it
'log the not_fullscreen event'
,
->
expect
(
@
video
.
log
).
toHaveBeenCalledWith
'not_fullscreen'
,
currentTime
:
@
player
.
currentTime
it
'replace the full screen button tooltip'
,
->
expect
(
$
(
'.add-fullscreen'
)).
toHaveAttr
'title'
,
'Fill browser'
...
...
common/lib/xmodule/xmodule/js/src/videoalpha/display/video_player.coffee
View file @
cfb9a54e
...
...
@@ -135,8 +135,6 @@ class @VideoPlayerAlpha extends SubviewAlpha
# NOTE: It is my strong belief that in the future YouTube Flash player will
# not get speed changes. This is a dying technology. So we can safely use
# this indirect method to determine player mode.
availableSpeeds
=
@
player
.
getAvailablePlaybackRates
()
prev_player_type
=
$
.
cookie
(
'prev_player_type'
)
if
availableSpeeds
.
length
>
1
...
...
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