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

Refactor events.js into Recorder and Events class #18

Merged
merged 4 commits into from
Oct 10, 2024

Conversation

bensheldon
Copy link
Owner

@bensheldon bensheldon commented Oct 10, 2024

  • Removes some of the unused application stuff from Demo (like PWA)
  • Uses JS classes
  • Separates out Start/Stop for Pause/Unpause to better differentiate navigation events (when it's necessary to restart the recorder) from visibility events (when we just want to stop/start any timers).
  • Separates the Recorder class, which manages rrweb and hooks into the lifecycle events, and the Events class which handles storing events and transmitting them to the backend.
  • This Chrome article about Page Lifecycle API is helpful: https://developer.chrome.com/docs/web-platform/page-lifecycle-api
  • I could probably use arrow functions instead of bind but I had written them that way initially and I'll wait until some sort of compatibility linting is in place to really worry

page-lifecycle-api-state-a8e7c36ceae18

@bensheldon bensheldon changed the title Refactor events.js Refactor events.js into Recorder and Events class Oct 10, 2024
@bensheldon bensheldon merged commit 8c4abe3 into main Oct 10, 2024
2 checks passed
@bensheldon bensheldon deleted the refactor-eventsjs branch October 10, 2024 17:57
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

Successfully merging this pull request may close these issues.

1 participant