Commit 27d3d034 by ataki

Update variable names for video module

parent 5917ed06
......@@ -815,18 +815,18 @@ function (HTML5Video, Resizer) {
function updatePlayTime(time, skip_seek) {
var videoPlayer = this.videoPlayer,
duration = this.videoPlayer.duration(),
endTime = this.videoPlayer.duration(),
youTubeId;
if (this.config.endTime !== null) {
duration = Math.min(this.config.endTime, duration);
endTime = Math.min(this.config.endTime, endTime);
}
this.trigger(
'videoProgressSlider.updatePlayTime',
{
time: time,
duration: duration
duration: endTime
}
);
......@@ -834,7 +834,7 @@ function (HTML5Video, Resizer) {
'videoControl.updateVcrVidTime',
{
time: time,
duration: duration
duration: endTime
}
);
......
......@@ -296,10 +296,10 @@ function () {
}
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
duration = Math.min(duration, params.duration);
this.videoControl.vidTimeEl.html(Time.format(params.time) + ' / ' + Time.format(duration));
endTime = Math.min(endTime, params.duration);
this.videoControl.vidTimeEl.html(Time.format(params.time) + ' / ' + Time.format(endTime));
}
});
......
......@@ -164,10 +164,10 @@ function () {
function onSlide(event, ui) {
var time = ui.value,
duration = this.videoPlayer.duration();
endTime = this.videoPlayer.duration();
if (this.config.endTime !== null) {
duration = Math.min(this.config.endTime, duration);
endTime = Math.min(this.config.endTime, endTime);
}
this.videoProgressSlider.frozen = true;
......@@ -180,7 +180,7 @@ function () {
'videoControl.updateVcrVidTime',
{
time: time,
duration: duration
duration: endTime
}
);
......@@ -226,10 +226,10 @@ function () {
// params.duration could accidentally be construed as a floating
// point double. Since we're displaying this number, round down
// to nearest second
var duration = Math.floor(params.duration);
var endTime = Math.floor(params.duration);
if (this.config.endTime !== null) {
duration = Math.min(this.config.endTime, duration);
endTime = Math.min(this.config.endTime, endTime);
}
if (
......@@ -237,13 +237,13 @@ function () {
!this.videoProgressSlider.frozen
) {
this.videoProgressSlider.slider
.slider('option', 'max', duration)
.slider('option', 'max', endTime)
.slider('option', 'value', time);
}
// Update aria values.
this.videoProgressSlider.handle.attr({
'aria-valuemax': duration,
'aria-valuemax': endTime,
'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