magmastream 2.10.3-alpha.0 → 2.10.3-alpha.10
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/statestorage/JsonQueue.js +6 -6
- package/dist/statestorage/MemoryQueue.js +6 -6
- package/dist/statestorage/RedisQueue.js +4 -4
- package/dist/structures/Enums.d.ts +145 -1
- package/dist/structures/Enums.js +148 -1
- package/dist/structures/Filters.d.ts +120 -1
- package/dist/structures/Filters.js +348 -11
- package/dist/structures/Manager.d.ts +9 -0
- package/dist/structures/Manager.js +207 -66
- package/dist/structures/Node.d.ts +90 -3
- package/dist/structures/Node.js +526 -69
- package/dist/structures/Player.d.ts +86 -3
- package/dist/structures/Player.js +309 -21
- package/dist/structures/Rest.d.ts +61 -2
- package/dist/structures/Rest.js +210 -1
- package/dist/structures/Types.d.ts +647 -90
- package/dist/structures/Utils.d.ts +1 -1
- package/dist/structures/Utils.js +75 -31
- package/dist/utils/managerCheck.js +3 -2
- package/dist/wrappers/cloudstorm.js +3 -3
- package/dist/wrappers/discord.js.js +4 -4
- package/dist/wrappers/discordeno.js +3 -3
- package/dist/wrappers/eris.js +3 -3
- package/dist/wrappers/oceanic.js +3 -3
- package/dist/wrappers/seyfert.js +4 -4
- package/package.json +1 -1
|
@@ -102,11 +102,11 @@ class JsonQueue {
|
|
|
102
102
|
const tracks = Array.isArray(track) ? track : [track];
|
|
103
103
|
if (!tracks.length)
|
|
104
104
|
return;
|
|
105
|
-
const current = (await this.getPrevious()).filter((
|
|
106
|
-
const validTracks = tracks.filter((
|
|
105
|
+
const current = (await this.getPrevious()).filter((previousTrack) => previousTrack !== null);
|
|
106
|
+
const validTracks = tracks.filter((track) => track !== null && typeof track.uri === "string");
|
|
107
107
|
if (!validTracks.length)
|
|
108
108
|
return;
|
|
109
|
-
const newTracks = validTracks.filter((
|
|
109
|
+
const newTracks = validTracks.filter((track) => !current.some((previousTrack) => previousTrack.uri === track.uri));
|
|
110
110
|
if (!newTracks.length)
|
|
111
111
|
return;
|
|
112
112
|
const updated = [...current, ...newTracks];
|
|
@@ -391,9 +391,9 @@ class JsonQueue {
|
|
|
391
391
|
const users = [...userMap.keys()];
|
|
392
392
|
const queues = users.map((id) => userMap.get(id));
|
|
393
393
|
const shuffledQueue = [];
|
|
394
|
-
while (queues.some((
|
|
395
|
-
for (const
|
|
396
|
-
const track =
|
|
394
|
+
while (queues.some((queue) => queue.length > 0)) {
|
|
395
|
+
for (const queue of queues) {
|
|
396
|
+
const track = queue.shift();
|
|
397
397
|
if (track)
|
|
398
398
|
shuffledQueue.push(track);
|
|
399
399
|
}
|
|
@@ -43,7 +43,7 @@ class MemoryQueue extends Array {
|
|
|
43
43
|
const isArray = Array.isArray(track);
|
|
44
44
|
const tracks = isArray ? [...track] : [track];
|
|
45
45
|
// Get the track info as a string
|
|
46
|
-
const trackInfo = isArray ? tracks.map((
|
|
46
|
+
const trackInfo = isArray ? tracks.map((track) => Utils_1.JSONUtils.safe(track, 2)).join(", ") : Utils_1.JSONUtils.safe(track, 2);
|
|
47
47
|
// Emit a debug message
|
|
48
48
|
this.manager.emit(Enums_1.ManagerEventTypes.Debug, `[MEMORYQUEUE] Added ${tracks.length} track(s) to queue: ${trackInfo}`);
|
|
49
49
|
const oldPlayer = this.manager.players.get(this.guildId) ? { ...this.manager.players.get(this.guildId) } : null;
|
|
@@ -129,13 +129,13 @@ class MemoryQueue extends Array {
|
|
|
129
129
|
addPrevious(track) {
|
|
130
130
|
try {
|
|
131
131
|
const max = this.manager.options.maxPreviousTracks;
|
|
132
|
-
this.previous = this.previous.filter((
|
|
132
|
+
this.previous = this.previous.filter((previousTrack) => previousTrack !== null);
|
|
133
133
|
if (Array.isArray(track)) {
|
|
134
|
-
const newTracks = track.filter((
|
|
134
|
+
const newTracks = track.filter((track) => !this.previous.some((previousTrack) => previousTrack?.identifier === track.identifier));
|
|
135
135
|
this.previous.push(...newTracks);
|
|
136
136
|
}
|
|
137
137
|
else {
|
|
138
|
-
const exists = this.previous.some((
|
|
138
|
+
const exists = this.previous.some((previousTrack) => previousTrack?.identifier === track.identifier);
|
|
139
139
|
if (!exists) {
|
|
140
140
|
this.previous.push(track);
|
|
141
141
|
}
|
|
@@ -261,7 +261,7 @@ class MemoryQueue extends Array {
|
|
|
261
261
|
* @returns The previous tracks.
|
|
262
262
|
*/
|
|
263
263
|
getPrevious() {
|
|
264
|
-
this.previous = this.previous.map((
|
|
264
|
+
this.previous = this.previous.map((track) => Utils_1.TrackUtils.revive(track));
|
|
265
265
|
return [...this.previous];
|
|
266
266
|
}
|
|
267
267
|
/**
|
|
@@ -274,7 +274,7 @@ class MemoryQueue extends Array {
|
|
|
274
274
|
* @returns The tracks in the queue.
|
|
275
275
|
*/
|
|
276
276
|
getTracks() {
|
|
277
|
-
this.forEach((
|
|
277
|
+
this.forEach((track) => Utils_1.TrackUtils.revive(track));
|
|
278
278
|
return [...this]; // clone to avoid direct mutation
|
|
279
279
|
}
|
|
280
280
|
/**
|
|
@@ -44,7 +44,7 @@ class RedisQueue {
|
|
|
44
44
|
const isArray = Array.isArray(track);
|
|
45
45
|
const tracks = isArray ? track : [track];
|
|
46
46
|
// Serialize tracks
|
|
47
|
-
const serialized = tracks.map((
|
|
47
|
+
const serialized = tracks.map((track) => this.serialize(track));
|
|
48
48
|
const oldPlayer = this.manager.players.get(this.guildId) ? { ...this.manager.players.get(this.guildId) } : null;
|
|
49
49
|
// Set current track if none exists
|
|
50
50
|
if (!(await this.getCurrent())) {
|
|
@@ -524,9 +524,9 @@ class RedisQueue {
|
|
|
524
524
|
const users = [...userMap.keys()];
|
|
525
525
|
const queues = users.map((id) => userMap.get(id));
|
|
526
526
|
const shuffledQueue = [];
|
|
527
|
-
while (queues.some((
|
|
528
|
-
for (const
|
|
529
|
-
const track =
|
|
527
|
+
while (queues.some((queue) => queue.length > 0)) {
|
|
528
|
+
for (const queue of queues) {
|
|
529
|
+
const track = queue.shift();
|
|
530
530
|
if (track)
|
|
531
531
|
shuffledQueue.push(track);
|
|
532
532
|
}
|
|
@@ -43,6 +43,8 @@ export declare enum LoadTypes {
|
|
|
43
43
|
/** Nodelink */
|
|
44
44
|
Artist = "artist",
|
|
45
45
|
/** Nodelink */
|
|
46
|
+
Episode = "episode",
|
|
47
|
+
/** Nodelink */
|
|
46
48
|
Station = "station",
|
|
47
49
|
/** Nodelink */
|
|
48
50
|
Podcast = "podcast",
|
|
@@ -70,6 +72,96 @@ export declare enum SearchPlatform {
|
|
|
70
72
|
YouTube = "ytsearch",
|
|
71
73
|
YouTubeMusic = "ytmsearch"
|
|
72
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* NodeLink Search Platform Enum
|
|
77
|
+
*/
|
|
78
|
+
export declare enum NodeLinkSearchPlatform {
|
|
79
|
+
Unified = "search",
|
|
80
|
+
YouTube = "ytsearch",
|
|
81
|
+
YouTubeMusic = "ytmsearch",
|
|
82
|
+
SoundCloud = "scsearch",
|
|
83
|
+
Spotify = "spsearch",
|
|
84
|
+
AppleMusic = "amsearch",
|
|
85
|
+
Deezer = "dzsearch",
|
|
86
|
+
Tidal = "tdsearch",
|
|
87
|
+
Bandcamp = "bcsearch",
|
|
88
|
+
AmazonMusic = "amazonmusic",
|
|
89
|
+
AmazonMusicSearch = "azsearch",
|
|
90
|
+
Anghami = "agsearch",
|
|
91
|
+
Audiomack = "audiomack",
|
|
92
|
+
AudiomackSearch = "admsearch",
|
|
93
|
+
Audius = "ausearch",
|
|
94
|
+
Bilibili = "bilibili",
|
|
95
|
+
BilibiliSearch = "bilisearch",
|
|
96
|
+
Bluesky = "bksearch",
|
|
97
|
+
EternalBoxDirect = "eternalbox",
|
|
98
|
+
EternalBox = "ebox",
|
|
99
|
+
EternalBoxJukebox = "jukebox",
|
|
100
|
+
Flowery = "flowery",
|
|
101
|
+
FloweryTTS = "ftts",
|
|
102
|
+
Gaana = "gaanasearch",
|
|
103
|
+
GaanaSearch = "gnsearch",
|
|
104
|
+
GoogleDrive = "gdsearch",
|
|
105
|
+
GoogleTTS = "gtts",
|
|
106
|
+
GoogleTTSSpeak = "speak",
|
|
107
|
+
IHeartRadio = "iheartradio",
|
|
108
|
+
IHeartRadioSearch = "ihsearch",
|
|
109
|
+
Jiosaavn = "jssearch",
|
|
110
|
+
LastFM = "lfsearch",
|
|
111
|
+
LazyTTS = "lazypytts",
|
|
112
|
+
LazyTTSAlt = "lazytts",
|
|
113
|
+
LetrasMus = "lmsearch",
|
|
114
|
+
Mixcloud = "mixcloud",
|
|
115
|
+
MixcloudSearch = "mcsearch",
|
|
116
|
+
Netease = "ntsearch",
|
|
117
|
+
NicoVideo = "nicovideo",
|
|
118
|
+
NicoVideoSearch = "ncsearch",
|
|
119
|
+
Pandora = "pdsearch",
|
|
120
|
+
PiperTTS = "pipertts",
|
|
121
|
+
Qobuz = "qbsearch",
|
|
122
|
+
Shazam = "shsearch",
|
|
123
|
+
ShazamAlt = "szsearch",
|
|
124
|
+
SongLink = "slsearch",
|
|
125
|
+
VKMusic = "vksearch",
|
|
126
|
+
Yandex = "ymsearch"
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* NodeLink Recommendation Platform Enum
|
|
130
|
+
*/
|
|
131
|
+
export declare enum NodeLinkRecommendationPlatform {
|
|
132
|
+
Spotify = "sprec",
|
|
133
|
+
Deezer = "dzrec",
|
|
134
|
+
Tidal = "tdrec",
|
|
135
|
+
VKMusic = "vkrec",
|
|
136
|
+
Qobuz = "qbrec",
|
|
137
|
+
Yandex = "ymrec",
|
|
138
|
+
YouTube = "ytrec",
|
|
139
|
+
Jiosaavn = "jsrec",
|
|
140
|
+
LetrasMus = "lmrec"
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* NodeLink Search Type Modifier Enum
|
|
144
|
+
*/
|
|
145
|
+
export declare enum NodeLinkSearchType {
|
|
146
|
+
Track = "track",
|
|
147
|
+
Playlist = "playlist",
|
|
148
|
+
Album = "album",
|
|
149
|
+
Artist = "artist",
|
|
150
|
+
Channel = "channel",
|
|
151
|
+
User = "user",
|
|
152
|
+
Users = "users",
|
|
153
|
+
People = "people",
|
|
154
|
+
Tracks = "tracks",
|
|
155
|
+
Sounds = "sounds",
|
|
156
|
+
Sound = "sound",
|
|
157
|
+
Albums = "albums",
|
|
158
|
+
Playlists = "playlists",
|
|
159
|
+
Set = "set",
|
|
160
|
+
Sets = "sets",
|
|
161
|
+
All = "all",
|
|
162
|
+
Everything = "everything",
|
|
163
|
+
Video = "video"
|
|
164
|
+
}
|
|
73
165
|
/**
|
|
74
166
|
* Player State Event Types Enum
|
|
75
167
|
*/
|
|
@@ -190,6 +282,40 @@ export declare enum ManagerEventTypes {
|
|
|
190
282
|
TrackStart = "trackStart",
|
|
191
283
|
TrackStuck = "trackStuck",
|
|
192
284
|
/** Nodelink */
|
|
285
|
+
MixStarted = "mixStarted",
|
|
286
|
+
/** Nodelink */
|
|
287
|
+
MixEnded = "mixEnded",
|
|
288
|
+
/** Nodelink */
|
|
289
|
+
NodeLinkConnectionStatus = "nodeLinkConnectionStatus",
|
|
290
|
+
/** Nodelink */
|
|
291
|
+
NodeLinkEternalBoxInfo = "nodeLinkEternalBoxInfo",
|
|
292
|
+
/** Nodelink */
|
|
293
|
+
NodeLinkEternalBoxJump = "nodeLinkEternalBoxJump",
|
|
294
|
+
/** Nodelink */
|
|
295
|
+
NodeLinkEvent = "nodeLinkEvent",
|
|
296
|
+
/** Nodelink */
|
|
297
|
+
NodeLinkFiltersChanged = "nodeLinkFiltersChanged",
|
|
298
|
+
/** Nodelink */
|
|
299
|
+
NodeLinkPause = "nodeLinkPause",
|
|
300
|
+
/** Nodelink */
|
|
301
|
+
NodeLinkPlayerConnected = "nodeLinkPlayerConnected",
|
|
302
|
+
/** Nodelink */
|
|
303
|
+
NodeLinkPlayerCreated = "nodeLinkPlayerCreated",
|
|
304
|
+
/** Nodelink */
|
|
305
|
+
NodeLinkPlayerDestroyed = "nodeLinkPlayerDestroyed",
|
|
306
|
+
/** Nodelink */
|
|
307
|
+
NodeLinkPlayerReconnecting = "nodeLinkPlayerReconnecting",
|
|
308
|
+
/** Nodelink */
|
|
309
|
+
NodeLinkSeek = "nodeLinkSeek",
|
|
310
|
+
/** Nodelink */
|
|
311
|
+
NodeLinkStreamMetadata = "nodeLinkStreamMetadata",
|
|
312
|
+
/** Nodelink */
|
|
313
|
+
NodeLinkVolumeChanged = "nodeLinkVolumeChanged",
|
|
314
|
+
/** Nodelink */
|
|
315
|
+
NodeLinkWorkerFailed = "nodeLinkWorkerFailed",
|
|
316
|
+
/** Nodelink */
|
|
317
|
+
PlayerUpdate = "playerUpdate",
|
|
318
|
+
/** Nodelink */
|
|
193
319
|
VoiceReceiverDisconnect = "voiceReceiverDisconnect",
|
|
194
320
|
/** Nodelink */
|
|
195
321
|
VoiceReceiverConnect = "voiceReceiverConnect",
|
|
@@ -198,6 +324,8 @@ export declare enum ManagerEventTypes {
|
|
|
198
324
|
/** Nodelink */
|
|
199
325
|
VoiceReceiverStartSpeaking = "voiceReceiverStartSpeaking",
|
|
200
326
|
/** Nodelink */
|
|
327
|
+
VoiceReceiverData = "voiceReceiverData",
|
|
328
|
+
/** Nodelink */
|
|
201
329
|
VoiceReceiverEndSpeaking = "voiceReceiverEndSpeaking"
|
|
202
330
|
}
|
|
203
331
|
/**
|
|
@@ -208,7 +336,9 @@ export declare enum TrackEndReasonTypes {
|
|
|
208
336
|
LoadFailed = "loadFailed",
|
|
209
337
|
Stopped = "stopped",
|
|
210
338
|
Replaced = "replaced",
|
|
211
|
-
Cleanup = "cleanup"
|
|
339
|
+
Cleanup = "cleanup",
|
|
340
|
+
/** NodeLink gapless transition; the next preloaded track is already starting. */
|
|
341
|
+
Gapless = "gapless"
|
|
212
342
|
}
|
|
213
343
|
/**
|
|
214
344
|
* Severity Types Enum
|
|
@@ -250,10 +380,24 @@ export declare enum AvailableFilters {
|
|
|
250
380
|
Party = "party",
|
|
251
381
|
Pop = "pop",
|
|
252
382
|
Radio = "radio",
|
|
383
|
+
PluginFilters = "pluginFilters",
|
|
384
|
+
SetChorus = "setChorus",
|
|
385
|
+
SetChannelMix = "setChannelMix",
|
|
386
|
+
SetCompressor = "setCompressor",
|
|
253
387
|
SetDistortion = "setDistortion",
|
|
388
|
+
SetEcho = "setEcho",
|
|
389
|
+
SetFlanger = "setFlanger",
|
|
390
|
+
SetHighPass = "setHighPass",
|
|
254
391
|
SetKaraoke = "setKaraoke",
|
|
392
|
+
SetLowPass = "setLowPass",
|
|
393
|
+
SetPhaser = "setPhaser",
|
|
394
|
+
SetPhonograph = "setPhonograph",
|
|
395
|
+
SetReverb = "setReverb",
|
|
255
396
|
SetRotation = "setRotation",
|
|
397
|
+
SetSpatial = "setSpatial",
|
|
398
|
+
SetTape = "setTape",
|
|
256
399
|
SetTimescale = "setTimescale",
|
|
400
|
+
SetTremolo = "setTremolo",
|
|
257
401
|
Slowmo = "slowmo",
|
|
258
402
|
Soft = "soft",
|
|
259
403
|
TrebleBass = "trebleBass",
|
package/dist/structures/Enums.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MagmaStreamErrorNumbers = exports.MagmaStreamErrorCode = exports.AvailableFilters = exports.SponsorBlockSegment = exports.SeverityTypes = exports.TrackEndReasonTypes = exports.ManagerEventTypes = exports.TrackPartial = exports.UseNodeOptions = exports.TrackSourceTypes = exports.PlayerStateEventTypes = exports.SearchPlatform = exports.LoadTypes = exports.StateTypes = exports.AutoPlayPlatform = exports.StateStorageType = void 0;
|
|
3
|
+
exports.MagmaStreamErrorNumbers = exports.MagmaStreamErrorCode = exports.AvailableFilters = exports.SponsorBlockSegment = exports.SeverityTypes = exports.TrackEndReasonTypes = exports.ManagerEventTypes = exports.TrackPartial = exports.UseNodeOptions = exports.TrackSourceTypes = exports.PlayerStateEventTypes = exports.NodeLinkSearchType = exports.NodeLinkRecommendationPlatform = exports.NodeLinkSearchPlatform = exports.SearchPlatform = exports.LoadTypes = exports.StateTypes = exports.AutoPlayPlatform = exports.StateStorageType = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* State Storage Enum
|
|
6
6
|
*/
|
|
@@ -50,6 +50,8 @@ var LoadTypes;
|
|
|
50
50
|
/** Nodelink */
|
|
51
51
|
LoadTypes["Artist"] = "artist";
|
|
52
52
|
/** Nodelink */
|
|
53
|
+
LoadTypes["Episode"] = "episode";
|
|
54
|
+
/** Nodelink */
|
|
53
55
|
LoadTypes["Station"] = "station";
|
|
54
56
|
/** Nodelink */
|
|
55
57
|
LoadTypes["Podcast"] = "podcast";
|
|
@@ -78,6 +80,99 @@ var SearchPlatform;
|
|
|
78
80
|
SearchPlatform["YouTube"] = "ytsearch";
|
|
79
81
|
SearchPlatform["YouTubeMusic"] = "ytmsearch";
|
|
80
82
|
})(SearchPlatform || (exports.SearchPlatform = SearchPlatform = {}));
|
|
83
|
+
/**
|
|
84
|
+
* NodeLink Search Platform Enum
|
|
85
|
+
*/
|
|
86
|
+
var NodeLinkSearchPlatform;
|
|
87
|
+
(function (NodeLinkSearchPlatform) {
|
|
88
|
+
NodeLinkSearchPlatform["Unified"] = "search";
|
|
89
|
+
NodeLinkSearchPlatform["YouTube"] = "ytsearch";
|
|
90
|
+
NodeLinkSearchPlatform["YouTubeMusic"] = "ytmsearch";
|
|
91
|
+
NodeLinkSearchPlatform["SoundCloud"] = "scsearch";
|
|
92
|
+
NodeLinkSearchPlatform["Spotify"] = "spsearch";
|
|
93
|
+
NodeLinkSearchPlatform["AppleMusic"] = "amsearch";
|
|
94
|
+
NodeLinkSearchPlatform["Deezer"] = "dzsearch";
|
|
95
|
+
NodeLinkSearchPlatform["Tidal"] = "tdsearch";
|
|
96
|
+
NodeLinkSearchPlatform["Bandcamp"] = "bcsearch";
|
|
97
|
+
NodeLinkSearchPlatform["AmazonMusic"] = "amazonmusic";
|
|
98
|
+
NodeLinkSearchPlatform["AmazonMusicSearch"] = "azsearch";
|
|
99
|
+
NodeLinkSearchPlatform["Anghami"] = "agsearch";
|
|
100
|
+
NodeLinkSearchPlatform["Audiomack"] = "audiomack";
|
|
101
|
+
NodeLinkSearchPlatform["AudiomackSearch"] = "admsearch";
|
|
102
|
+
NodeLinkSearchPlatform["Audius"] = "ausearch";
|
|
103
|
+
NodeLinkSearchPlatform["Bilibili"] = "bilibili";
|
|
104
|
+
NodeLinkSearchPlatform["BilibiliSearch"] = "bilisearch";
|
|
105
|
+
NodeLinkSearchPlatform["Bluesky"] = "bksearch";
|
|
106
|
+
NodeLinkSearchPlatform["EternalBoxDirect"] = "eternalbox";
|
|
107
|
+
NodeLinkSearchPlatform["EternalBox"] = "ebox";
|
|
108
|
+
NodeLinkSearchPlatform["EternalBoxJukebox"] = "jukebox";
|
|
109
|
+
NodeLinkSearchPlatform["Flowery"] = "flowery";
|
|
110
|
+
NodeLinkSearchPlatform["FloweryTTS"] = "ftts";
|
|
111
|
+
NodeLinkSearchPlatform["Gaana"] = "gaanasearch";
|
|
112
|
+
NodeLinkSearchPlatform["GaanaSearch"] = "gnsearch";
|
|
113
|
+
NodeLinkSearchPlatform["GoogleDrive"] = "gdsearch";
|
|
114
|
+
NodeLinkSearchPlatform["GoogleTTS"] = "gtts";
|
|
115
|
+
NodeLinkSearchPlatform["GoogleTTSSpeak"] = "speak";
|
|
116
|
+
NodeLinkSearchPlatform["IHeartRadio"] = "iheartradio";
|
|
117
|
+
NodeLinkSearchPlatform["IHeartRadioSearch"] = "ihsearch";
|
|
118
|
+
NodeLinkSearchPlatform["Jiosaavn"] = "jssearch";
|
|
119
|
+
NodeLinkSearchPlatform["LastFM"] = "lfsearch";
|
|
120
|
+
NodeLinkSearchPlatform["LazyTTS"] = "lazypytts";
|
|
121
|
+
NodeLinkSearchPlatform["LazyTTSAlt"] = "lazytts";
|
|
122
|
+
NodeLinkSearchPlatform["LetrasMus"] = "lmsearch";
|
|
123
|
+
NodeLinkSearchPlatform["Mixcloud"] = "mixcloud";
|
|
124
|
+
NodeLinkSearchPlatform["MixcloudSearch"] = "mcsearch";
|
|
125
|
+
NodeLinkSearchPlatform["Netease"] = "ntsearch";
|
|
126
|
+
NodeLinkSearchPlatform["NicoVideo"] = "nicovideo";
|
|
127
|
+
NodeLinkSearchPlatform["NicoVideoSearch"] = "ncsearch";
|
|
128
|
+
NodeLinkSearchPlatform["Pandora"] = "pdsearch";
|
|
129
|
+
NodeLinkSearchPlatform["PiperTTS"] = "pipertts";
|
|
130
|
+
NodeLinkSearchPlatform["Qobuz"] = "qbsearch";
|
|
131
|
+
NodeLinkSearchPlatform["Shazam"] = "shsearch";
|
|
132
|
+
NodeLinkSearchPlatform["ShazamAlt"] = "szsearch";
|
|
133
|
+
NodeLinkSearchPlatform["SongLink"] = "slsearch";
|
|
134
|
+
NodeLinkSearchPlatform["VKMusic"] = "vksearch";
|
|
135
|
+
NodeLinkSearchPlatform["Yandex"] = "ymsearch";
|
|
136
|
+
})(NodeLinkSearchPlatform || (exports.NodeLinkSearchPlatform = NodeLinkSearchPlatform = {}));
|
|
137
|
+
/**
|
|
138
|
+
* NodeLink Recommendation Platform Enum
|
|
139
|
+
*/
|
|
140
|
+
var NodeLinkRecommendationPlatform;
|
|
141
|
+
(function (NodeLinkRecommendationPlatform) {
|
|
142
|
+
NodeLinkRecommendationPlatform["Spotify"] = "sprec";
|
|
143
|
+
NodeLinkRecommendationPlatform["Deezer"] = "dzrec";
|
|
144
|
+
NodeLinkRecommendationPlatform["Tidal"] = "tdrec";
|
|
145
|
+
NodeLinkRecommendationPlatform["VKMusic"] = "vkrec";
|
|
146
|
+
NodeLinkRecommendationPlatform["Qobuz"] = "qbrec";
|
|
147
|
+
NodeLinkRecommendationPlatform["Yandex"] = "ymrec";
|
|
148
|
+
NodeLinkRecommendationPlatform["YouTube"] = "ytrec";
|
|
149
|
+
NodeLinkRecommendationPlatform["Jiosaavn"] = "jsrec";
|
|
150
|
+
NodeLinkRecommendationPlatform["LetrasMus"] = "lmrec";
|
|
151
|
+
})(NodeLinkRecommendationPlatform || (exports.NodeLinkRecommendationPlatform = NodeLinkRecommendationPlatform = {}));
|
|
152
|
+
/**
|
|
153
|
+
* NodeLink Search Type Modifier Enum
|
|
154
|
+
*/
|
|
155
|
+
var NodeLinkSearchType;
|
|
156
|
+
(function (NodeLinkSearchType) {
|
|
157
|
+
NodeLinkSearchType["Track"] = "track";
|
|
158
|
+
NodeLinkSearchType["Playlist"] = "playlist";
|
|
159
|
+
NodeLinkSearchType["Album"] = "album";
|
|
160
|
+
NodeLinkSearchType["Artist"] = "artist";
|
|
161
|
+
NodeLinkSearchType["Channel"] = "channel";
|
|
162
|
+
NodeLinkSearchType["User"] = "user";
|
|
163
|
+
NodeLinkSearchType["Users"] = "users";
|
|
164
|
+
NodeLinkSearchType["People"] = "people";
|
|
165
|
+
NodeLinkSearchType["Tracks"] = "tracks";
|
|
166
|
+
NodeLinkSearchType["Sounds"] = "sounds";
|
|
167
|
+
NodeLinkSearchType["Sound"] = "sound";
|
|
168
|
+
NodeLinkSearchType["Albums"] = "albums";
|
|
169
|
+
NodeLinkSearchType["Playlists"] = "playlists";
|
|
170
|
+
NodeLinkSearchType["Set"] = "set";
|
|
171
|
+
NodeLinkSearchType["Sets"] = "sets";
|
|
172
|
+
NodeLinkSearchType["All"] = "all";
|
|
173
|
+
NodeLinkSearchType["Everything"] = "everything";
|
|
174
|
+
NodeLinkSearchType["Video"] = "video";
|
|
175
|
+
})(NodeLinkSearchType || (exports.NodeLinkSearchType = NodeLinkSearchType = {}));
|
|
81
176
|
/**
|
|
82
177
|
* Player State Event Types Enum
|
|
83
178
|
*/
|
|
@@ -203,6 +298,40 @@ var ManagerEventTypes;
|
|
|
203
298
|
ManagerEventTypes["TrackStart"] = "trackStart";
|
|
204
299
|
ManagerEventTypes["TrackStuck"] = "trackStuck";
|
|
205
300
|
/** Nodelink */
|
|
301
|
+
ManagerEventTypes["MixStarted"] = "mixStarted";
|
|
302
|
+
/** Nodelink */
|
|
303
|
+
ManagerEventTypes["MixEnded"] = "mixEnded";
|
|
304
|
+
/** Nodelink */
|
|
305
|
+
ManagerEventTypes["NodeLinkConnectionStatus"] = "nodeLinkConnectionStatus";
|
|
306
|
+
/** Nodelink */
|
|
307
|
+
ManagerEventTypes["NodeLinkEternalBoxInfo"] = "nodeLinkEternalBoxInfo";
|
|
308
|
+
/** Nodelink */
|
|
309
|
+
ManagerEventTypes["NodeLinkEternalBoxJump"] = "nodeLinkEternalBoxJump";
|
|
310
|
+
/** Nodelink */
|
|
311
|
+
ManagerEventTypes["NodeLinkEvent"] = "nodeLinkEvent";
|
|
312
|
+
/** Nodelink */
|
|
313
|
+
ManagerEventTypes["NodeLinkFiltersChanged"] = "nodeLinkFiltersChanged";
|
|
314
|
+
/** Nodelink */
|
|
315
|
+
ManagerEventTypes["NodeLinkPause"] = "nodeLinkPause";
|
|
316
|
+
/** Nodelink */
|
|
317
|
+
ManagerEventTypes["NodeLinkPlayerConnected"] = "nodeLinkPlayerConnected";
|
|
318
|
+
/** Nodelink */
|
|
319
|
+
ManagerEventTypes["NodeLinkPlayerCreated"] = "nodeLinkPlayerCreated";
|
|
320
|
+
/** Nodelink */
|
|
321
|
+
ManagerEventTypes["NodeLinkPlayerDestroyed"] = "nodeLinkPlayerDestroyed";
|
|
322
|
+
/** Nodelink */
|
|
323
|
+
ManagerEventTypes["NodeLinkPlayerReconnecting"] = "nodeLinkPlayerReconnecting";
|
|
324
|
+
/** Nodelink */
|
|
325
|
+
ManagerEventTypes["NodeLinkSeek"] = "nodeLinkSeek";
|
|
326
|
+
/** Nodelink */
|
|
327
|
+
ManagerEventTypes["NodeLinkStreamMetadata"] = "nodeLinkStreamMetadata";
|
|
328
|
+
/** Nodelink */
|
|
329
|
+
ManagerEventTypes["NodeLinkVolumeChanged"] = "nodeLinkVolumeChanged";
|
|
330
|
+
/** Nodelink */
|
|
331
|
+
ManagerEventTypes["NodeLinkWorkerFailed"] = "nodeLinkWorkerFailed";
|
|
332
|
+
/** Nodelink */
|
|
333
|
+
ManagerEventTypes["PlayerUpdate"] = "playerUpdate";
|
|
334
|
+
/** Nodelink */
|
|
206
335
|
ManagerEventTypes["VoiceReceiverDisconnect"] = "voiceReceiverDisconnect";
|
|
207
336
|
/** Nodelink */
|
|
208
337
|
ManagerEventTypes["VoiceReceiverConnect"] = "voiceReceiverConnect";
|
|
@@ -211,6 +340,8 @@ var ManagerEventTypes;
|
|
|
211
340
|
/** Nodelink */
|
|
212
341
|
ManagerEventTypes["VoiceReceiverStartSpeaking"] = "voiceReceiverStartSpeaking";
|
|
213
342
|
/** Nodelink */
|
|
343
|
+
ManagerEventTypes["VoiceReceiverData"] = "voiceReceiverData";
|
|
344
|
+
/** Nodelink */
|
|
214
345
|
ManagerEventTypes["VoiceReceiverEndSpeaking"] = "voiceReceiverEndSpeaking";
|
|
215
346
|
})(ManagerEventTypes || (exports.ManagerEventTypes = ManagerEventTypes = {}));
|
|
216
347
|
/**
|
|
@@ -223,6 +354,8 @@ var TrackEndReasonTypes;
|
|
|
223
354
|
TrackEndReasonTypes["Stopped"] = "stopped";
|
|
224
355
|
TrackEndReasonTypes["Replaced"] = "replaced";
|
|
225
356
|
TrackEndReasonTypes["Cleanup"] = "cleanup";
|
|
357
|
+
/** NodeLink gapless transition; the next preloaded track is already starting. */
|
|
358
|
+
TrackEndReasonTypes["Gapless"] = "gapless";
|
|
226
359
|
})(TrackEndReasonTypes || (exports.TrackEndReasonTypes = TrackEndReasonTypes = {}));
|
|
227
360
|
/**
|
|
228
361
|
* Severity Types Enum
|
|
@@ -267,10 +400,24 @@ var AvailableFilters;
|
|
|
267
400
|
AvailableFilters["Party"] = "party";
|
|
268
401
|
AvailableFilters["Pop"] = "pop";
|
|
269
402
|
AvailableFilters["Radio"] = "radio";
|
|
403
|
+
AvailableFilters["PluginFilters"] = "pluginFilters";
|
|
404
|
+
AvailableFilters["SetChorus"] = "setChorus";
|
|
405
|
+
AvailableFilters["SetChannelMix"] = "setChannelMix";
|
|
406
|
+
AvailableFilters["SetCompressor"] = "setCompressor";
|
|
270
407
|
AvailableFilters["SetDistortion"] = "setDistortion";
|
|
408
|
+
AvailableFilters["SetEcho"] = "setEcho";
|
|
409
|
+
AvailableFilters["SetFlanger"] = "setFlanger";
|
|
410
|
+
AvailableFilters["SetHighPass"] = "setHighPass";
|
|
271
411
|
AvailableFilters["SetKaraoke"] = "setKaraoke";
|
|
412
|
+
AvailableFilters["SetLowPass"] = "setLowPass";
|
|
413
|
+
AvailableFilters["SetPhaser"] = "setPhaser";
|
|
414
|
+
AvailableFilters["SetPhonograph"] = "setPhonograph";
|
|
415
|
+
AvailableFilters["SetReverb"] = "setReverb";
|
|
272
416
|
AvailableFilters["SetRotation"] = "setRotation";
|
|
417
|
+
AvailableFilters["SetSpatial"] = "setSpatial";
|
|
418
|
+
AvailableFilters["SetTape"] = "setTape";
|
|
273
419
|
AvailableFilters["SetTimescale"] = "setTimescale";
|
|
420
|
+
AvailableFilters["SetTremolo"] = "setTremolo";
|
|
274
421
|
AvailableFilters["Slowmo"] = "slowmo";
|
|
275
422
|
AvailableFilters["Soft"] = "soft";
|
|
276
423
|
AvailableFilters["TrebleBass"] = "trebleBass";
|
|
@@ -2,14 +2,28 @@ import { Band } from "../utils/filtersEqualizers";
|
|
|
2
2
|
import { AvailableFilters } from "./Enums";
|
|
3
3
|
import { Manager } from "./Manager";
|
|
4
4
|
import { Player } from "./Player";
|
|
5
|
-
import { DistortionOptions, KaraokeOptions, ReverbOptions, RotationOptions, TimescaleOptions, VibratoOptions } from "./Types";
|
|
5
|
+
import { ChannelMixOptions, ChorusOptions, CompressorOptions, DistortionOptions, EchoOptions, FlangerOptions, HighPassOptions, KaraokeOptions, LavalinkFilters, LowPassOptions, PhaserOptions, PhonographOptions, ReverbOptions, RotationOptions, SpatialOptions, TapeOptions, TimescaleOptions, TremoloOptions, VibratoOptions } from "./Types";
|
|
6
6
|
export declare class Filters {
|
|
7
|
+
private static readonly defaultPluginFilterPlugins;
|
|
7
8
|
distortion: DistortionOptions | null;
|
|
8
9
|
equalizer: Band[];
|
|
9
10
|
karaoke: KaraokeOptions | null;
|
|
10
11
|
rotation: RotationOptions | null;
|
|
11
12
|
timescale: TimescaleOptions | null;
|
|
13
|
+
tremoloOptions: TremoloOptions | null;
|
|
12
14
|
vibrato: VibratoOptions | null;
|
|
15
|
+
channelMix: ChannelMixOptions | null;
|
|
16
|
+
lowPass: LowPassOptions | null;
|
|
17
|
+
highpass: HighPassOptions | null;
|
|
18
|
+
echo: EchoOptions | null;
|
|
19
|
+
chorus: ChorusOptions | null;
|
|
20
|
+
compressor: CompressorOptions | null;
|
|
21
|
+
flanger: FlangerOptions | null;
|
|
22
|
+
phaser: PhaserOptions | null;
|
|
23
|
+
phonograph: PhonographOptions | null;
|
|
24
|
+
spatial: SpatialOptions | null;
|
|
25
|
+
tape: TapeOptions | null;
|
|
26
|
+
pluginFilters: Record<string, unknown>;
|
|
13
27
|
reverb: ReverbOptions | null;
|
|
14
28
|
volume: number;
|
|
15
29
|
bassBoostlevel: number;
|
|
@@ -30,6 +44,10 @@ export declare class Filters {
|
|
|
30
44
|
* of the Filters class for method chaining.
|
|
31
45
|
*/
|
|
32
46
|
updateFilters(): Promise<this>;
|
|
47
|
+
/** Synchronizes local filter state from a NodeLink FiltersChangedEvent without issuing another REST update. */
|
|
48
|
+
syncFromNode(payload: LavalinkFilters | {
|
|
49
|
+
filters: LavalinkFilters;
|
|
50
|
+
}): this;
|
|
33
51
|
/**
|
|
34
52
|
* Applies a specific filter to the player.
|
|
35
53
|
*
|
|
@@ -42,6 +60,8 @@ export declare class Filters {
|
|
|
42
60
|
*/
|
|
43
61
|
private applyFilter;
|
|
44
62
|
private emitPlayersTasteUpdate;
|
|
63
|
+
private assertPluginFiltersSupported;
|
|
64
|
+
private assertNodeLinkExtraFilterSupported;
|
|
45
65
|
/**
|
|
46
66
|
* Sets the status of a specific filter.
|
|
47
67
|
*
|
|
@@ -112,6 +132,105 @@ export declare class Filters {
|
|
|
112
132
|
* @returns {Promise<this>} - Returns the current instance of the Filters class for method chaining.
|
|
113
133
|
*/
|
|
114
134
|
setVibrato(vibrato?: VibratoOptions): Promise<this>;
|
|
135
|
+
/**
|
|
136
|
+
* Sets the tremolo options on the audio.
|
|
137
|
+
*
|
|
138
|
+
* @param {TremoloOptions} [tremolo] - The tremolo settings to apply (frequency, depth).
|
|
139
|
+
* @returns {Promise<this>} - Returns the current instance of the Filters class for method chaining.
|
|
140
|
+
*/
|
|
141
|
+
setTremolo(tremolo?: TremoloOptions): Promise<this>;
|
|
142
|
+
/**
|
|
143
|
+
* Sets the stereo channel mix options on the audio.
|
|
144
|
+
*
|
|
145
|
+
* @param {ChannelMixOptions} [channelMix] - The channel mix settings to apply.
|
|
146
|
+
* @returns {Promise<this>} - Returns the current instance of the Filters class for method chaining.
|
|
147
|
+
*/
|
|
148
|
+
setChannelMix(channelMix?: ChannelMixOptions): Promise<this>;
|
|
149
|
+
/**
|
|
150
|
+
* Sets the low pass filter options on the audio.
|
|
151
|
+
*
|
|
152
|
+
* @param {LowPassOptions} [lowPass] - The low pass settings to apply.
|
|
153
|
+
* @returns {Promise<this>} - Returns the current instance of the Filters class for method chaining.
|
|
154
|
+
*/
|
|
155
|
+
setLowPass(lowPass?: LowPassOptions): Promise<this>;
|
|
156
|
+
/**
|
|
157
|
+
* Sets the NodeLink high pass filter options on the audio.
|
|
158
|
+
* @param {HighPassOptions} [highpass] - The high pass settings to apply.
|
|
159
|
+
* @returns {Promise<this>} - Returns the current instance of the Filters class for method chaining.
|
|
160
|
+
*/
|
|
161
|
+
setHighPass(highpass?: HighPassOptions): Promise<this>;
|
|
162
|
+
/**
|
|
163
|
+
* Sets the NodeLink echo filter options on the audio.
|
|
164
|
+
* @param {EchoOptions} [echo] - The echo settings to apply.
|
|
165
|
+
* @returns {Promise<this>} - Returns the current instance of the Filters class for method chaining.
|
|
166
|
+
*/
|
|
167
|
+
setEcho(echo?: EchoOptions): Promise<this>;
|
|
168
|
+
/**
|
|
169
|
+
* Sets the NodeLink reverb filter options on the audio.
|
|
170
|
+
* @param {ReverbOptions} [reverb] - The reverb settings to apply.
|
|
171
|
+
* @returns {Promise<this>} - Returns the current instance of the Filters class for method chaining.
|
|
172
|
+
*/
|
|
173
|
+
setReverb(reverb?: ReverbOptions): Promise<this>;
|
|
174
|
+
/**
|
|
175
|
+
* Sets the NodeLink chorus filter options on the audio.
|
|
176
|
+
* @param {ChorusOptions} [chorus] - The chorus settings to apply.
|
|
177
|
+
* @returns {Promise<this>} - Returns the current instance of the Filters class for method chaining.
|
|
178
|
+
*/
|
|
179
|
+
setChorus(chorus?: ChorusOptions): Promise<this>;
|
|
180
|
+
/**
|
|
181
|
+
* Sets the NodeLink compressor filter options on the audio.
|
|
182
|
+
* @param {CompressorOptions} [compressor] - The compressor settings to apply.
|
|
183
|
+
* @returns {Promise<this>} - Returns the current instance of the Filters class for method chaining.
|
|
184
|
+
*/
|
|
185
|
+
setCompressor(compressor?: CompressorOptions): Promise<this>;
|
|
186
|
+
/**
|
|
187
|
+
* Sets the NodeLink flanger filter options on the audio.
|
|
188
|
+
* @param {FlangerOptions} [flanger] - The flanger settings to apply.
|
|
189
|
+
* @returns {Promise<this>} - Returns the current instance of the Filters class for method chaining.
|
|
190
|
+
*/
|
|
191
|
+
setFlanger(flanger?: FlangerOptions): Promise<this>;
|
|
192
|
+
/**
|
|
193
|
+
* Sets the NodeLink phaser filter options on the audio.
|
|
194
|
+
* @param {PhaserOptions} [phaser] - The phaser settings to apply.
|
|
195
|
+
* @returns {Promise<this>} - Returns the current instance of the Filters class for method chaining.
|
|
196
|
+
*/
|
|
197
|
+
setPhaser(phaser?: PhaserOptions): Promise<this>;
|
|
198
|
+
/**
|
|
199
|
+
* Sets the NodeLink phonograph filter options on the audio.
|
|
200
|
+
* @param {PhonographOptions} [phonograph] - The phonograph settings to apply.
|
|
201
|
+
* @returns {Promise<this>} - Returns the current instance of the Filters class for method chaining.
|
|
202
|
+
*/
|
|
203
|
+
setPhonograph(phonograph?: PhonographOptions): Promise<this>;
|
|
204
|
+
/**
|
|
205
|
+
* Sets the NodeLink spatial filter options on the audio.
|
|
206
|
+
* @param {SpatialOptions} [spatial] - The spatial settings to apply.
|
|
207
|
+
* @returns {Promise<this>} - Returns the current instance of the Filters class for method chaining.
|
|
208
|
+
*/
|
|
209
|
+
setSpatial(spatial?: SpatialOptions): Promise<this>;
|
|
210
|
+
/**
|
|
211
|
+
* Sets the NodeLink tape filter options on the audio.
|
|
212
|
+
* @param {TapeOptions} [tape] - The tape settings to apply.
|
|
213
|
+
* @returns {Promise<this>} - Returns the current instance of the Filters class for method chaining.
|
|
214
|
+
*/
|
|
215
|
+
setTape(tape?: TapeOptions): Promise<this>;
|
|
216
|
+
setNodeLinkHighPass(highpass?: HighPassOptions): Promise<this>;
|
|
217
|
+
setNodeLinkEcho(echo?: EchoOptions): Promise<this>;
|
|
218
|
+
setNodeLinkReverb(reverb?: ReverbOptions): Promise<this>;
|
|
219
|
+
setNodeLinkChorus(chorus?: ChorusOptions): Promise<this>;
|
|
220
|
+
setNodeLinkCompressor(compressor?: CompressorOptions): Promise<this>;
|
|
221
|
+
setNodeLinkFlanger(flanger?: FlangerOptions): Promise<this>;
|
|
222
|
+
setNodeLinkPhaser(phaser?: PhaserOptions): Promise<this>;
|
|
223
|
+
setNodeLinkPhonograph(phonograph?: PhonographOptions): Promise<this>;
|
|
224
|
+
setNodeLinkSpatial(spatial?: SpatialOptions): Promise<this>;
|
|
225
|
+
setNodeLinkTape(tape?: TapeOptions): Promise<this>;
|
|
226
|
+
/**
|
|
227
|
+
* Sets plugin-provided filter options on the audio.
|
|
228
|
+
*
|
|
229
|
+
* @param {Record<string, unknown>} [pluginFilters] - Plugin filter settings keyed by plugin filter name.
|
|
230
|
+
* @param {string | string[]} [requiredPluginNames] - The plugin name(s) that can handle the provided filters. Defaults to LavaDSPX.
|
|
231
|
+
* @returns {Promise<this>} - Returns the current instance of the Filters class for method chaining.
|
|
232
|
+
*/
|
|
233
|
+
setPluginFilters(pluginFilters?: Record<string, unknown>, requiredPluginNames?: string | string[]): Promise<this>;
|
|
115
234
|
/**
|
|
116
235
|
* Sets the own rotation options effect to the audio.
|
|
117
236
|
*
|