-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Cannot screenshare from within iframe Cross domain. InvalidStateError #6212
Comments
Could you please share your sample to reproduce this issue? |
I can't share the actual code due to IP, but heres roughly what it's doing. Parent frame
embedded iframe
demo.js
NOTE: bug only occurs when the iframe src is on a separate domain |
Tried something new today. I tried getting the iFrame to request that the parent frame get the media source ID and passing that back to the iframe and the iframe initiating screen sharing. Still no luck. Another thing I have tried is the |
@andyryan could you please extract some minimal reproducible case from the app. It would be best if the same code works in Chrome but breaks in NW. PS, you can use nw --url= to test any web page. |
Does the above code not reproduce? |
I try to reproduce this with the codes above:
@andyryan , is the result same as yours? And please let me know if there are some wrong steps. |
Yes thats what I'm seeing precisely. Thanks for reproducing. One thing that may be of note. I've managed to work around this by using a reverse proxy to give the appearance that the contents of the iframe and from the same domain. This seems to have ben successful. However I also tried changing the |
@Christywl since OP said "this flow works correctly on Chrome. Even cross domain.", could you please try it in Chrome browser? |
I have no idea about how to check it on chrome browser. I remove |
Screensharing with Chrome is only possible from an extension which must be called from your app |
This is fixed in git and will be available in the next nightly build. |
I have an app that is connecting to a webapp across domains through an iframe. This embedded app is trying to initialise a screen share but the
getUserMedia
request fails withInvalidStateError
.I have tried using both the
chooseDesktopMedia
andDesktopCaptureMonitor
(and yes I am remembering to useregisterStream
functions and both lead to the same error ongetUserMedia
.Note: this flow works correctly on Chrome. Even cross domain.
The text was updated successfully, but these errors were encountered: