@convertly-sh/player package is Convertly’s official embeddable player for HLS streams created through Video streaming. It wraps hls.js (with Safari native HLS fallback), ships styled controls, optional branding, and posts playback analytics when you pass a playbackId.
npm package
@convertly-sh/player — install with
npm install @convertly-sh/player. Source: github.com/convertly-sh/player.Interactive demo
Interactive player — HLS adaptive streaming with Convertly controls.
<iframe> inside a <Frame>. Mintlify supports raw HTML embeds, <video> tags for MP4 previews, and iframes for full interactive demos hosted on your app.
Customizable by design
The player UI is built to be hot-swappable where product teams usually need control: theme tokens, branding, skip buttons, center controls, chapters, quality renditions, popovers, and overlay/control-bar slots can all be changed without forking the player. Native controls such as Settings, Quality, Chapters, Captions, PiP, and Fullscreen stay inside the player chrome so custom UI still feels like one cohesive player. In the Settings menu, Quality is a nested player-native control. It shows the active rendition in the main settings view, then slides into the available quality list when selected. HLS streams populate this list from the manifest; MP4 workflows can pass manualqualities.
Install
Package exports
React peer dependencies
The React entry is optional. When you use@convertly-sh/player/react, install React 18+ and react-dom in your app:
React
Vanilla JS
Options
The mount handle exposes
destroy(), play(), pause(), getVideo(), getSlot(), setCaptions(), and setClipRange() for imperative control after mount.
Examples
Manual MP4 qualities
Custom player chrome
Scrub preview
PasspreviewVttUrl pointing at a Convertly CDN VTT file (?format=vtt&w=160&cols=6&interval=2 on the same video). Each cue maps a timestamp to a #xywh= region on the spritesheet — the player shows a thumbnail and time label on scrub-bar hover.
Without a VTT, the player falls back to seek-based frame preview when seekPreview is enabled (works best for same-origin or CORS-enabled sources).
Quality selection
When playback uses hls.js, a Quality menu appears with Auto plus each HLS rendition (1080p, 720p, etc.). Manual selection locks the level; choose Auto to return to adaptive bitrate. Native Safari HLS keeps adaptive-only behavior.Chapters
Passchapters with { title, start } entries (seconds). The player renders tick marks on the progress bar, shows the chapter title on hover, and exposes a chapters menu to jump between sections.
Branding
The player ships with a bundled white logomark cutout (assets/logomark-cutout.svg) and shows it by default, linking to convertly.sh.
logoUrl, set logoUrl: "" to hide the image while keeping other branding options, or pass href: null to remove the link.
Analytics
WhenplaybackId is provided, the player sends the same lightweight events as the legacy @convertly-sh/sdk helper: ready, play, pause, ended, seeked, timeupdate (throttled), and error.
Use bindPlaybackAnalytics(video, { playbackId, baseUrl }) from @convertly-sh/player if you attach analytics to a raw <video> element instead of the full player UI.
Advanced HLS helpers
For custom players that only need adaptive streaming:isHlsUrl() detects .m3u8 URLs before wiring hls.js.
Signed playback
For signed streams, pass the fullhlsManifestUrl returned by the API (including expires and token). Convertly rewrites playlist segment URLs so tokens propagate through adaptive renditions. Refresh the manifest URL before it expires.
Related
- Video streaming — create streams and playback URLs
- JavaScript SDK — API client for stream management