Creates a Stream [ YouTube or SoundCloud ] class from video or track info for playing.
Example
const info = await video_info('youtube URL')const source = await play.stream_from_info(info) // YouTube Video Streamconst soundInfo = await play.soundcloud('SoundCloud URL')const source = await play.stream_from_info(soundInfo) // SoundCloud Track Streamconst source = await play.stream_from_info(info, { seek : 45 }) // Seeks 45 seconds (approx.) in YouTube Video Streamconst resource = createAudioResource(source.stream, { inputType : source.type}) // Use discordjs voice createAudioResource function. Copy
const info = await video_info('youtube URL')const source = await play.stream_from_info(info) // YouTube Video Streamconst soundInfo = await play.soundcloud('SoundCloud URL')const source = await play.stream_from_info(soundInfo) // SoundCloud Track Streamconst source = await play.stream_from_info(info, { seek : 45 }) // Seeks 45 seconds (approx.) in YouTube Video Streamconst resource = createAudioResource(source.stream, { inputType : source.type}) // Use discordjs voice createAudioResource function.
YouTube video info OR SoundCloud track Class
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 video or track info for playing.
Example
Param: info
YouTube video info OR SoundCloud track Class
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