Getting started

To get going to with the Interactive Streaming product integration, follow the below:

Install the package using your preferred package manager:

npm install @img-arena/streaming-sdk
yarn add @img-arena/streaming-sdk

React Component

Import the React component if you are using React:

import { StreamingSDKComponent } from '@img-arena/streaming-sdk';

To render the Streaming SDK you must pass these required props:

<StreamingSDKComponent
    eventId={'2'}
    operatorId={'your-operator-id'}
    isOperatorEnvProd={process.env.NODE_ENV === 'production'}
    fetchToken={getToken}
/>

Non-React environments

Import the SDK class if you aren't using React:

import { StreamingSDK } from '@img-arena/streaming-sdk';

To render the product, you must pass these required props:

new StreamingSDK({
  eventId: '2',
  operatorId: 'your-operator-id',
  domTarget: document.querySelector("#interactive-streaming-container"),
  fetchToken: getToken,
  isOperatorEnvProd: process.env.NODE_ENV === 'production',
});

To get an eventId use the Events API.

To learn more about authentication flow and fetching the token, read about the Authentication Flow.

This configuration should get you Video for any event, and Timeline and Statistics for supported events.

See Configuration options for full details of all configuration options available.

Last updated