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

mediaevents

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mediaevents - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0

69

mediaevents.js

@@ -70,2 +70,71 @@ /* mediaEvents

set muted (muted) {
this._muted = muted
}
get muted () {
return this._muted
}
set volume (db) {
this._volume = db
this.clampGain()
if (!this.muted) {
this.gainNode.gain.value = this.dbToVolume(this._volume)
}
}
get volume () {
return this._volume
}
set paused (paused) {
this._paused = paused;
}
get paused () {
return this._paused;
}
clampGain () {
if (this._volume < -80) {
this._volume = -80
} else if (this._volume > 5) {
this._volume = 5
}
}
dbToVolume (db) {
return Math.pow(10, db / 20)
}
mute() {
if (!this.muted) {
this.muted = true
this.gainNode.gain.value = 0
}
}
unmute() {
if (this.muted) {
this.muted = false
this.gainNode.gain.value = this.dbToVolume(this._volume)
}
}
pause () {
if (!this.paused) {
this.audioContext.suspend();
this.paused = true;
}
}
unpause () {
if (this.paused) {
this.audioContext.resume();
this.paused = false;
}
}
getActiveTimingKey (currentTime) {

@@ -72,0 +141,0 @@ const timingKeys = Object.keys(this.timings)

2

package.json
{
"name": "mediaevents",
"version": "3.0.0",
"version": "3.1.0",
"description": "Fire events for specific timeframes easily",

@@ -5,0 +5,0 @@ "main": "mediaevents.js",

@@ -15,3 +15,3 @@ # mediaEvents

```html
<script src="https://unpkg.com/mediaevents@3.0.0/mediaevents.js"></script>
<script src="https://unpkg.com/mediaevents@3.1.0/mediaevents.js"></script>
```

@@ -18,0 +18,0 @@

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