tunio-player
v1.2.9
Published
Tunio Audio Player Component
Readme
Tunio Player
Tunio Audio Player Component for React applications.
Installation
npm install tunio-player
# or
yarn add tunio-player
# or
pnpm add tunio-playerUsage
Import the component and styles
import { TunioPlayer } from 'tunio-player'
import 'tunio-player/styles.css'
function App() {
return (
<div>
<TunioPlayer
id="your-radio-id"
theme="dark"
online
/>
</div>
)
}The widget still auto-injects its styles for backwards compatibility, but
explicitly importing tunio-player/styles.css is the recommended setup for
predictable styling across host apps and bundlers.
Props
id(string): Radio station idtheme("dark" | "light"): Player theme (default: "dark")ambient(boolean): Enable ambient background effect (default: false)opacity(number): Player opacity (default: 1)online(boolean): online mode by defaultbuttonOnly(boolean): Render only the play/pause button without the rest of the widget UI (default: false)buttonOnlyClassName(string): Extra class applied to the standalone button for custom styles (background, borders, etc.)buttonOnlySize(number): Explicit pixel size for the standalone button; icons and spinner scale automatically with this valueonTrackChange((track) => void): Optional callback fired when the current track changesonStreamChange((stream) => void): Optional callback fired when stream timing/details changeonStreamConfigChange((streamConfig) => void): Optional callback fired when player config loads or resetsonStreamsChange((streams) => void): Optional callback fired when playable stream URLs load or resetonCoverChange((cover) => void): Optional callback fired when cover artwork changes or resetsonPlaybackStateChange((state) => void): Optional callback fired when play, volume, mute, buffering or mode state changes
Features
- 🎵 Audio streaming with auto-reconnection
- 🎨 Dark and light themes
- ✨ Ambient background effects
- 📱 Responsive design
- 🔊 Volume control
- 🔇 Mute functionality
- ⏯️ Play/pause controls
- 📡 Real-time track information
TypeScript Support
This package includes TypeScript definitions out of the box.
Local Development
# Install dependencies
pnpm install
# Run demo in development mode
pnpm dev
# Build package
pnpm buildLicense
MIT
