mirror of
https://github.com/YuzuZensai/NekoMelody.git
synced 2026-01-31 14:57:58 +00:00
✨ feat: Simple play-dl stream
This commit is contained in:
5
src/index.ts
Normal file
5
src/index.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { stream } from "./stream";
|
||||
|
||||
export default {
|
||||
stream,
|
||||
};
|
||||
7
src/stream.ts
Normal file
7
src/stream.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { Readable } from "stream";
|
||||
import playdl from "play-dl/play-dl";
|
||||
|
||||
export const stream = async (url: string): Promise<Readable> => {
|
||||
let playdlStream = await playdl.stream(url);
|
||||
return playdlStream.stream;
|
||||
};
|
||||
Reference in New Issue
Block a user