Quick Start

Requirement:

Dependencies

# with npm
npm install imean-replay-sdk

# with yarn
yarn add imean-replay-sdk

# with pnpm
pnpm add imean-replay-sdk

Quick Start in a React Application

import { FC, useEffect } from 'react';
import ReplaySDK from 'imean-replay-sdk';

interface ReplaySDKControllerProps {}

const ReplaySDKController: FC<ReplaySDKControllerProps> = () => {

  useEffect(() => {
    void(async()=>{
      await ReplaySDK.init({
        mode:'xxx',
        workflow:'xxx'
      });
      
      await ReplaySDK.runAutomation({
        index: 0
      });
    })()
    
  }, []);

  return null;
};

export default ReplaySDK;

Importing the Replay SDK via CDN

<script src="xxx"></script>

<button id="app">button</button>

<script>
  window.ReplaySDK.init({
    mode: 'Default',
    workflow: {
      id: 'test',
      steps: [
        {
          title: 'Click Button',
          id: 'AhPPa81go4KMr5CotK2eJ',
          type: 'Action',
          selector: '#app ',
          actionType: 'click',
          value: ''
        }
      ]
    }
  });
  window.ReplaySDK.runAutomation({ index: 0 });
</script>

Try Replay SDK Online

https://codesandbox.io/p/devbox/replaysdk-demo-vwzftm

Preview the effect, please open a new tab page to view.:https://vwzftm-5173.csb.app/

Last updated