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

[Bug]: The player shows canvas in the wrong way #1479

Open
1 task done
wanlijun opened this issue May 17, 2024 · 1 comment
Open
1 task done

[Bug]: The player shows canvas in the wrong way #1479

wanlijun opened this issue May 17, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@wanlijun
Copy link

wanlijun commented May 17, 2024

Preflight Checklist

  • I have searched the issue tracker for a bug report that matches the one I want to file, without success.

What package is this bug report for?

rrweb-player

Version

1.0.0-alpha.4

Expected Behavior

The correct one should be like this:
1715930506314

Actual Behavior

But I got this one sometime:
image

Are there any asynchronous problems? It works well sometime. Actually the events data is same in the both cases

Steps to Reproduce

the code in recorder:

rrweb.record({
      recordCanvas: true,
      emit(event, isCheckout) {
        if (isCheckout) {
          uuid = (new Date()).getTime()
        }
        events.push({uuid, data: event})
      },
      checkoutEveryNms: 3 * 60 * 1000, // checkout every 3 minutes
    })

the code in player:

replayer = new RrwebPlayer({
            target: containerDom,
            props: {
              events,
              UNSAFE_replayCanvas: true
            }
          });
          replayer.play();

the events data which I got from recorder
data.json

Testcase Gist URL

No response

Additional Information

I found something. These continuous commands are split into many events. If I put these commands in one event , It works well all the time. I hope this can help you.
image

@wanlijun wanlijun added the bug Something isn't working label May 17, 2024
@eoghanmurray
Copy link
Contributor

Great work;
So it looks like the chain of canvas/webgl commands is splitting across something that should be atomic?

@Juice10 the command argument application is async and promise awaits all commands in an event.
Is it possible that commands from a subsequent event need to await execution of the prior event?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants