Socket
Socket
Sign inDemoInstall

@gary50613/play-dl

Package Overview
Dependencies
1
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @gary50613/play-dl

YouTube, SoundCloud, Spotify, Deezer searching and streaming for discord-js bots


Version published
Maintainers
1
Created

Readme

Source

Play-dl

⚠️ Play-dl is no longer being maintained. ⚠️

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

Keywords

FAQs

Last updated on 29 May 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc