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]: how i can record iframe content #1524

Open
1 task done
kkai24 opened this issue Jun 25, 2024 · 5 comments
Open
1 task done

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

kkai24 opened this issue Jun 25, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@kkai24
Copy link

kkai24 commented Jun 25, 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

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 kkai24 added the bug Something isn't working label Jun 25, 2024
@kkai24
Copy link
Author

kkai24 commented Jun 26, 2024

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
Copy link

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
Copy link
Author

kkai24 commented Jul 3, 2024

@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.

@eoghanmurray
Copy link
Contributor

Does your iframe site also include rrweb? Either the containing document can see into the iframe via the DOM (iframe.contentDocument etc.) or else for e.g. a 3rd party site, they both need to load up rrweb (I haven't ever done this personally)

@harshil-dholakiya
Copy link

harshil-dholakiya commented Sep 23, 2024

@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.

I have tried recordCrossOriginIframes : true , its not record iframes content i saw blank white space instead of iframe content , i m still confused how to record cross-origin iframes ?

Also its helpful if you let me know how you use postMessage API with this config

@kkai24

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

4 participants