mirror of
https://github.com/YuzuZensai/play-dl-test.git
synced 2026-01-31 14:58:05 +00:00
Update README.md
This commit is contained in:
@@ -44,7 +44,7 @@ if(validate(url)) // Will return true if url is a YouTube url
|
|||||||
### stream(url : `string`)
|
### stream(url : `string`)
|
||||||
*This is basic to create a youtube stream from a url.*
|
*This is basic to create a youtube stream from a url.*
|
||||||
```js
|
```js
|
||||||
let source = await stream(<url>) // This will create a stream Class which contains type and stream to be played.
|
let source = await stream("url") // This will create a stream Class which contains type and stream to be played.
|
||||||
let resource = createAudioResource(source.stream, {
|
let resource = createAudioResource(source.stream, {
|
||||||
inputType : source.type
|
inputType : source.type
|
||||||
}) // This creates resource for playing
|
}) // This creates resource for playing
|
||||||
@@ -53,7 +53,7 @@ if(validate(url)) // Will return true if url is a YouTube url
|
|||||||
### stream_from_info(info : `infoData`)
|
### stream_from_info(info : `infoData`)
|
||||||
*This is basic to create a youtube stream from a info [ from video_info function ].*
|
*This is basic to create a youtube stream from a info [ from video_info function ].*
|
||||||
```js
|
```js
|
||||||
let info = await video_info(<url>)
|
let info = await video_info("url")
|
||||||
let source = await stream_from_info(info) // This will create a stream Class which contains type and stream to be played.
|
let source = await stream_from_info(info) // This will create a stream Class which contains type and stream to be played.
|
||||||
let resource = createAudioResource(source.stream, {
|
let resource = createAudioResource(source.stream, {
|
||||||
inputType : source.type
|
inputType : source.type
|
||||||
|
|||||||
Reference in New Issue
Block a user