mirror of
https://github.com/mehotkhan/BandersnatchInteractive.git
synced 2025-07-27 17:23:22 +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;
|
||||
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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue