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

@twilio/audioplayer

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

@twilio/audioplayer - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

2

package.json
{
"name": "@twilio/audioplayer",
"version": "1.0.4",
"version": "1.0.5",
"description": "An HTMLAudioElement-like implementation that uses AudioContext to circumvent browser limitations.",

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

@@ -123,2 +123,12 @@ import Deferred from './Deferred';

/**
* The srcObject of the HTMLMediaElement
*/
get srcObject(): MediaStream | MediaSource | Blob | undefined {
return this._audioElement.srcObject;
}
set srcObject(srcObject: MediaStream | MediaSource | Blob | undefined) {
this._audioElement.srcObject = srcObject;
}
/**
* The current sinkId of the device audio is being played through.

@@ -228,5 +238,2 @@ */

if (this._audioElement.srcObject) {
this.addEventListener('ended', () => {
this._audioElement.srcObject = null;
});
return this._audioElement.play();

@@ -233,0 +240,0 @@ }

@@ -168,12 +168,2 @@ /* tslint:disable:max-classes-per-file no-empty */

it('should clear srcObject if a sinkId is set', () => {
audioPlayer.setSinkId('foo');
return audioPlayer.play().then(() => {
audioContext.audioNodes[0].dispatchEvent('ended');
assert.equal(AudioFactory.instances.length, 1);
assert.equal(AudioFactory.instances[0].srcObject, null);
});
});
context('when already playing', () => {

@@ -180,0 +170,0 @@ it('should not create another audio node', () => {

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