Alex Clarke 7ae5bc3e13
Fix yt_validate stack overflow issue
https://github.com/play-dl/play-dl/issues/304

yt_validate was recursing forever because the regex for removing
the 'list=xxxx' parameter was looking for one or more characters
after list=, rather than 0 or more, so removed nothing if
no value was provided.

e.g https://www.youtube.com/playlist?list=

Have tested this locally but would appreciate a second look before merging.
2022-06-09 10:11:01 +01:00
2022-05-30 15:42:14 -04:00
2022-01-24 18:31:00 -06:00
2021-11-23 11:21:43 +05:30
2021-11-19 11:03:32 +05:30
2021-09-17 14:36:32 +05:30
2021-10-06 17:33:04 +05:30
2022-05-30 15:27:23 -04:00
2022-05-30 15:27:23 -04:00
2022-05-30 14:54:09 -04:00

Play-dl

A light-weight YouTube, SoundCloud, Spotify and Deezer streaming and searching library.

  • Search by video, playlist/album, channel/artist
  • Stream audio from YouTube and SoundCloud

Why play-dl ?

ytdl-core has some issues with miniget and also stream abort issues. On the other hand, youtube-dl is a perfect alternative but it takes time to launch. Hence, play-dl is created to avoid these issues along with providing comparatively faster performance than others.

Discord NPM

Support

You can contact us for support on our chat server.

Installation

Node.js 16.0.0 or newer is required.

npm install play-dl@latest
pnpm add play-dl@latest
yarn add play-dl@latest

Importing

TypeScript:

import play from 'play-dl'; // Everything

import { video_basic_info, stream } from 'play-dl'; // Individual functions

CommonJS modules:

const play = require('play-dl'); // Everything

// Individual functions by using destructuring
const { video_basic_info, stream } = require('play-dl');

ES6 modules:

import play from 'play-dl'; // Everything

import { video_basic_info, stream } from 'play-dl'; // Individual functions

Compatibility issues - discord-player

Because discord-player doesn't work with raw opus packets you need to enable the compatibility mode in play-dl, if you want to use both frameworks together.

  • To fix the playback of YouTube videos with discord-player, you can disable some of play-dl's optimisations and fixes by setting the discordPlayerCompatibility option for stream and stream_from_info to true

  • The discordPlayerCompatiblity option might break the playback of long YouTube videos.

  • Even with the discordPlayerCompatibility option set you will not be able to use the seek option for stream and stream_from_info.

Documentation

Examples

Instructions

Description
No description provided
Readme 2.2 MiB
Languages
TypeScript 100%