assets/scripts.js: Remember and restore playback position when reopening

Just like the real thing.
This commit is contained in:
Vladimir Panteleev 2019-07-28 05:38:41 +00:00
parent bc5a6bf2b9
commit 57166f7daa

View file

@ -306,6 +306,7 @@ function ontimeupdate(evt) {
hash = '#' + hash;
lastHash = hash; // suppress onhashchange event
location.hash = hash;
ls.place = hash;
}
}
@ -376,6 +377,8 @@ window.onload = function() {
file_selector.style.display = 'none';
if (window.location.hash)
playHash(window.location.hash);
else if (ls.place)
playHash(ls.place);
else
playSegment(null);
video_selector.play();