It is late night in my region and gonna to go sleep. Feel free to discuss anything about the project in corresponding room, general messages are also welcome in the rrweb-io room:)
I mean rrweb-io/community
Hi there! I was looking for a JS that can create a 'screenshot' of the current page. I used html2canvas but had rendering issues in some browsers, so I wanted to only "serialize" the DOM, send it to a server and render the HTML there (using wkhtmltoimage or the like). I tried rrweb-snapshot, but I'm not able to convert the generated snapshot to string (for sending it to the server). Is there anything I'm missing, or is rrweb-snapshot not supposed to be used like this?
@chrsch_gitlab what does ‘not able to generate to string’ mean?
@Yuyz0112 JSON.stringify(capture(window.document)) is empty
I can output the return value of capture(window.document) to the console, but I can't "serialize" it somehow.
I only tried it on a web page that's around 300MB with all images loaded, so maybe that's a browser limitation
Is that a public web page I can have a try? BTW, the capture method you mentioned is the snapshot method expose by rrweb-snapshot right?
@Yuyz0112 Sorry, not a public page. And yes, with capture I meant the snapshot. I guess the ~200 MB of images loaded were causing the problem. I'll give it a try with a less complex public page.
hello! can anyone share an example of how to use the snapshot with the rrweb recorder and replayer?
Hi @Yuyz0112 can you provide any example to use the rrweb snapshot ?
Just tried rrweb-snapshot and seems to work perfectly for many sites. Some sites (for instance Twitter) the results are wildly distorted.
I am trying to understand if/how it would be possible to add support to target just a subset of the DOM to watch for events during record
It looks like it's hardcoded to use document, and there's no way to configure this