Skip to content

Commit

Permalink
Fix watchdog, add link to deployed website
Browse files Browse the repository at this point in the history
  • Loading branch information
MrApplejuice committed Sep 16, 2023
1 parent 9adfa28 commit 5916c43
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ Refer to the [IMAGE-ATTRIBUTIONS.md](IMAGE-ATTRIBUTIONS.md) for details.

## Web version

...
You can try out the web version here: [https://memprize.craftware.info/](https://memprize.craftware.info/)

![Example of the web version](doc/webversion.png)

## The original Psychopy version

Expand Down
Binary file added doc/webversion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@
py_main.main();
});
</script>
<div id="main" style="display: flex; justify-content: center;"></div>
<div id="page" style="display: flex; justify-content: center;">
<div id="main"></div>
</div>
</body>
</html>
12 changes: 5 additions & 7 deletions web/pixi_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,17 +141,15 @@ def _instvid__start_clicked(self):

# When playback start is delayed a _lot_ we might still need to clean things
# up because someone clicked "skip" before playback even started

def watchdog_cleanup():
if self._instvid__video_sprite is None:
window.clearInterval(interval_id)
video_source.pause()
if video_source.readyState > 2:
if self._instvid__video_sprite is None:
window.clearInterval(interval_id)
video_source.pause()

interval_id = window.setInterval(watchdog_cleanup, 100)

video_source.addEventListener(
"ended", self._instvid__cleanup
)
video_source.addEventListener("ended", self._instvid__cleanup)
self.pixi.stage.addChild(self._instvid__skip_container)

def _instvid__cleanup(self):
Expand Down

0 comments on commit 5916c43

Please sign in to comment.