Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add warning to youtube extractor #1923

Merged
merged 3 commits into from
Jul 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ $ npm install --save ffmpeg-binaries

YouTube streaming is not supported without installing one of the following package. If you want to add support for YouTube playback, you need to install a streaming library. This step is not needed if you do not plan on using youtube source.

* The default Youtube streaming appears to be unstable due to recent changes. It is recommend to install [`discord-player-youtubei`](https://npm.im/discord-player-youtubei)*

```bash
$ npm install --save youtube-ext
# or
Expand Down
5 changes: 5 additions & 0 deletions apps/website/src/data/showcase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,11 @@ export const ShowcaseResource: IShowcase = {
name: 'discord-player-tidal',
description: 'An unofficial discord-player extractor to add support for tidal source.',
url: 'https://npm.im/discord-player-tidal'
},
{
name: "discord-player-youtubei",
description: "Discord Player Youtubei is module that uses the Innertube API to extractor your songs providing more stability and better speeds.",
url: "https://npm.im/discord-player-youtubei"
}
])
};
2 changes: 2 additions & 0 deletions apps/website/src/pages/guide/_guides/welcome/welcome.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ $ npm install --save ffmpeg-binaries

YouTube streaming is not supported without installing one of the following package. If you want to add support for YouTube playback, you need to install a streaming library. This step is not needed if you do not plan on using youtube source.

* The default Youtube streaming appears to be unstable due to recent changes. It is recommend to install [`discord-player-youtubei`](https://npm.im/discord-player-youtubei)*

```bash
$ npm install --save youtube-ext
# or
Expand Down
2 changes: 1 addition & 1 deletion packages/discord-player/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@
"readmeFile": "./README.md",
"tsconfig": "./tsconfig.json"
}
}
}
2 changes: 2 additions & 0 deletions packages/extractor/src/extractors/YoutubeExtractor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ export class YoutubeExtractor extends BaseExtractor<YoutubeExtractorInit> {
this._ytLibName = name;
}

process.emitWarning("YoutubeExtractor uses scraping-based streaming libraries which is known to be unstable at times.\nAn alternative is to use discord-player-youtubei https://npm.im/discord-player-youtubei\nView this GitHub issue for more information: https://github.com/Androz2091/discord-player/issues/1922")

YoutubeExtractor.instance = this;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/tsconfig/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
"devDependencies": {
"typescript": "^5.2.2"
}
}
}
Loading