@ossplay/player
v0.1.1
Published
A YouTube-lite React video player — HLS adaptive bitrate, captions, keyboard shortcuts. Includes an OssPlay adapter.
Readme
@ossplay/player
A drop-in React video player — adaptive-bitrate HLS, quality/subtitle/audio-track menus, keyboard
shortcuts, fullscreen, picture-in-picture. <OssPlayVideo> wires straight to an
OSSPlay project and asset; <VideoPlayer> plays any source you already
have, with no OSSPlay dependency.
Install
bun add @ossplay/player
# or: npm install @ossplay/playerWired to an OSSPlay project
import { OssPlayVideo } from "@ossplay/player";
import "@ossplay/player/styles.css";
<OssPlayVideo
apiBaseUrl="https://media.example.com/api"
project="my-project"
assetId="asset_123"
/>Handles requesting the video's HLS rendition and waiting for it to finish processing on its own — no manual polling.
Bring your own source
import { VideoPlayer } from "@ossplay/player";
import "@ossplay/player/styles.css";
<VideoPlayer sources={[{ src: "https://example.com/video.m3u8", type: "hls" }]} />sources accepts "hls" (adaptive), "mp4", or "webm".
Not using React?
@ossplay/player-core is the framework-agnostic
engine underneath both components above.
Docs
Full guide and prop reference: ossplay.phuzle.com/docs/helpers
License
MIT
