New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

apm-react-audio-player

Package Overview
Dependencies
Maintainers
2
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 1.0.8 to 1.0.9

29

dist/index.js

@@ -96,5 +96,6 @@ 'use strict';

setIsMuted = _useState10[1];
var isStream = audioRef.current && audioRef.current.currentSrc.includes('stream');
React.useEffect(function () {
if (currentTime === Number(duration)) {
restart();
// restart()
setIsFinishedPlaying(true);

@@ -106,3 +107,3 @@ }

setDuration(seconds);
if (!audioRef.current.currentSrc.includes('stream')) {
if (!isStream) {
progressBarRef.current.max = seconds;

@@ -115,3 +116,5 @@ }

var whilePlaying = function whilePlaying() {
progressBarRef.current.value = Math.floor(audioRef.current.currentTime);
if (!isStream) {
progressBarRef.current.value = Math.floor(audioRef.current.currentTime);
}
progressBarRef.current.style.setProperty('--seek-before-width', "".concat(progressBarRef.current.value / duration * 100, "%"));

@@ -121,4 +124,4 @@ updateCurrentTime();

// when you reach the end of the song
if (progressBarRef.current.value === duration) {
restart();
if (!isStream && progressBarRef.current.value === duration) {
// restart()
setIsFinishedPlaying(true);

@@ -134,7 +137,9 @@ return;

};
var restart = function restart() {
progressBarRef.current.value = 0;
updateCurrentTime();
pause();
};
// const restart = () => {
// progressBarRef.current.value = 0
// updateCurrentTime()
// pause()
// }
var play = function play() {

@@ -144,3 +149,5 @@ setIsPlaying(true);

audioRef.current.play();
animationRef.current = window.requestAnimationFrame(whilePlaying);
if (!isStream) {
animationRef.current = window.requestAnimationFrame(whilePlaying);
}
};

@@ -147,0 +154,0 @@ var toggleMute = function toggleMute() {

{
"name": "apm-react-audio-player",
"version": "1.0.8",
"version": "1.0.9",
"author": "Jason Phan <jphan@mpr.org>",

@@ -5,0 +5,0 @@ "license": "MIT",

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