@iamtraction/play-dl
    Preparing search index...

    Function stream

    Creates a Stream [ YouTube or SoundCloud ] class from a url for playing.

    Example

    const source = await play.stream('youtube video URL') // YouTube Video Stream

    const source = await play.stream('soundcloud track URL') // SoundCloud Track Stream

    const source = await play.stream('youtube video URL', { seek : 45 }) // Seeks 45 seconds (approx.) in YouTube Video Stream

    const resource = createAudioResource(source.stream, {
    inputType : source.type
    }) // Use discordjs voice createAudioResource function.

    Video / Track URL

    number seek : No of seconds to seek in stream.

    • string language : Sets language of searched content [ YouTube search only. ], e.g. "en-US"
    • number quality : Quality number. [ 0 = Lowest, 1 = Medium, 2 = Highest ]
    • boolean htmldata : given data is html data or not
    • number precache : No of segments of data to store before looping [YouTube Live Stream only]. [ Defaults to 3 ]
    • boolean discordPlayerCompatibility : Conversion of Webm to Opus [ Defaults to false ]

    A YouTubeStream or SoundCloudStream Stream to play