Creates a Stream [ YouTube or SoundCloud ] class from a url for playing.
Example
const source = await play.stream('youtube video URL') // YouTube Video Streamconst source = await play.stream('soundcloud track URL') // SoundCloud Track Streamconst source = await play.stream('youtube video URL', { seek : 45 }) // Seeks 45 seconds (approx.) in YouTube Video Streamconst resource = createAudioResource(source.stream, { inputType : source.type}) // Use discordjs voice createAudioResource function. Copy
const source = await play.stream('youtube video URL') // YouTube Video Streamconst source = await play.stream('soundcloud track URL') // SoundCloud Track Streamconst source = await play.stream('youtube video URL', { seek : 45 }) // Seeks 45 seconds (approx.) in YouTube Video Streamconst resource = createAudioResource(source.stream, { inputType : source.type}) // Use discordjs voice createAudioResource function.
Video / Track URL
number seek : No of seconds to seek in stream.
number
string
boolean
A YouTubeStream or SoundCloudStream Stream to play
Optional
Creates a Stream [ YouTube or SoundCloud ] class from a url for playing.
Example
Param: url
Video / Track URL
Param: options
numberseek : No of seconds to seek in stream.stringlanguage : Sets language of searched content [ YouTube search only. ], e.g. "en-US"numberquality : Quality number. [ 0 = Lowest, 1 = Medium, 2 = Highest ]booleanhtmldata : given data is html data or notnumberprecache : No of segments of data to store before looping [YouTube Live Stream only]. [ Defaults to 3 ]booleandiscordPlayerCompatibility : Conversion of Webm to Opus [ Defaults to false ]Returns
A YouTubeStream or SoundCloudStream Stream to play