@playruo/embed
v1.3.3
Published
React SDK to embed Playruo with postMessage API.
Readme
@playruo/embed
React SDK to embed Playruo via iframe + postMessage.
Windowed launch
PlayruoEmbed requests browser fullscreen on the iframe when the user starts a
demo. This remains the default behavior.
Set enableWindowedLaunch to true to skip the parent fullscreen request and
start the experience inside the current iframe bounds:
<PlayruoEmbed
operation="iframe"
enableWindowedLaunch
/>Event forwarding
When the embedded Playruo iframe sends { type: "playruo_event", data }, the
React package forwards the payload through onEvent(data).
If the package host is itself inside another iframe, the same message is also
forwarded one level up with window.parent.postMessage({ type:
"playruo_event", data }, "*").
