Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
react-howler-player
Advanced tools
Readme
This is a simple, accessible audio player built using Reactjs and Howlerjs. view demo
Javascript audio library for the modern web. howler.js makes working with audio in JavaScript easy and reliable across all platforms.
npm install --save howler react-howler-player
import React, { Component } from "react";
import Player from "react-howler-player";
const App = () => {
const onPlayerReady = (data) => {
console.log(data);
};
const timeUpdate = (data) => {
console.log(data);
};
return (
<div>
<Player
src={["audio file URL"]}
isDark={true}
onTimeUpdate={timeUpdate}
onLoad={onPlayerReady}
/>
</div>
);
};
git clone git@github.com:binodswain/react-howler-player.git
cd react-howler-player
npm i
npm run build
cd example
npm i
npm start
This will start a React app (bootstrapped with create-react-app) with multiple player instances. One player instance with remote URL and one with local file.
attribute | type | optional | details |
---|---|---|---|
src | Array | false | Source of audio playback |
isDark | Boolean | true | Flag to switch between light and dark theme |
onTimeUpdate | function | true | On playback progress, timestamp obj is passed to the function |
loadingText | function | true | Text displayed while preparing the playback.(default val: 'Preparing') |
preparingComp | JSX Comp. | true | Component to display instead of loading text. `(preparingComp |
speedPanel | string | true | Position of audio playback rate list. ('top', 'bottom', 'relative'). defaultVal : 'relative' |
onLoad | function | true | Callback function that passes howler audio instance and couple of basic information |
onPlay | function | true | Called when audio starts or resumes playing |
onPause | function | true | Called when audio is paused |
onEnd | function | true | Called when media finishes playing |
profile | string | true | Player profile. ['generic', 'minimal', 'top_progress'] |
MIT © binodswain
FAQs
React package to display minimalist audio player UI adding wrapper on howler.js
The npm package react-howler-player receives a total of 22 weekly downloads. As such, react-howler-player popularity was classified as not popular.
We found that react-howler-player demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.