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
27d3d034
Commit
27d3d034
authored
Mar 05, 2015
by
ataki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update variable names for video module
parent
5917ed06
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
14 deletions
+14
-14
common/lib/xmodule/xmodule/js/src/video/03_video_player.js
+4
-4
common/lib/xmodule/xmodule/js/src/video/04_video_control.js
+3
-3
common/lib/xmodule/xmodule/js/src/video/06_video_progress_slider.js
+7
-7
No files found.
common/lib/xmodule/xmodule/js/src/video/03_video_player.js
View file @
27d3d034
...
@@ -815,18 +815,18 @@ function (HTML5Video, Resizer) {
...
@@ -815,18 +815,18 @@ function (HTML5Video, Resizer) {
function
updatePlayTime
(
time
,
skip_seek
)
{
function
updatePlayTime
(
time
,
skip_seek
)
{
var
videoPlayer
=
this
.
videoPlayer
,
var
videoPlayer
=
this
.
videoPlayer
,
duration
=
this
.
videoPlayer
.
duration
(),
endTime
=
this
.
videoPlayer
.
duration
(),
youTubeId
;
youTubeId
;
if
(
this
.
config
.
endTime
!==
null
)
{
if
(
this
.
config
.
endTime
!==
null
)
{
duration
=
Math
.
min
(
this
.
config
.
endTime
,
duration
);
endTime
=
Math
.
min
(
this
.
config
.
endTime
,
endTime
);
}
}
this
.
trigger
(
this
.
trigger
(
'videoProgressSlider.updatePlayTime'
,
'videoProgressSlider.updatePlayTime'
,
{
{
time
:
time
,
time
:
time
,
duration
:
duration
duration
:
endTime
}
}
);
);
...
@@ -834,7 +834,7 @@ function (HTML5Video, Resizer) {
...
@@ -834,7 +834,7 @@ function (HTML5Video, Resizer) {
'videoControl.updateVcrVidTime'
,
'videoControl.updateVcrVidTime'
,
{
{
time
:
time
,
time
:
time
,
duration
:
duration
duration
:
endTime
}
}
);
);
...
...
common/lib/xmodule/xmodule/js/src/video/04_video_control.js
View file @
27d3d034
...
@@ -296,10 +296,10 @@ function () {
...
@@ -296,10 +296,10 @@ function () {
}
}
function
updateVcrVidTime
(
params
)
{
function
updateVcrVidTime
(
params
)
{
var
duration
=
(
this
.
config
.
endTime
!==
null
)
?
this
.
config
.
endTime
:
params
.
duration
;
var
endTime
=
(
this
.
config
.
endTime
!==
null
)
?
this
.
config
.
endTime
:
params
.
duration
;
// in case endTime is accidentally specified as being greater than the video
// in case endTime is accidentally specified as being greater than the video
duration
=
Math
.
min
(
duration
,
params
.
duration
);
endTime
=
Math
.
min
(
endTime
,
params
.
duration
);
this
.
videoControl
.
vidTimeEl
.
html
(
Time
.
format
(
params
.
time
)
+
' / '
+
Time
.
format
(
duration
));
this
.
videoControl
.
vidTimeEl
.
html
(
Time
.
format
(
params
.
time
)
+
' / '
+
Time
.
format
(
endTime
));
}
}
});
});
...
...
common/lib/xmodule/xmodule/js/src/video/06_video_progress_slider.js
View file @
27d3d034
...
@@ -164,10 +164,10 @@ function () {
...
@@ -164,10 +164,10 @@ function () {
function
onSlide
(
event
,
ui
)
{
function
onSlide
(
event
,
ui
)
{
var
time
=
ui
.
value
,
var
time
=
ui
.
value
,
duration
=
this
.
videoPlayer
.
duration
();
endTime
=
this
.
videoPlayer
.
duration
();
if
(
this
.
config
.
endTime
!==
null
)
{
if
(
this
.
config
.
endTime
!==
null
)
{
duration
=
Math
.
min
(
this
.
config
.
endTime
,
duration
);
endTime
=
Math
.
min
(
this
.
config
.
endTime
,
endTime
);
}
}
this
.
videoProgressSlider
.
frozen
=
true
;
this
.
videoProgressSlider
.
frozen
=
true
;
...
@@ -180,7 +180,7 @@ function () {
...
@@ -180,7 +180,7 @@ function () {
'videoControl.updateVcrVidTime'
,
'videoControl.updateVcrVidTime'
,
{
{
time
:
time
,
time
:
time
,
duration
:
duration
duration
:
endTime
}
}
);
);
...
@@ -226,10 +226,10 @@ function () {
...
@@ -226,10 +226,10 @@ function () {
// params.duration could accidentally be construed as a floating
// params.duration could accidentally be construed as a floating
// point double. Since we're displaying this number, round down
// point double. Since we're displaying this number, round down
// to nearest second
// to nearest second
var
duration
=
Math
.
floor
(
params
.
duration
);
var
endTime
=
Math
.
floor
(
params
.
duration
);
if
(
this
.
config
.
endTime
!==
null
)
{
if
(
this
.
config
.
endTime
!==
null
)
{
duration
=
Math
.
min
(
this
.
config
.
endTime
,
duration
);
endTime
=
Math
.
min
(
this
.
config
.
endTime
,
endTime
);
}
}
if
(
if
(
...
@@ -237,13 +237,13 @@ function () {
...
@@ -237,13 +237,13 @@ function () {
!
this
.
videoProgressSlider
.
frozen
!
this
.
videoProgressSlider
.
frozen
)
{
)
{
this
.
videoProgressSlider
.
slider
this
.
videoProgressSlider
.
slider
.
slider
(
'option'
,
'max'
,
duration
)
.
slider
(
'option'
,
'max'
,
endTime
)
.
slider
(
'option'
,
'value'
,
time
);
.
slider
(
'option'
,
'value'
,
time
);
}
}
// Update aria values.
// Update aria values.
this
.
videoProgressSlider
.
handle
.
attr
({
this
.
videoProgressSlider
.
handle
.
attr
({
'aria-valuemax'
:
duration
,
'aria-valuemax'
:
endTime
,
'aria-valuenow'
:
time
'aria-valuenow'
:
time
});
});
}
}
...
...
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