
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-mse-player
Advanced tools
React component for streaming video using Media Source Extensions (MSE) - designed for go2rtc
React components for low-latency video streaming via MSE and WebRTC. Designed for go2rtc.
labels prop.npm install react-mse-player
# or
yarn add react-mse-player
import { MSEVideoStream } from 'react-mse-player';
<MSEVideoStream src="ws://localhost:1984/api/ws?src=camera1" />
import { WebRTCVideoStream } from 'react-mse-player';
<WebRTCVideoStream src="ws://localhost:1984/api/ws?src=camera1" />
Both components accept a
ws://orwss://URL. HTTP/HTTPS URLs are converted automatically. Relative paths (/api/ws?src=...) are also supported.
| MSE | WebRTC | |
|---|---|---|
| Latency | ~1–3 s | < 500 ms |
| Safari iOS | 17+ only | 11+ |
| Firewall-friendly | Yes (WS) | Needs STUN/TURN |
| Audio/Video sync | Good | Excellent |
Use WebRTC when latency matters most. Use MSE as a fallback for broader compatibility.
import { WebRTCVideoStream, MSEVideoStream } from 'react-mse-player';
// WebRTC with custom ICE servers and TCP-only mode
<WebRTCVideoStream
src="ws://localhost:1984/api/ws?src=camera1"
mode="webrtc/tcp"
pcConfig={{
iceServers: [{ urls: 'turn:my-turn-server.com', username: 'user', credential: 'pass' }],
}}
media="video,audio"
onStatus={(s) => console.log(s)}
onError={(e) => console.error(e)}
debug
/>
// MSE with stall detection timeout
<MSEVideoStream
src="ws://localhost:1984/api/ws?src=camera1"
dataTimeout={5000}
media="video,audio"
onStatus={(s) => console.log(s)}
onError={(e) => console.error(e)}
debug
/>
| Prop | Type | Default | Description |
|---|---|---|---|
src | string | Required | WebSocket URL (ws://, wss://, relative / path, or http(s):// auto-converted). |
width | string | number | '100%' | Container width. |
height | string | number | '100%' | Container height. |
autoPlay | boolean | true | Start playback automatically. |
controls | boolean | false | Show native video controls. |
media | string | 'video,audio' | Requested tracks: 'video', 'audio', or 'video,audio'. |
objectFit | string | 'contain' | CSS object-fit for the video element. |
onStatus | (status: string) => void | — | Status change callback. |
onError | (error: any) => void | — | Error callback. |
className | string | '' | CSS class for the container. |
style | CSSProperties | {} | Inline styles for the container. |
labels | VideoLabels | see below | Override user-facing strings (for translation). |
debug | boolean | false | Log connection events to the console. |
| Prop | Type | Default | Description |
|---|---|---|---|
dataTimeout | number | 10000 | Milliseconds without data before triggering a reconnect. |
| Prop | Type | Default | Description |
|---|---|---|---|
mode | 'webrtc' | 'webrtc/tcp' | 'webrtc' | Use 'webrtc/tcp' to restrict ICE candidates to TCP only. |
pcConfig | RTCConfiguration | Cloudflare + Google STUN | Override ICE servers or bundle policy. |
All fields are optional — omit any key to keep the English default.
| Key | Default |
|---|---|
streamNotFound | "Stream not found" |
connectionFailed | "Connection failed" |
reconnecting | "Reconnecting..." |
import type { VideoLabels } from 'react-mse-player';
const labels: VideoLabels = {
streamNotFound: "Flux introuvable",
connectionFailed: "Connexion échouée",
reconnecting: "Reconnexion...",
};
<WebRTCVideoStream src={url} labels={labels} />
| Status | Description |
|---|---|
connecting | Opening the WebSocket connection. |
open | WebSocket connected, negotiating stream. |
streaming | (MSE) Data flowing, buffer active. |
connected | (WebRTC) Peer connection established. |
reconnecting | Connection lost, waiting to retry. |
closed | Connection closed. |
error | Unrecoverable error. |
| Browser | MSE | WebRTC |
|---|---|---|
| Chrome / Edge / Brave | ✅ | ✅ |
| Firefox | ✅ | ✅ |
| Safari 17+ | ✅ (ManagedMediaSource) | ✅ |
| Safari < 17 | ❌ | ✅ (11+) |
| Android (Chrome) | ✅ | ✅ |
| iOS Safari 17.1+ | ✅ | ✅ |
| iOS Safari < 17 | ❌ | ✅ |
MIT
FAQs
React component for streaming video using Media Source Extensions (MSE) - designed for go2rtc
The npm package react-mse-player receives a total of 13 weekly downloads. As such, react-mse-player popularity was classified as not popular.
We found that react-mse-player demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.