Socket
Socket
Sign inDemoInstall

react-use-audio-player

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-use-audio-player - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

10

dist/index.js

@@ -56,2 +56,6 @@ "use strict";

},
onend: () => {
setStopped(true);
setPlaying(false);
},
onpause: () => void setPlaying(false),

@@ -111,6 +115,6 @@ onstop: () => {

exports.useAudioPosition = () => {
const { player, playing } = react_1.useContext(AudioPlayerContext);
const { player, playing, stopped } = react_1.useContext(AudioPlayerContext);
const [position, setPosition] = react_1.useState(0);
const [duration, setDuration] = react_1.useState(0);
// sets position and duration on player initialization
// sets position and duration on player initialization and when the audio is stopped
react_1.useEffect(() => {

@@ -121,3 +125,3 @@ if (player) {

}
}, [player]);
}, [player, stopped]);
// updates position on a one second loop

@@ -124,0 +128,0 @@ react_1.useEffect(() => {

{
"name": "react-use-audio-player",
"version": "0.0.7",
"version": "0.0.8",
"description": "React hook for building custom audio playback controls",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc