2

I'm trying to get two iframes to communicate, with little luck. I think postMessage() or Message Channel API (are they one & the same?) is the way to go, but I don't control the parent window.

In other words, the structure is this:

[parent window (user's website)]
  [iframe 1 (my app)]
  [iframe 2 (my app)]

I know this is possible because SoundCloud does it (if you have one embedded player playing, and you click play in the second one, the first one pauses).

How can I achieve this?

EDIT: This solves it.

ffxsam
  • 26,428
  • 32
  • 94
  • 144

0 Answers0