@ziplayer/plugin 0.0.5 → 0.1.1
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/YTSR_README.md +310 -0
- package/dist/SoundCloudPlugin.d.ts +149 -0
- package/dist/SoundCloudPlugin.d.ts.map +1 -1
- package/dist/SoundCloudPlugin.js +149 -0
- package/dist/SoundCloudPlugin.js.map +1 -1
- package/dist/SpotifyPlugin.d.ts +127 -5
- package/dist/SpotifyPlugin.d.ts.map +1 -1
- package/dist/SpotifyPlugin.js +127 -5
- package/dist/SpotifyPlugin.js.map +1 -1
- package/dist/TTSPlugin.d.ts +123 -2
- package/dist/TTSPlugin.d.ts.map +1 -1
- package/dist/TTSPlugin.js +114 -0
- package/dist/TTSPlugin.js.map +1 -1
- package/dist/YTSRPlugin.d.ts +249 -0
- package/dist/YTSRPlugin.d.ts.map +1 -0
- package/dist/YTSRPlugin.js +561 -0
- package/dist/YTSRPlugin.js.map +1 -0
- package/dist/YouTubePlugin.d.ts +148 -0
- package/dist/YouTubePlugin.d.ts.map +1 -1
- package/dist/YouTubePlugin.js +148 -0
- package/dist/YouTubePlugin.js.map +1 -1
- package/dist/index.d.ts +94 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +96 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/src/SoundCloudPlugin.ts +149 -0
- package/src/SpotifyPlugin.ts +312 -190
- package/src/TTSPlugin.ts +130 -3
- package/src/YTSRPlugin.ts +564 -0
- package/src/YouTubePlugin.ts +528 -380
- package/src/index.ts +99 -0
package/src/index.ts
CHANGED
|
@@ -1,4 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Main export file for ZiPlayer plugins.
|
|
3
|
+
*
|
|
4
|
+
* This module exports all available plugins for the ZiPlayer music bot framework.
|
|
5
|
+
* Each plugin provides support for different audio sources and services.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* import { YouTubePlugin, SoundCloudPlugin, SpotifyPlugin, TTSPlugin } from "ziplayer/plugins";
|
|
9
|
+
*
|
|
10
|
+
* const manager = new PlayerManager({
|
|
11
|
+
* plugins: [
|
|
12
|
+
* new YouTubePlugin(),
|
|
13
|
+
* new SoundCloudPlugin(),
|
|
14
|
+
* new SpotifyPlugin(),
|
|
15
|
+
* new TTSPlugin({ defaultLang: "en" })
|
|
16
|
+
* ]
|
|
17
|
+
* });
|
|
18
|
+
*
|
|
19
|
+
* @since 1.0.0
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* YouTube plugin for handling YouTube videos, playlists, and search.
|
|
24
|
+
*
|
|
25
|
+
* Provides comprehensive support for YouTube content including:
|
|
26
|
+
* - Video URLs (youtube.com, youtu.be, music.youtube.com)
|
|
27
|
+
* - Playlist URLs and dynamic mixes
|
|
28
|
+
* - Search functionality
|
|
29
|
+
* - Audio stream extraction
|
|
30
|
+
* - Related track recommendations
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* const youtubePlugin = new YouTubePlugin();
|
|
34
|
+
* const result = await youtubePlugin.search("Never Gonna Give You Up", "user123");
|
|
35
|
+
*/
|
|
1
36
|
export { YouTubePlugin } from "./YouTubePlugin";
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* SoundCloud plugin for handling SoundCloud tracks, playlists, and search.
|
|
40
|
+
*
|
|
41
|
+
* Provides comprehensive support for SoundCloud content including:
|
|
42
|
+
* - Track URLs (soundcloud.com)
|
|
43
|
+
* - Playlist URLs
|
|
44
|
+
* - Search functionality
|
|
45
|
+
* - Audio stream extraction
|
|
46
|
+
* - Related track recommendations
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* const soundcloudPlugin = new SoundCloudPlugin();
|
|
50
|
+
* const result = await soundcloudPlugin.search("chill music", "user123");
|
|
51
|
+
*/
|
|
2
52
|
export { SoundCloudPlugin } from "./SoundCloudPlugin";
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Spotify plugin for metadata extraction and display purposes.
|
|
56
|
+
*
|
|
57
|
+
* **Note:** This plugin only provides metadata extraction and does not support
|
|
58
|
+
* audio streaming. It uses Spotify's public oEmbed endpoint for display purposes.
|
|
59
|
+
*
|
|
60
|
+
* Provides support for:
|
|
61
|
+
* - Track URLs/URIs (spotify:track:...)
|
|
62
|
+
* - Playlist URLs/URIs (spotify:playlist:...)
|
|
63
|
+
* - Album URLs/URIs (spotify:album:...)
|
|
64
|
+
* - Metadata extraction using oEmbed API
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* const spotifyPlugin = new SpotifyPlugin();
|
|
68
|
+
* const result = await spotifyPlugin.search("spotify:track:4iV5W9uYEdYUVa79Axb7Rh", "user123");
|
|
69
|
+
*/
|
|
3
70
|
export { SpotifyPlugin } from "./SpotifyPlugin";
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Text-to-Speech (TTS) plugin for converting text to audio.
|
|
74
|
+
*
|
|
75
|
+
* Provides comprehensive TTS functionality including:
|
|
76
|
+
* - Google TTS integration
|
|
77
|
+
* - Custom TTS provider support
|
|
78
|
+
* - Multiple language support
|
|
79
|
+
* - Configurable speech rate
|
|
80
|
+
* - Flexible query parsing
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* const ttsPlugin = new TTSPlugin({ defaultLang: "en" });
|
|
84
|
+
* const result = await ttsPlugin.search("tts:Hello world", "user123");
|
|
85
|
+
*/
|
|
4
86
|
export { TTSPlugin } from "./TTSPlugin";
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* YTSR plugin for advanced YouTube search without streaming.
|
|
90
|
+
*
|
|
91
|
+
* Provides comprehensive YouTube search functionality including:
|
|
92
|
+
* - Advanced video search with filters (duration, upload date, sort by)
|
|
93
|
+
* - Playlist and channel search
|
|
94
|
+
* - Multiple search types (video, playlist, channel, all)
|
|
95
|
+
* - Metadata extraction without streaming
|
|
96
|
+
* - Support for YouTube URLs
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* const ytsrPlugin = new YTSRPlugin();
|
|
100
|
+
* const result = await ytsrPlugin.search("Never Gonna Give You Up", "user123");
|
|
101
|
+
* const playlistResult = await ytsrPlugin.searchPlaylist("chill music", "user123");
|
|
102
|
+
*/
|
|
103
|
+
export { YTSRPlugin } from "./YTSRPlugin";
|