Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-jw-player

Package Overview
Dependencies
Maintainers
3
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-jw-player - npm Package Compare versions

Comparing version 1.8.0-alpha.3 to 1.8.0-alpha.4

28

dist/create-event-handlers/on-time.js

@@ -15,19 +15,11 @@ "use strict";

var shouldUpdateState = false;
if (previousPositionInteger === currentPositionInteger) {
return;
} else if (!hasFired.zeroSecond && currentPositionInteger === 0) {
this.props.onEverySecond(0);
hasFired.zeroSecond = true;
shouldUpdateState = true;
} else {
this.props.onEverySecond(currentPositionInteger);
shouldUpdateState = true;
}
this.props.onEverySecond(currentPositionInteger);
if (!hasFired.threeSeconds && currentPositionInteger >= 3) {
this.props.onThreeSeconds();
hasFired.threeSeconds = true;
shouldUpdateState = true;
}

@@ -38,3 +30,2 @@

hasFired.tenSeconds = true;
shouldUpdateState = true;
}

@@ -45,3 +36,2 @@

hasFired.thirtySeconds = true;
shouldUpdateState = true;
}

@@ -52,3 +42,2 @@

hasFired.twentyFivePercent = true;
shouldUpdateState = true;
}

@@ -59,3 +48,2 @@

hasFired.fiftyPercent = true;
shouldUpdateState = true;
}

@@ -66,3 +54,2 @@

hasFired.seventyFivePercent = true;
shouldUpdateState = true;
}

@@ -73,13 +60,10 @@

hasFired.ninetyFivePercent = true;
shouldUpdateState = true;
}
if (shouldUpdateState) {
this.setState({
hasFired: hasFired,
previousPositionInteger: currentPositionInteger
});
}
this.setState({
hasFired: hasFired,
previousPositionInteger: currentPositionInteger
});
}
exports.default = onTime;
{
"name": "react-jw-player",
"version": "1.8.0-alpha.3",
"version": "1.8.0-alpha.4",
"description": "A React component for launching JW Player instances on the client.",

@@ -5,0 +5,0 @@ "main": "dist/react-jw-player.js",

@@ -6,19 +6,11 @@ function onTime(event) {

let shouldUpdateState = false;
if (previousPositionInteger === currentPositionInteger) {
return;
} else if (!hasFired.zeroSecond && currentPositionInteger === 0) {
this.props.onEverySecond(0);
hasFired.zeroSecond = true;
shouldUpdateState = true;
} else {
this.props.onEverySecond(currentPositionInteger);
shouldUpdateState = true;
}
this.props.onEverySecond(currentPositionInteger);
if (!hasFired.threeSeconds && currentPositionInteger >= 3) {
this.props.onThreeSeconds();
hasFired.threeSeconds = true;
shouldUpdateState = true;
}

@@ -29,3 +21,2 @@

hasFired.tenSeconds = true;
shouldUpdateState = true;
}

@@ -36,3 +27,2 @@

hasFired.thirtySeconds = true;
shouldUpdateState = true;
}

@@ -43,3 +33,2 @@

hasFired.twentyFivePercent = true;
shouldUpdateState = true;
}

@@ -50,3 +39,2 @@

hasFired.fiftyPercent = true;
shouldUpdateState = true;
}

@@ -57,3 +45,2 @@

hasFired.seventyFivePercent = true;
shouldUpdateState = true;
}

@@ -64,13 +51,10 @@

hasFired.ninetyFivePercent = true;
shouldUpdateState = true;
}
if (shouldUpdateState) {
this.setState({
hasFired,
previousPositionInteger: currentPositionInteger,
});
}
this.setState({
hasFired,
previousPositionInteger: currentPositionInteger,
});
}
export default onTime;
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