Getting Started

Rainway provides a React component to help out with rendering streams in your Rainway Web SDK apps.

It's available as @rainway/react on npm:

npm install @rainway/react

Usage

Pass an InboundStream as a prop to the Rainway component to render it.

return (
  <Rainway
    stream={currentStream}              // Pass in a RainwayStream object...
    style={{ filter: 'grayscale(1)' }}  // ... and styles for the wrapper div
  >
    <p>Children are displayed as fallback when `stream` is undefined.</p>
  </Rainway>
);

Did this page help you?