Commit graph

43 commits

Author SHA1 Message Date
Vladimir Panteleev
39c3144e4c assets/scripts.js: Improve timer logic
Use end of ongoing moments and start of upcoming moments too.
2019-07-28 08:16:55 +00:00
Vladimir Panteleev
57166f7daa assets/scripts.js: Remember and restore playback position when reopening
Just like the real thing.
2019-07-28 08:16:55 +00:00
Vladimir Panteleev
bc5a6bf2b9 assets/scripts.js: Clean up some global variables 2019-07-28 08:16:55 +00:00
Vladimir Panteleev
449e112040 assets/scripts.js: Make persistent state actually persistent
Use localStorage to save persistent variables.
2019-07-28 08:16:55 +00:00
Vladimir Panteleev
336a65f31a assets/scripts.js: Pause and unpause on click
- By placing the event handler on the video element, we ensure we don't
  receive it when a choice item was clicked.

- Use preventDefault to avoid the pause-and-immediately-unpause
  problem due to the video element itself also handling the event.
2019-07-28 08:16:55 +00:00
Vladimir Panteleev
7989e92f2b assets/scripts.js: Fix Space not unpausing with visible controls
When the video controls are visible, the video is paused, and the
video element is focused, pressing Space would unpause the video and
then immediately pause it again.
2019-07-28 08:16:55 +00:00
Vladimir Panteleev
ea6ff3f69e assets/scripts.js: Use moments for right key
Allows stopping at false interactions (e.g. 2B/1).
2019-07-28 08:16:55 +00:00
Vladimir Panteleev
783db22881 assets/scripts.js: Show choices on game-over screens, too 2019-07-28 08:16:55 +00:00
Vladimir Panteleev
ab29b0e5c8 assets/scripts.js: More seek/timing logic fixes 2019-07-28 08:16:55 +00:00
Vladimir Panteleev
9367a9fba9 assets/scripts.js: Add up/down keys to speed up/slow down video
Again, useful for debugging.
2019-07-28 08:16:55 +00:00
Vladimir Panteleev
925d950efb assets/scripts.js: Fix playing hash + pre-specified video src 2019-07-28 08:16:55 +00:00
Vladimir Panteleev
776c2d1aaa assets/scripts.js: Allow #t12345 hash syntax
Similar to YouTube's ?t=12345.

Mostly for debugging.
2019-07-28 08:16:55 +00:00
Vladimir Panteleev
363b1e32a8 assets/scripts.js: Improve title and hash updates
- Update them when the playback position changes by any means, not
  just when playing a certain chapter

- Include moments (choices) in hash and title

- Use choice descriptions in titles

- Allow meaningful back/forward navigation through chapters and choices
2019-07-28 08:16:55 +00:00
Vladimir Panteleev
c5fafb4c16 assets/scripts.js: Allow jumping to a chapter by setting the hash 2019-07-28 01:27:28 +00:00
Vladimir Panteleev
b4e04bccd1 assets/scripts.js: Improve handling of seeking
- Don't apply impressions when the player seeks into moments with
  impression data

- Fix false positives when seeking within the first few seconds of a
  segment
2019-07-28 01:20:34 +00:00
Vladimir Panteleev
588036f80e assets/scripts.js: Rename generateJs to preconditionToJS 2019-07-28 01:20:34 +00:00
Vladimir Panteleev
350a2caead assets/scripts.js: Fix undefined error for choices without descriptions 2019-07-28 01:20:34 +00:00
Vladimir Panteleev
4195108b0d assets/scripts.js: Track time and moments properly
WIP.

- Fixes a family of bugs such as pausing the video during a choice
  resulting in the video resuming at the default choice (while still
  paused) after a while.

- Unifies tracking of moments and cleans up redundant code.

- Fixes unnecessary stutter when transitioning between two segments
  that are adjacent in the video file.
2019-07-28 01:20:34 +00:00
Vladimir Panteleev
2c987cd81e assets/scripts.js: Improve handling of pre-specified video src
Fixes behavior if HTML is edited to indicate the video source.
2019-07-28 01:20:34 +00:00
Vladimir Panteleev
7e26ff3ddb assets/scripts.js: Don't hardcode initial segment 2019-07-28 01:20:34 +00:00
Vladimir Panteleev
68ec8bb628 assets/scripts.js: Fix check for undefined 2019-07-28 01:20:34 +00:00
Vladimir Panteleev
64bad02a3b assets/scripts.js: Do not trigger key events with modifier keys
These key combinations usually mean something else and are not
intended for the web page.
2019-07-28 01:20:34 +00:00
Vladimir Panteleev
afc3abb81c Fix onload JS error 2019-07-28 01:20:34 +00:00
Vladimir Panteleev
19c8003e62 assets/scripts.js: Delete unused function 2019-07-28 01:20:34 +00:00
Vladimir Panteleev
2826849ee0 assets/scripts.js: Fix JS warnings 2019-07-28 01:20:34 +00:00
Ali Zemani
2fbf4228bd
change some style 2019-01-19 12:15:17 +03:30
Ali Zemani
2764844c31
update file-dummy height 2019-01-19 12:12:35 +03:30
Imanoel Ali
4f61af6fa4 update style 2019-01-18 16:18:01 +03:30
Imanoel Ali
cacfa79e1a update index tips 2019-01-18 16:13:06 +03:30
Imanoel Ali
42983a4ff9 update style 2019-01-18 13:19:44 +03:30
Imanoel Ali
1431589f8a add control tips to index 2019-01-18 13:17:24 +03:30
Imanoel Ali
a5498a82a3 add black background 2019-01-17 14:35:18 +03:30
Imanoel Ali
6d62c8de75 fix padding for footer 2019-01-17 12:45:17 +03:30
Imanoel Ali
1b5428d2b3 add contact footer 2019-01-17 12:42:17 +03:30
Imanoel Ali
c4734bcea1 update style 2019-01-17 12:03:43 +03:30
Imanoel Ali
87b12730c7 add some tips on index page 2019-01-17 11:58:41 +03:30
Imanoel Ali
6175a9ad11 change choice font size 2019-01-17 11:42:01 +03:30
Imanoel Ali
d10e502774 update progress bar style 2019-01-17 11:40:42 +03:30
Imanoel Ali
4768ffc21a add english subtitle 2019-01-17 11:35:54 +03:30
Imanoel Ali
cd176c0640 increase font size 2019-01-17 02:44:03 +03:30
Imanoel Ali
cc5f2d5d78 play video after uplaod 2019-01-17 02:43:44 +03:30
Imanoel Ali
f5836e3ad4 some fix :) 2019-01-17 02:42:42 +03:30
Imanoel Ali
08e385231b first commit 2019-01-17 02:28:27 +03:30