# ⚠️ DEPRECATED – Storm Player React Component

**This package has been renamed to [`@stormstreaming/player-react`](https://www.npmjs.com/package/@stormstreaming/player-react).**

Please update your dependencies:

```bash
npm uninstall @stormstreaming/stormplayer-react
npm install @stormstreaming/player-react
```

Storm Player React is part of the new Storm Player ecosystem:

- Core playback engine: [`@stormstreaming/player-core`](https://www.npmjs.com/package/@stormstreaming/player-core)
- UI player: [`@stormstreaming/player-ui`](https://www.npmjs.com/package/@stormstreaming/player-ui)
- React wrapper: [`@stormstreaming/player-react`](https://www.npmjs.com/package/@stormstreaming/player-react)

> This repository contains the **legacy React component** and is kept for reference only.

---

## Legacy Package

Storm JavaScript Player – React Component is a legacy React wrapper around Storm Player UI and Storm Library.  
It requires a **Storm Streaming Server** instance or **Storm Cloud** subscription.

---

## Legacy Installation

### NPM

```bash
npm install @stormstreaming/stormplayer-react
```

### Yarn

```bash
yarn add @stormstreaming/stormplayer-react
```

---

## Server-Side Rendering (Legacy)

Storm Player relies on browser APIs such as `window` and `HTMLVideoElement`.  
For SSR frameworks (e.g. Next.js), server-side rendering must be disabled.

Example:

```javascript
import dynamic from "next/dynamic";

const StormPlayer = dynamic(
  () => import("@stormstreaming/stormplayer-react"),
  { ssr: false }
);
```

Usage:

```jsx
{typeof window !== "undefined" && (
  <StormPlayer
    playerConfig={{
      containerID: "player1",
      width: "100%",
      height: "100%",
      title: "Your streaming video title",
      subtitle: "Subtitle for your video"
    }}
    libraryConfig={STORM_LIBRARY_CONFIG}
  />
)}
```

---

## Requirements (Legacy)

- Node.js 15.4.0+
- React 17+

---

## Browser Compatibility (Legacy)

- Edge 12+
- Chrome 31+
- Firefox 42+
- Safari 13+
- Opera 15+

Older browsers fall back to HLS mode.

---

## License

See [LICENSE.txt](LICENSE.txt).
