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
c29b43d5
Commit
c29b43d5
authored
Jun 13, 2012
by
Prem Sichanugrist
Committed by
Matthew Mongeau
Jul 05, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add video volume control to video player
parent
e2613a35
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
6 deletions
+23
-6
lms/static/coffee/spec/modules/video/video_player_spec.coffee
+14
-0
lms/static/coffee/src/modules/video/video_player.coffee
+6
-0
lms/static/sass_old/courseware/_video.scss
+3
-6
No files found.
lms/static/coffee/spec/modules/video/video_player_spec.coffee
View file @
c29b43d5
...
@@ -433,3 +433,17 @@ describe 'VideoPlayer', ->
...
@@ -433,3 +433,17 @@ describe 'VideoPlayer', ->
it
'delegate to the video'
,
->
it
'delegate to the video'
,
->
expect
(
@
player
.
currentSpeed
()).
toEqual
'3.0'
expect
(
@
player
.
currentSpeed
()).
toEqual
'3.0'
describe
'volume'
,
->
beforeEach
->
@
player
=
new
VideoPlayer
@
video
@
player
.
player
.
getVolume
.
andReturn
42
describe
'without value'
,
->
it
'return current volume'
,
->
expect
(
@
player
.
volume
()).
toEqual
42
describe
'with value'
,
->
it
'set player volume'
,
->
@
player
.
volume
(
60
)
expect
(
@
player
.
player
.
setVolume
).
toHaveBeenCalledWith
(
60
)
lms/static/coffee/src/modules/video/video_player.coffee
View file @
c29b43d5
...
@@ -150,3 +150,9 @@ class @VideoPlayer extends Subview
...
@@ -150,3 +150,9 @@ class @VideoPlayer extends Subview
currentSpeed
:
->
currentSpeed
:
->
@
video
.
speed
@
video
.
speed
volume
:
(
value
)
->
if
value
!=
undefined
@
player
.
setVolume
value
else
@
player
.
getVolume
()
lms/static/sass_old/courseware/_video.scss
View file @
c29b43d5
...
@@ -334,9 +334,9 @@ section.course-content {
...
@@ -334,9 +334,9 @@ section.course-content {
display
:
none
;
display
:
none
;
opacity
:
0
;
opacity
:
0
;
position
:
absolute
;
position
:
absolute
;
width
:
4
5px
;
width
:
3
5px
;
height
:
125px
;
height
:
125px
;
margin-left
:
-1
px
;
margin-left
:
5
px
;
z-index
:
10
;
z-index
:
10
;
.volume-slider
{
.volume-slider
{
...
@@ -344,9 +344,6 @@ section.course-content {
...
@@ -344,9 +344,6 @@ section.course-content {
border
:
0
;
border
:
0
;
width
:
5px
;
width
:
5px
;
margin
:
14px
auto
;
margin
:
14px
auto
;
background
:
#666
;
border
:
1px
solid
#000
;
@include
box-shadow
(
0
1px
0
#333
);
a
.ui-slider-handle
{
a
.ui-slider-handle
{
background
:
$mit-red
url(../images/slider-handle.png)
center
center
no-repeat
;
background
:
$mit-red
url(../images/slider-handle.png)
center
center
no-repeat
;
...
@@ -362,7 +359,7 @@ section.course-content {
...
@@ -362,7 +359,7 @@ section.course-content {
}
}
.ui-slider-range
{
.ui-slider-range
{
background
:
#
ddd
;
background
:
#
666
;
}
}
}
}
}
}
...
...
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