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

audioplayr

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

audioplayr - npm Package Compare versions

Comparing version 0.8.0 to 0.8.1

6

lib/AudioPlayr.d.ts

@@ -1,2 +0,2 @@

import { IAudioPlayrSettings, IPlaySettings } from "./types";
import { AudioPlayrSettings, PlaySettings } from "./types";
/**

@@ -27,3 +27,3 @@ * Playback for persistent and on-demand sounds and themes.

*/
constructor(settings: IAudioPlayrSettings);
constructor(settings: AudioPlayrSettings);
/**

@@ -60,3 +60,3 @@ * Gets whether this is muted.

*/
play(name: string, settings?: Partial<IPlaySettings>): Promise<void>;
play(name: string, settings?: Partial<PlaySettings>): Promise<void>;
/**

@@ -63,0 +63,0 @@ * Pauses all sounds.

import * as sinon from "sinon";
import { AudioPlayr } from "./AudioPlayr";
import { IAudioPlayrSettings } from "./types";
import { AudioElementSound, ISound } from "./Sound";
export declare const stubAudioPlayr: (settings?: Partial<IAudioPlayrSettings>) => {
import { AudioPlayrSettings } from "./types";
import { AudioElementSound, Sound } from "./Sound";
export declare const stubAudioPlayr: (settings?: Partial<AudioPlayrSettings>) => {
audioPlayer: AudioPlayr;
createSound: sinon.SinonSpy<[string], sinon.SinonStubbedInstance<AudioElementSound>>;
getCreatedSound: (name: string) => sinon.SinonStubbedInstance<ISound>;
getCreatedSound: (name: string) => sinon.SinonStubbedInstance<Sound>;
storage: {

@@ -10,0 +10,0 @@ getMuted: () => boolean;

/**
* Settings to create a new sound.
*/
export interface ISoundSettings {
export interface SoundSettings {
/**

@@ -33,7 +33,7 @@ * Whether all sounds are muted (by default, false).

*/
export declare type ICreateSound = (name: string, settings?: ISoundSettings) => ISound;
export declare type CreateSound = (name: string, settings?: SoundSettings) => Sound;
/**
* Wrapper for a playing sound.
*/
export interface ISound {
export interface Sound {
/**

@@ -86,3 +86,3 @@ * Source name of the sound.

*/
export declare class AudioElementSound implements ISound {
export declare class AudioElementSound implements Sound {
/**

@@ -106,3 +106,3 @@ * Source name of the sound.

*/
constructor(name: string, settings: Partial<ISoundSettings>);
constructor(name: string, settings: Partial<SoundSettings>);
/**

@@ -154,4 +154,4 @@ * Pauses the sound.

*/
static create: (name: string, settings?: Partial<ISoundSettings>) => AudioElementSound;
static create: (name: string, settings?: Partial<SoundSettings>) => AudioElementSound;
}
//# sourceMappingURL=Sound.d.ts.map

@@ -1,6 +0,6 @@

import { ICreateSound } from "./Sound";
import { CreateSound } from "./Sound";
/**
* Settings to play a sound.
*/
export interface IPlaySettings {
export interface PlaySettings {
/**

@@ -29,7 +29,7 @@ * Alias to store this under (by default, its name).

*/
export declare type INameTransform = (name: string) => string;
export declare type NameTransform = (name: string) => string;
/**
* Stores mute and volume status locally.
*/
export interface IAudioSettingsStorage {
export interface AudioSettingsStorage {
getMuted(): boolean | undefined;

@@ -43,16 +43,16 @@ setMuted(value: boolean): void;

*/
export interface IAudioPlayrSettings {
export interface AudioPlayrSettings {
/**
* Creates a new sound.
*/
createSound?: ICreateSound;
createSound?: CreateSound;
/**
* Transforms provided names into file names.
*/
nameTransform?: INameTransform;
nameTransform?: NameTransform;
/**
* Stores mute and volume status locally.
*/
storage: IAudioSettingsStorage;
storage: AudioSettingsStorage;
}
//# sourceMappingURL=types.d.ts.map

@@ -1,3 +0,3 @@

import { IAudioSettingsStorage } from "./types";
export declare const wrapNativeStorage: (storage: Storage) => IAudioSettingsStorage;
import { AudioSettingsStorage } from "./types";
export declare const wrapNativeStorage: (storage: Storage) => AudioSettingsStorage;
//# sourceMappingURL=wrapNativeStorage.d.ts.map
{
"author": {
"email": "joshuakgoldberg@outlook.com",
"email": "me@joshuakgoldberg.com",
"name": "Josh Goldberg"

@@ -12,3 +12,3 @@ },

"devDependencies": {
"shenanigans-manager": "^0.8.0"
"shenanigans-manager": "^0.8.1"
},

@@ -35,3 +35,3 @@ "license": "MIT",

"types": "./lib/index.d.ts",
"version": "0.8.0"
"version": "0.8.1"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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