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

react-h5-audio-player

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 0.2.4 to 0.2.5

12

lib/index.js

@@ -281,9 +281,7 @@ 'use strict';

key: 'componentDidUpdate',
value: function componentDidUpdate() {
var _props = this.props,
audioFile = _props.audioFile,
isPlaying = _props.isPlaying;
value: function componentDidUpdate(prevProps, prevState) {
var src = this.props.src;
if (isPlaying && this.audio.paused && !!audioFile) {
this.play();
if (src !== prevProps.src) {
this.audio.play();
}

@@ -387,3 +385,3 @@ }

}, style: style.togglePlay },
this.state.isPlaying ? _react2.default.createElement('i', { style: style.pause }) : _react2.default.createElement('i', { style: style.play })
this.state.isPlaying ? _react2.default.createElement('i', { className: 'pause-icon', style: style.pause }) : _react2.default.createElement('i', { className: 'play-icon', style: style.play })
)

@@ -390,0 +388,0 @@ ),

{
"name": "react-h5-audio-player",
"version": "0.2.4",
"version": "0.2.5",
"description": "A React audio player with UI. Mobile compatible.",

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

@@ -249,6 +249,6 @@ import React from 'react';

componentDidUpdate() {
const { audioFile, isPlaying } = this.props;
if (isPlaying && this.audio.paused && !!audioFile) {
this.play();
componentDidUpdate(prevProps, prevState) {
const { src } = this.props;
if (src !== prevProps.src) {
this.audio.play();
}

@@ -319,4 +319,4 @@ }

this.state.isPlaying ?
<i style={style.pause} /> :
<i style={style.play} />
<i className="pause-icon" style={style.pause} /> :
<i className="play-icon" style={style.play} />
}

@@ -323,0 +323,0 @@ </a>

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