mirror of
https://github.com/mehotkhan/BandersnatchInteractive.git
synced 2025-07-28 01:33:23 +00:00
assets/scripts.js: Remember and restore playback position when reopening
Just like the real thing.
This commit is contained in:
parent
bc5a6bf2b9
commit
57166f7daa
1 changed files with 3 additions and 0 deletions
|
@ -306,6 +306,7 @@ function ontimeupdate(evt) {
|
||||||
hash = '#' + hash;
|
hash = '#' + hash;
|
||||||
lastHash = hash; // suppress onhashchange event
|
lastHash = hash; // suppress onhashchange event
|
||||||
location.hash = hash;
|
location.hash = hash;
|
||||||
|
ls.place = hash;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -376,6 +377,8 @@ window.onload = function() {
|
||||||
file_selector.style.display = 'none';
|
file_selector.style.display = 'none';
|
||||||
if (window.location.hash)
|
if (window.location.hash)
|
||||||
playHash(window.location.hash);
|
playHash(window.location.hash);
|
||||||
|
else if (ls.place)
|
||||||
|
playHash(ls.place);
|
||||||
else
|
else
|
||||||
playSegment(null);
|
playSegment(null);
|
||||||
video_selector.play();
|
video_selector.play();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue