Open retrouser955 opened 2 months ago
Can you provide an example
Can you provide an example
player.extractors.register(SpotifyExtractor, {
async createStream(ext, url) {
const trackData = await ext.handle(url)
const search = searchOnYoutube(`${trackData.author} - ${trackData.title}`)
const streamURL = getStreamURL(search.url)
return streamURL
}
})
player.extractors.register(SpotifyExtractor, {
async createStream(ext, track) {
const search = searchOnYoutube(`${track.author} - ${track.title}`)
const streamURL = getStreamURL(search.url)
return streamURL
}
})
Ok doesn't seem complicated, lets add track as the 3rd parameter to avoid breaking changes
Ok doesn't seem complicated, lets add track as the 3rd parameter to avoid breaking changes
Alright thanks!
Describe the feature you would like Instead of
createStream(ext, url)
being, expose the actual track instead of just the URL (createStream(track)
). This would make devx way easier.@discord-player/extractor