Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
raptor-howler
Advanced tools
Minimal React wrapper for howlerjs
howler.js + react-aptor + ❤ = raptor-howler️
Minimal React wrapper for howler.js using react-aptor
npm install --save raptor-howler
or with yard
yarn add raptor-howler
import RaptorHowler from 'raptor-howler'
const App = () => (
<RaptorHowler
src="https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_700KB.mp3"
playing={true}
/>
);
You can find a complete example for basic functionality of raptor-howler using create-react-app, here
props are passed directly to new Howl
with default value
for more info about props types see howler.js core section
new Howl({
src: props.src,
xhr: props.xhr || {},
format: props.format || [],
mute: props.mute || false,
loop: props.loop || false,
preload: props.preload || false,
rate: props.rate || 1.0,
volume: props.volume || 1.0,
onend: props.onEnd,
onplay: props.onPlay,
onpause: props.onPause,
onvolume: props.onVolume,
onstop: props.onStop,
onrate: props.onRate,
onload: props.onLoad,
onloaderror: props.onLoadError,
html5: props.html5 || false
})
just pass a ref to <RaptorHowler />
and you can access the latest howler instance using
ref.current._howler
field.
function App() {
const apiRef = useRef(null);
return (
<div className="app">
<RaptorHowler
src="https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_700KB.mp3"
ref={apiRef}
/>
<button
onClick={() => {
const { current: api } = apiRef;
if (!api) return;
console.log(api._howler.duration());
}}>
log audio duration
</button>
</div>
);
}
Take a look at api.ts for all pre-defined api which make your work easier
<button
onClick={() => {
if (!apiRef.current) return;
const playing = apiRef.current._playing();
if (!playing) apiRef.current.play();
else apiRef.current.pause();
}}>
Toggle playing state from (prop API)
</button>
💻 Developer/Maintainer (BTC):
bc1qq8qq63ex7svkkjdjn5axu8angfxytvs83nlujk
License MIT
FAQs
The react-aptor connector for Howler.js
The npm package raptor-howler receives a total of 0 weekly downloads. As such, raptor-howler popularity was classified as not popular.
We found that raptor-howler 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.