ziplayer 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/structures/FilterManager.d.ts.map +1 -1
- package/dist/structures/FilterManager.js +3 -1
- package/dist/structures/FilterManager.js.map +1 -1
- package/dist/structures/Player.d.ts +1 -2
- package/dist/structures/Player.d.ts.map +1 -1
- package/dist/structures/Player.js +29 -22
- package/dist/structures/Player.js.map +1 -1
- package/dist/types/extension.d.ts +114 -0
- package/dist/types/extension.d.ts.map +1 -0
- package/dist/types/extension.js +3 -0
- package/dist/types/extension.js.map +1 -0
- package/dist/types/fillter.d.ts +44 -0
- package/dist/types/fillter.d.ts.map +1 -0
- package/dist/types/fillter.js +226 -0
- package/dist/types/fillter.js.map +1 -0
- package/dist/types/index.d.ts +14 -209
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +17 -223
- package/dist/types/index.js.map +1 -1
- package/dist/types/plugin.d.ts +58 -0
- package/dist/types/plugin.d.ts.map +1 -0
- package/dist/types/plugin.js +21 -0
- package/dist/types/plugin.js.map +1 -0
- package/package.json +7 -2
- package/src/structures/FilterManager.ts +267 -262
- package/src/structures/Player.ts +36 -27
- package/src/types/extension.ts +129 -0
- package/src/types/fillter.ts +264 -0
- package/src/types/index.ts +15 -443
- package/src/types/plugin.ts +57 -0
- package/dist/plugins/SoundCloudPlugin.d.ts +0 -22
- package/dist/plugins/SoundCloudPlugin.d.ts.map +0 -1
- package/dist/plugins/SoundCloudPlugin.js +0 -171
- package/dist/plugins/SoundCloudPlugin.js.map +0 -1
- package/dist/plugins/SpotifyPlugin.d.ts +0 -26
- package/dist/plugins/SpotifyPlugin.d.ts.map +0 -1
- package/dist/plugins/SpotifyPlugin.js +0 -183
- package/dist/plugins/SpotifyPlugin.js.map +0 -1
- package/dist/plugins/YouTubePlugin.d.ts +0 -25
- package/dist/plugins/YouTubePlugin.d.ts.map +0 -1
- package/dist/plugins/YouTubePlugin.js +0 -314
- package/dist/plugins/YouTubePlugin.js.map +0 -1
package/dist/types/index.js
CHANGED
|
@@ -1,226 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
nightcore: {
|
|
16
|
-
name: "nightcore",
|
|
17
|
-
ffmpegFilter: "aresample=48000,asetrate=48000*1.5",
|
|
18
|
-
description: "Nightcore",
|
|
19
|
-
category: "speed",
|
|
20
|
-
},
|
|
21
|
-
karaoke: {
|
|
22
|
-
name: "karaoke",
|
|
23
|
-
ffmpegFilter: "stereotools=mlev=0.1",
|
|
24
|
-
description: "Karaoke",
|
|
25
|
-
category: "vocal",
|
|
26
|
-
},
|
|
27
|
-
lofi: {
|
|
28
|
-
name: "lofi",
|
|
29
|
-
ffmpegFilter: "aresample=48000,asetrate=48000*0.9,extrastereo=m=2.5:c=disabled",
|
|
30
|
-
description: "Lo-fi",
|
|
31
|
-
category: "speed",
|
|
32
|
-
},
|
|
33
|
-
"8D": {
|
|
34
|
-
name: "8D",
|
|
35
|
-
ffmpegFilter: "apulsator=hz=0.08",
|
|
36
|
-
description: "8D Effect",
|
|
37
|
-
category: "effect",
|
|
38
|
-
},
|
|
39
|
-
vaporwave: {
|
|
40
|
-
name: "vaporwave",
|
|
41
|
-
ffmpegFilter: "highpass=f=50, lowpass=f=2750, aresample=48000, asetrate=48000*0.85,bass=g=5:f=110:w=0.6, compand=attacks=0:points=-80/-169|-54/-80|-49.5/-64.6|-41.1/-41.1|-25.8/-15|-10.8/-4.5|0/0|20/8.3",
|
|
42
|
-
description: "Vaporwave",
|
|
43
|
-
category: "speed",
|
|
44
|
-
},
|
|
45
|
-
bathroom: {
|
|
46
|
-
name: "bathroom",
|
|
47
|
-
ffmpegFilter: "highpass=f=10, lowpass=f=400, aresample=44100, asetrate=44100*0.85,bass=g=4:f=110:w=0.6, alimiter=1, compand=attacks=0:points=-80/-169|-54/-80|-49.5/-64.6|-41.1/-41.1|-25.8/-15|-10.8/-4.5|0/0|20/8.3",
|
|
48
|
-
description: "Bathroom",
|
|
49
|
-
category: "speed",
|
|
50
|
-
},
|
|
51
|
-
expander: {
|
|
52
|
-
name: "expander",
|
|
53
|
-
ffmpegFilter: "compand=attacks=0:points=-80/-169|-54/-80|-49.5/-64.6|-41.1/-41.1|-25.8/-15|-10.8/-4.5|0/0|20/8.3",
|
|
54
|
-
description: "Expander",
|
|
55
|
-
category: "speed",
|
|
56
|
-
},
|
|
57
|
-
reverse: {
|
|
58
|
-
name: "reverse",
|
|
59
|
-
ffmpegFilter: "areverse",
|
|
60
|
-
description: "Reverse",
|
|
61
|
-
category: "effect",
|
|
62
|
-
},
|
|
63
|
-
echo: {
|
|
64
|
-
name: "echo",
|
|
65
|
-
ffmpegFilter: "aecho=0.8:0.88:60:0.4",
|
|
66
|
-
description: "Echo",
|
|
67
|
-
category: "effect",
|
|
68
|
-
},
|
|
69
|
-
trebleboost: {
|
|
70
|
-
name: "trebleboost",
|
|
71
|
-
ffmpegFilter: "treble=g=10:f=3000:w=0.5",
|
|
72
|
-
description: "Treble Boost",
|
|
73
|
-
category: "eq",
|
|
74
|
-
},
|
|
75
|
-
chorus: {
|
|
76
|
-
name: "chorus",
|
|
77
|
-
ffmpegFilter: "chorus=0.5:0.9:50:0.4:0.25:2",
|
|
78
|
-
description: "Chorus",
|
|
79
|
-
category: "effect",
|
|
80
|
-
},
|
|
81
|
-
flanger: {
|
|
82
|
-
name: "flanger",
|
|
83
|
-
ffmpegFilter: "flanger=delay=10:depth=2:regen=0:width=71:speed=0.5",
|
|
84
|
-
description: "Flanger",
|
|
85
|
-
category: "effect",
|
|
86
|
-
},
|
|
87
|
-
phaser: {
|
|
88
|
-
name: "phaser",
|
|
89
|
-
ffmpegFilter: "aphaser=in_gain=0.4:out_gain=0.74:delay=3.0:decay=0.4:speed=0.5",
|
|
90
|
-
description: "Phaser",
|
|
91
|
-
category: "effect",
|
|
92
|
-
},
|
|
93
|
-
tremolo: {
|
|
94
|
-
name: "tremolo",
|
|
95
|
-
ffmpegFilter: "tremolo=f=4.0:d=0.5",
|
|
96
|
-
description: "Tremolo",
|
|
97
|
-
category: "effect",
|
|
98
|
-
},
|
|
99
|
-
vibrato: {
|
|
100
|
-
name: "vibrato",
|
|
101
|
-
ffmpegFilter: "vibrato=f=5.5:d=0.5",
|
|
102
|
-
description: "Vibrato",
|
|
103
|
-
category: "effect",
|
|
104
|
-
},
|
|
105
|
-
normalize: {
|
|
106
|
-
name: "normalize",
|
|
107
|
-
ffmpegFilter: "loudnorm",
|
|
108
|
-
description: "Normalize",
|
|
109
|
-
category: "volume",
|
|
110
|
-
},
|
|
111
|
-
compressor: {
|
|
112
|
-
name: "compressor",
|
|
113
|
-
ffmpegFilter: "compand=points=-80/-105|-62/-80|-15.4/-15.4|0/-12|20/-7.6",
|
|
114
|
-
description: "Compressor",
|
|
115
|
-
category: "dynamics",
|
|
116
|
-
},
|
|
117
|
-
limiter: {
|
|
118
|
-
name: "limiter",
|
|
119
|
-
ffmpegFilter: "alimiter=level_in=1:level_out=0.8:limit=0.9",
|
|
120
|
-
description: "Limiter",
|
|
121
|
-
category: "dynamics",
|
|
122
|
-
},
|
|
123
|
-
gate: {
|
|
124
|
-
name: "gate",
|
|
125
|
-
ffmpegFilter: "agate=threshold=0.01:ratio=2:attack=1:release=100",
|
|
126
|
-
description: "Gate",
|
|
127
|
-
category: "dynamics",
|
|
128
|
-
},
|
|
129
|
-
lowpass: {
|
|
130
|
-
name: "lowpass",
|
|
131
|
-
ffmpegFilter: "lowpass=f=3000",
|
|
132
|
-
description: "Lowpass",
|
|
133
|
-
category: "filter",
|
|
134
|
-
},
|
|
135
|
-
highpass: {
|
|
136
|
-
name: "highpass",
|
|
137
|
-
ffmpegFilter: "highpass=f=200",
|
|
138
|
-
description: "Highpass",
|
|
139
|
-
category: "filter",
|
|
140
|
-
},
|
|
141
|
-
bandpass: {
|
|
142
|
-
name: "bandpass",
|
|
143
|
-
ffmpegFilter: "bandpass=f=1000:csg=1",
|
|
144
|
-
description: "Bandpass",
|
|
145
|
-
category: "filter",
|
|
146
|
-
},
|
|
147
|
-
allpass: {
|
|
148
|
-
name: "allpass",
|
|
149
|
-
ffmpegFilter: "allpass=f=1000:width_type=h:width=200",
|
|
150
|
-
description: "Allpass",
|
|
151
|
-
category: "filter",
|
|
152
|
-
},
|
|
153
|
-
equalizer: {
|
|
154
|
-
name: "equalizer",
|
|
155
|
-
ffmpegFilter: "equalizer=f=1000:width_type=h:width=200:g=5",
|
|
156
|
-
description: "Equalizer",
|
|
157
|
-
category: "eq",
|
|
158
|
-
},
|
|
159
|
-
reverb: {
|
|
160
|
-
name: "reverb",
|
|
161
|
-
ffmpegFilter: "aecho=0.8:0.88:60:0.4",
|
|
162
|
-
description: "Reverb",
|
|
163
|
-
category: "effect",
|
|
164
|
-
},
|
|
165
|
-
delay: {
|
|
166
|
-
name: "delay",
|
|
167
|
-
ffmpegFilter: "aecho=0.8:0.9:1000:0.3",
|
|
168
|
-
description: "Delay",
|
|
169
|
-
category: "effect",
|
|
170
|
-
},
|
|
171
|
-
distortion: {
|
|
172
|
-
name: "distortion",
|
|
173
|
-
ffmpegFilter: "acrusher=bits=8:mode=log:aa=1",
|
|
174
|
-
description: "Distortion",
|
|
175
|
-
category: "effect",
|
|
176
|
-
},
|
|
177
|
-
bitcrusher: {
|
|
178
|
-
name: "bitcrusher",
|
|
179
|
-
ffmpegFilter: "acrusher=bits=8:mode=log:aa=1",
|
|
180
|
-
description: "Bitcrusher",
|
|
181
|
-
category: "effect",
|
|
182
|
-
},
|
|
183
|
-
robot: {
|
|
184
|
-
name: "robot",
|
|
185
|
-
ffmpegFilter: "afftfilt=real='hypot(re,im)*sin(0)':imag='hypot(re,im)*cos(0)':win_size=512:overlap=0.75",
|
|
186
|
-
description: "Robot",
|
|
187
|
-
category: "vocal",
|
|
188
|
-
},
|
|
189
|
-
slow: {
|
|
190
|
-
name: "slow",
|
|
191
|
-
ffmpegFilter: "atempo=0.5",
|
|
192
|
-
description: "Slow",
|
|
193
|
-
category: "speed",
|
|
194
|
-
},
|
|
195
|
-
fast: {
|
|
196
|
-
name: "fast",
|
|
197
|
-
ffmpegFilter: "atempo=2.0",
|
|
198
|
-
description: "Fast",
|
|
199
|
-
category: "speed",
|
|
200
|
-
},
|
|
201
|
-
mono: {
|
|
202
|
-
name: "mono",
|
|
203
|
-
ffmpegFilter: "pan=mono|c0=0.5*c0+0.5*c1",
|
|
204
|
-
description: "Mono",
|
|
205
|
-
category: "channel",
|
|
206
|
-
},
|
|
207
|
-
stereo: {
|
|
208
|
-
name: "stereo",
|
|
209
|
-
ffmpegFilter: "pan=stereo|c0<c0+c1+c2+c3+c4+c5|c1<c0+c1+c2+c3+c4+c5",
|
|
210
|
-
description: "Stereo",
|
|
211
|
-
category: "channel",
|
|
212
|
-
},
|
|
213
|
-
haas: {
|
|
214
|
-
name: "haas",
|
|
215
|
-
ffmpegFilter: "haas",
|
|
216
|
-
description: "Haas",
|
|
217
|
-
category: "dynamics",
|
|
218
|
-
},
|
|
219
|
-
fadein: {
|
|
220
|
-
name: "fadein",
|
|
221
|
-
ffmpegFilter: "afade=t=in:ss=0:d=5",
|
|
222
|
-
description: "Fadein",
|
|
223
|
-
category: "effect",
|
|
224
|
-
},
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
225
15
|
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./fillter"), exports);
|
|
18
|
+
__exportStar(require("./plugin"), exports);
|
|
19
|
+
__exportStar(require("./extension"), exports);
|
|
226
20
|
//# sourceMappingURL=index.js.map
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAkXA,4CAA0B;AAC1B,2CAAyB;AACzB,8CAA4B"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { SearchResult, StreamInfo, Track } from ".";
|
|
2
|
+
/**
|
|
3
|
+
* Plugin interface
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* const plugin: SourcePlugin = {
|
|
7
|
+
* name: "YouTube",
|
|
8
|
+
* version: "1.0.0"
|
|
9
|
+
* };
|
|
10
|
+
*/
|
|
11
|
+
export interface SourcePlugin {
|
|
12
|
+
name: string;
|
|
13
|
+
version: string;
|
|
14
|
+
canHandle(query: string): boolean;
|
|
15
|
+
search(query: string, requestedBy: string): Promise<SearchResult>;
|
|
16
|
+
getStream(track: Track): Promise<StreamInfo>;
|
|
17
|
+
getRelatedTracks?(track: string | number, opts?: {
|
|
18
|
+
limit?: number;
|
|
19
|
+
offset?: number;
|
|
20
|
+
}): Promise<Track[]>;
|
|
21
|
+
validate?(url: string): boolean;
|
|
22
|
+
extractPlaylist?(url: string, requestedBy: string): Promise<Track[]>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Constructor for a SourcePlugin
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* const plugin = new YouTubePlugin();
|
|
29
|
+
* console.log(`Plugin: ${plugin.name}`);
|
|
30
|
+
*/
|
|
31
|
+
export type SourcePluginCtor<T extends SourcePlugin = SourcePlugin> = new (...args: any[]) => T;
|
|
32
|
+
/**
|
|
33
|
+
* SourcePlugin or SourcePluginCtor
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* const plugin = new YouTubePlugin();
|
|
37
|
+
* console.log(`Plugin: ${plugin.name}`);
|
|
38
|
+
*/
|
|
39
|
+
export type SourcePluginLike = SourcePlugin | SourcePluginCtor;
|
|
40
|
+
/**
|
|
41
|
+
* Configuration options for creating a PlayerManager instance.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* const managerOptions: PlayerManagerOptions = {
|
|
45
|
+
* plugins: [
|
|
46
|
+
* new YouTubePlugin(),
|
|
47
|
+
* new SoundCloudPlugin(),
|
|
48
|
+
* new SpotifyPlugin(),
|
|
49
|
+
* new TTSPlugin({ defaultLang: "en" })
|
|
50
|
+
* ],
|
|
51
|
+
* extensions: [
|
|
52
|
+
* new voiceExt(null, { lang: "en-US" }),
|
|
53
|
+
* new lavalinkExt(null, { nodes: [...] })
|
|
54
|
+
* ],
|
|
55
|
+
* extractorTimeout: 10000
|
|
56
|
+
* };
|
|
57
|
+
*/
|
|
58
|
+
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/types/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;AACzD;;;;;;;;GAQG;AACH,MAAM,WAAW,YAAY;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;IAClC,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAClE,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAC7C,gBAAgB,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;IACxG,QAAQ,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC,eAAe,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;CACrE;AAED;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,YAAY,GAAG,YAAY,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AAEhG;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG,gBAAgB,CAAC;AAE/D;;;;;;;;;;;;;;;;;GAiBG"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* Configuration options for creating a PlayerManager instance.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* const managerOptions: PlayerManagerOptions = {
|
|
8
|
+
* plugins: [
|
|
9
|
+
* new YouTubePlugin(),
|
|
10
|
+
* new SoundCloudPlugin(),
|
|
11
|
+
* new SpotifyPlugin(),
|
|
12
|
+
* new TTSPlugin({ defaultLang: "en" })
|
|
13
|
+
* ],
|
|
14
|
+
* extensions: [
|
|
15
|
+
* new voiceExt(null, { lang: "en-US" }),
|
|
16
|
+
* new lavalinkExt(null, { nodes: [...] })
|
|
17
|
+
* ],
|
|
18
|
+
* extractorTimeout: 10000
|
|
19
|
+
* };
|
|
20
|
+
*/
|
|
21
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../src/types/plugin.ts"],"names":[],"mappings":";;AAuCA;;;;;;;;;;;;;;;;;GAiBG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ziplayer",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "A modular Discord voice player with plugin system",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ZiPlayer",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@discordjs/voice": "^0.19.0",
|
|
30
30
|
"@snazzah/davey": "^0.1.6",
|
|
31
|
-
"discord
|
|
31
|
+
"discord-api-types": "^0.38.37",
|
|
32
32
|
"ffmpeg-static": "^5.2.0",
|
|
33
33
|
"libsodium-wrappers": "^0.7.15",
|
|
34
34
|
"opusscript": "^0.1.1",
|
|
@@ -37,5 +37,10 @@
|
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/node": "^20.0.0",
|
|
39
39
|
"typescript": "^5.0.0"
|
|
40
|
+
},
|
|
41
|
+
"overrides": {
|
|
42
|
+
"prism-media": {
|
|
43
|
+
"opusscript": "^0.1.1"
|
|
44
|
+
}
|
|
40
45
|
}
|
|
41
46
|
}
|