Validate when using slider
All checks were successful
Publish to burnedkirby.com/subtitle / publish-site (push) Successful in 1s
All checks were successful
Publish to burnedkirby.com/subtitle / publish-site (push) Successful in 1s
This commit is contained in:
parent
5330854ba2
commit
66773d92bd
1 changed files with 10 additions and 6 deletions
|
@ -285,12 +285,16 @@
|
||||||
} else if (value >= subtitles_array.length) {
|
} else if (value >= subtitles_array.length) {
|
||||||
value = subtitles_array.length - 1;
|
value = subtitles_array.length - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only when value is valid.
|
||||||
|
if (value >= 0 && value < subtitles_array.length) {
|
||||||
current_subtitle = value;
|
current_subtitle = value;
|
||||||
time_info.set_time_offset(
|
time_info.set_time_offset(
|
||||||
subtitles_array[current_subtitle].time_start * 1000.0
|
subtitles_array[current_subtitle].time_start * 1000.0
|
||||||
);
|
);
|
||||||
display_subtitle();
|
display_subtitle();
|
||||||
set_up_play_anim();
|
set_up_play_anim();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
document.getElementById("left_button").addEventListener(
|
document.getElementById("left_button").addEventListener(
|
||||||
|
|
Loading…
Reference in a new issue