Commit 27d3d034 by ataki

Update variable names for video module

parent 5917ed06
...@@ -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
} }
); );
......
...@@ -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));
} }
}); });
......
...@@ -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
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment