π Introducing React Video & Audio Player: A Customisable Media Component for Modern Web Apps
If you are constructing a video platform, podcast app, or simply want versatile media elements – meet your new favorite instrument:
React Video & Audio Player
A light-weight, open-source video & audio participant element constructed with React and styled with TailwindCSS.
It additionally works in plain HTML by way of CDN, with full management over types and performance.
β
Features
-
Supports a number of media codecs:
MP4,MP3,OGG,WEBM,WAV, and extra - Customisable controls: Play, pause, skip, obtain, fullscreen, and quantity
- Keyboard shortcuts: For accessible and intuitive playback
- Visual waveform rendering: For audio information
- Responsive and theme-aware: Styled with TailwindCSS
- Plug-and-play: Works in React, Next.js, or standalone HTML/JS tasks
π¦ Installation
npm set up react-video-audio-player
or use CDN:
<script src="https://cdn.jsdelivr.web/npm/react-video-audio-player/dist/index.umd.min.js"></script>
<hyperlink
rel="stylesheet"
href="https://cdn.jsdelivr.web/npm/react-video-audio-player/dist/video-audio-player.min.css"
/>
β‘ Quick Usage (React Example)
import { VideoPlayer, AudioPlayer } from 'react-video-audio-player';
perform App() {
return (
<VideoPlayer
src="video.mp4"
/>
<AudioPlayer
src="audio.mp3"
/>
);
}
π§© Or in plain HTML
<head>
<!-- UMD -->
<script src="https://cdn.jsdelivr.web/npm/react-video-audio-player/dist/index.umd.min.js"></script>
<hyperlink
rel="stylesheet"
href="https://cdn.jsdelivr.web/npm/react-video-audio-player/dist/video-audio-player.min.css"
/>
</head>
<physique>
<div id="video-player-container"></div>
<div id="audio-player-container"></div>
<script>
// Initialise the VideoPlayer
const videoPlayerContainer = doc.getElementById('video-player-container');
const videoPlayer = VideoPlayer({
src: 'video.mp4',
});
videoPlayerContainer.appendChild(videoPlayer);
// Initialise the AudioPlayer
const audioPlayerContainer = doc.getElementById('audio-player-container');
const audioPlayer = AudioPlayer({
src: 'audio.mp3',
});
audioPlayerContainer.appendChild(audioPlayer);
</script>
</physique>
π Useful Links
- π Live Demo: react-video-audio-player.vercel.app
- π¦ NPM: npmjs.com/bundle/react-video-audio-player
- β GitHub Repo: github.com/Walidadebayo/react-video-audio-player
- π CDN: jsDelivr Package
π Contribution
Iβd love suggestions, contributions, or ideas!
If this element helps your undertaking, a star on GitHub would imply lots.
Thanks for studying – blissful coding!
#ReactJS #WebDev #OpenSource #JavaScript #Frontend #MediaPlayer #AudioPlayer #VideoPlayer #nextjs #react #html
HI-FI News
by way of DEV Community https://dev.to
April 8, 2025 at 06:38PM
-
Product on sale
Audiophile Vinyl Records Cleaning BundleOriginal price was: €69.90.€59.90Current price is: €59.90. incl. VAT -
Product on sale
Easy Start Vinyl Records Cleaning KitOriginal price was: €69.90.€59.90Current price is: €59.90. incl. VAT -
Vinyl Records Cleaner Easy Groove Concentrate€34.95 incl. VAT -
Easy Groove Super Set€199.00 incl. VAT -
Easy Groove Enzycaster – vinyl records prewash cleaner€34.95 incl. VAT -
Easy Groove Extreme MK. II- vinyl records prewash cleaner€45.00 incl. VAT -
Vinyl Records Cleaner – Easy Groove Virgin Concentrate€35.00 incl. VAT -
Easy Groove Spray&Wipe vinyl records cleaner€34.95 incl. VAT








