rrweb-io / rrweb

record and replay the web
https://www.rrweb.io/
MIT License
15.9k stars 1.38k forks source link

[Bug]: how i can record iframe content #1524

Open kkai24 opened 1 week ago

kkai24 commented 1 week ago

Preflight Checklist

What package is this bug report for?

rrweb

Version

rrweb-2.0.0-alpha.4

Expected Behavior

when my web includes iframe element, i can’t record it

Actual Behavior

my web includes iframe element, waiting for one minutes, i end recording, when i try to replay events, i find it iframe content become white content, no record something,how i can i do

Steps to Reproduce

nothing

Testcase Gist URL

No response

Additional Information

No response

kkai24 commented 1 week ago

today,when i try to record something,i find it success to recording iframe content, i add some config to iframe page !!! oh my god

Matthew2015 commented 2 days ago

today,when i try to record something,i find it success to recording iframe content, i add some config to iframe page !!! oh my god

what config did u added?

kkai24 commented 2 days ago

@Matthew2015 I added a configuration called recordCrossOriginIframes, and then I used postmessage to publish child monitoring messages and start recording them. The next parent monitoring message also started recording. Therefore, the method I adopted is that both parent and child components require a record.