Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event driven code crashes often #3

Open
mc2 opened this issue Aug 14, 2018 · 2 comments
Open

Event driven code crashes often #3

mc2 opened this issue Aug 14, 2018 · 2 comments

Comments

@mc2
Copy link
Contributor

mc2 commented Aug 14, 2018

The design of the event code (buttons, reader events) is pretty fragile in two ways: 1) could be better designed, 2) browser reader events (if I remember correctly) can fail.

To reproduce one bug: go to a page with a lot of text. Click Play. Then click "Pause" "Resume" "Pause" "Resume" until it fails.

I tried a number of different ways of coding/detecting events. The various browser's implementations of the readers is (if I remember correctly,) very wonky. Tried to be defensive, but needs a new hard look if this is to ship to people-who-happen-to-not-be-developers.

@mekarpeles
Copy link
Member

I think I've addressed a handful of these cases in https://archive.org/~mek/audioreader.php -- the code needs to be merged.

The event capturing was very challenging to work with because so many states were introduced. I think in total there only really needs to be ~4 states, all represented by a single variable (rather than action, app action, synth action, etc)

@mekarpeles
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants