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

discord-player

Package Overview
Dependencies
Maintainers
2
Versions
359
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discord-player - npm Package Compare versions

Comparing version 5.2.0 to 5.2.1-dev

dist/smoothVolume.js

3

dist/index.d.ts

@@ -674,2 +674,4 @@ /// <reference types="node" />

* @property {boolean} [disableVolume=false] If player should disable inline volume
* @property {boolean} [volumeSmoothness=0] The volume transition smoothness between volume changes (lower the value to get better result)
* Setting this or leaving this empty will disable this effect. Example: `volumeSmoothness: 0.1`
* @property {Function} [onBeforeCreateStream] Runs before creating stream

@@ -688,2 +690,3 @@ */

disableVolume?: boolean;
volumeSmoothness?: number;
onBeforeCreateStream?: (track: Track, source: TrackSource, queue: Queue) => Promise<Readable>;

@@ -690,0 +693,0 @@ }

@@ -0,0 +0,0 @@ "use strict";

5

dist/Player.js

@@ -152,3 +152,3 @@ "use strict";

createQueue(guild, queueInitOptions = {}) {
var _a;
var _a, _b;
guild = this.client.guilds.resolve(guild);

@@ -161,3 +161,4 @@ if (!guild)

delete queueInitOptions["metadata"];
(_a = queueInitOptions.ytdlOptions) !== null && _a !== void 0 ? _a : (queueInitOptions.ytdlOptions = this.options.ytdlOptions);
(_a = queueInitOptions.volumeSmoothness) !== null && _a !== void 0 ? _a : (queueInitOptions.volumeSmoothness = 0.1);
(_b = queueInitOptions.ytdlOptions) !== null && _b !== void 0 ? _b : (queueInitOptions.ytdlOptions = this.options.ytdlOptions);
const queue = new Queue_1.Queue(this, guild, queueInitOptions);

@@ -164,0 +165,0 @@ queue.metadata = _meta;

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ "use strict";

@@ -705,2 +705,5 @@ "use strict";

this._filtersUpdate = options.filtersUpdate;
if (resource.volume && typeof this.options.volumeSmoothness === "number") {
Reflect.set(resource.volume, "_smoothing", this.options.volumeSmoothness || 0);
}
this.setVolume(this.options.initialVolume);

@@ -707,0 +710,0 @@ setTimeout(() => {

@@ -77,2 +77,7 @@ "use strict";

*/
/**
* The playlist which track belongs
* @name Track#playlist
* @type {Playlist}
*/
void this._patch(data);

@@ -79,0 +84,0 @@ }

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ "use strict";

{
"name": "discord-player",
"version": "5.2.0",
"version": "5.2.1-dev",
"description": "Complete framework to facilitate music commands using discord.js",

@@ -12,4 +12,7 @@ "main": "dist/index.js",

"exports": {
"require": "./dist/index.js",
"import": "./dist/index.mjs"
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs"
},
"./smoothVolume": "./dist/smoothVolume.js"
},

@@ -64,10 +67,11 @@ "scripts": {

"dependencies": {
"@discordjs/voice": "^0.7.5",
"@discordjs/voice": "^0.8.0",
"discord-ytdl-core": "^5.0.4",
"libsodium-wrappers": "^0.7.9",
"prism-media": "https://codeload.github.com/discord-player/prism-media/tar.gz/main",
"soundcloud-scraper": "^5.0.2",
"spotify-url-info": "^2.2.3",
"tiny-typed-emitter": "^2.1.0",
"youtube-sr": "^4.1.9",
"ytdl-core": "^4.9.1"
"youtube-sr": "^4.1.12",
"ytdl-core": "^4.10.0"
},

@@ -74,0 +78,0 @@ "devDependencies": {

@@ -169,2 +169,16 @@ # Discord Player

### Smooth Volume
Discord Player will make volume transition smooth. To enable this, you need to add this line at the top of your main file:
```js
// CJS
require("discord-player/smoothVolume");
// ESM
import "discord-player/smoothVolume"
```
> ⚠️ Make sure that line is situated at the **TOP** of your **main** file.
### Use cookies

@@ -219,3 +233,3 @@

// track here would be youtube track
return (await playdl.stream(track.url)).stream;
return (await playdl.stream(track.url, { discordPlayerCompatibility : true })).stream;
// we must return readable stream or void (returning void means telling discord-player to look for default extractor)

@@ -222,0 +236,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