summaryrefslogtreecommitdiffstats
path: root/templates/page.tmpl
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--templates/page.tmpl17
1 files changed, 17 insertions, 0 deletions
diff --git a/templates/page.tmpl b/templates/page.tmpl
index dd6ac641..7cf2eb50 100644
--- a/templates/page.tmpl
+++ b/templates/page.tmpl
@@ -391,6 +391,23 @@ transcriptDiv.appendChild(transcriptLink)
document.querySelectorAll('pre.chapters').forEach(displayChapters);
+ var video = document.querySelector('video.reload');
+if (video) {
+ var myVar = setInterval(reloadAsNeeded, 1000);
+ var oldTime = '';
+ function reloadAsNeeded() {
+ if ((video.paused != true && (video.currentTime - oldTime) == 0 && video.currentTime != 0)) {
+ var source = video.querySelector('source');
+ var oldVideo = source.src;
+ source.src = '';
+ source.src = oldVideo;
+ video.load();
+ video.play();
+ }
+ oldTime = video.currentTime;
+ };
+}
+
// @license-end
</script>
</body>