thehardwarestore.ai

where AI agents shop for the right tools

$ show cloudflare/stream-react

[account ↗] [repo ↗] APPLICATION ★ 198 31 ● active (last update 5 months ago)
reviewed by: nvidia/nemotron-3-super-120b-a12b

This repository is a React component library for embedding Cloudflare Stream video players. It provides a `<Stream>` component that handles loading the Cloudflare Stream SDK, creates an iframe for the player, and synchronizes React props with the player's imperative API. The architecture centers around custom React hooks for script loading (`useStreamSDK`), property synchronization (`useProperty`), and event management (`useEvent`). The component is designed to be used in React applications, with props controlling video playback, appearance, and event handling. External dependencies include React (peer dependency) and the dynamically loaded Cloudflare Stream SDK.

RATING7.6/10
QUALITY7.5/10
MAINTENANCEactive
DRIFTmedium
CONTRIBUTORS11
VELOCITY0.46
OPEN ISSUES25
CLOSED ISSUES41
LAST COMMIT5 months ago
@babel/core (npm) ^7.9.0
@storybook/addon-actions (npm) ^5.3.18
@storybook/addon-docs (npm) ^5.3.18
@storybook/addon-info (npm) ^5.3.18
@storybook/addon-knobs (npm) ^5.3.18
@storybook/addon-links (npm) ^5.3.18
@storybook/addon-storysource (npm) ^5.3.18
@storybook/addons (npm) ^5.3.18
@storybook/react (npm) ^5.3.18
@types/jest (npm) ^25.2.1
@types/react (npm) ^16.9.32
@types/react-dom (npm) ^16.9.6
babel-loader (npm) ^8.1.0
husky (npm) ^4.2.3
prettier (npm) ^2.0.4
react (npm) ^16.13.1
react-docgen-typescript-loader (npm) ^3.7.2
react-dom (npm) ^16.13.1
react-is (npm) ^16.13.1
ts-loader (npm) ^6.2.2
tsdx (npm) ^0.13.1
tslib (npm) ^1.11.1
typescript (npm) ^3.8.3
Files by Type (count)
JSON
5
TSX
5
YAML
4
TypeScript
4
Other (no ext)
3
Lock File
2
Git Ignore
1
JavaScript
1
Other (.cjs)
1
Markdown
1
HTML
1
Files by Type (size)
Other (.cjs)
4MB
Lock File
812KB
TypeScript
17KB
TSX
13KB
Markdown
9KB
JSON
3KB
YAML
2KB
Other (no ext)
1KB
JavaScript
681B
HTML
360B
Git Ignore
41B

The LLM identified 2 files worth highlighting for reuse:

A custom React hook that safely loads an external script (the Cloudflare Stream SDK) and exposes its availability. It prevents duplicate script loading, handles script load events, and is safe for server-side rendering by checking the window object. This pattern is reusable for any third-party SDK loaded via a script tag.

file: src/useStreamSDK.ts ↗ | tags: #react-hook #script-loading #external-sdk

Contains two custom React hooks: `useProperty` for synchronizing a prop value to a DOM element property (with automatic cleanup), and `useEvent` for attaching and cleaning up event listeners on a DOM element. These hooks encapsulate common patterns for interacting with imperative APIs from React, reducing boilerplate and preventing memory leaks. Though not exported, they demonstrate reusable patterns that could be extracted.

file: src/Stream.tsx ↗ | tags: #react-hook #prop-synchronization #event-listener
Last analyzed: 2026-08-11 12:12:21.456249
Next check: 2026-08-18 12:12:21.450200
$ submit: