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

Fix: processed-node-manager is created even in the environment that doesn't need a recorder #1186

Merged
merged 2 commits into from
Mar 24, 2023

Conversation

YunFeng0817
Copy link
Member

changes:

  1. fix the issue: processed-node-manager is created even in the environment that doesn't need a recorder

image

In the built scripts, the new ProcessedNodeManager() statement is bundled into the global environment, which means it will be constructed whenever the script is loaded.
Currently, I'm trying to create a rrweb player page with the SSR (server-side render) and it doesn't have the RFA API on the server side. So it keeps throwing the error: requestAnimationFrame isn't defined.

  1. solve ESLint errors introduced in feat: Ensure password inputs are masked when switching type #1170

@changeset-bot
Copy link

changeset-bot bot commented Mar 22, 2023

🦋 Changeset detected

Latest commit: 5f4bd8a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
rrweb Patch
rrweb-snapshot Patch
rrdom Patch
rrdom-nodejs Patch
rrweb-player Patch
@rrweb/types Patch
@rrweb/web-extension Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

@Juice10 Juice10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, one things I'm afraid of now we've moved it to the record function is that we might get multiple ProcessedNodeManager raf loops if someone stops recording, and starts again. I think we should add it to the list of handlers that get switched off once recording stops.

packages/rrweb/src/record/index.ts Show resolved Hide resolved
End the RAF loop when the recorder stops
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.

2 participants