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

opening index.html via file: does not work on chrome/safari #4

Closed
r10s opened this issue Jan 2, 2022 · 1 comment · Fixed by #9
Closed

opening index.html via file: does not work on chrome/safari #4

r10s opened this issue Jan 2, 2022 · 1 comment · Fixed by #9

Comments

@r10s
Copy link
Collaborator

r10s commented Jan 2, 2022

the communication between simulated peers do work on firefox using localhost or file:.

for chrome/safari, this only works for localhost currently.

check, if we can improve that, otherwise document the issue.

@r10s
Copy link
Collaborator Author

r10s commented Jan 3, 2022

reason seems to be different same-origin-policies used on firefox and chrome/safari:

  • firefox treats windows using the same file: url as the same origin
  • chrome/safari treat windows using the same file: url as different origins

only windows with the same origin can access the other window objects as we're doing currently. postMessage seems not be able to fix that, however, localStorage works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant