compatibility readme added
This commit is contained in:
parent
2242c64a8c
commit
4611ab5b40
11
README.md
11
README.md
@ -50,6 +50,17 @@ import play from 'play-dl'; // Everything
|
|||||||
import { video_basic_info, stream } from 'play-dl'; // Individual functions
|
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 breaks 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](https://play-dl.github.io/modules.html)
|
### [Documentation](https://play-dl.github.io/modules.html)
|
||||||
### [Examples](./examples)
|
### [Examples](./examples)
|
||||||
### [Instructions](./instructions)
|
### [Instructions](./instructions)
|
||||||
|
|||||||
@ -100,7 +100,7 @@ async function stream(url: string, options?: StreamOptions): Promise<YouTubeStre
|
|||||||
* - `number` quality : Quality number. [ 0 = Lowest, 1 = Medium, 2 = Highest ]
|
* - `number` quality : Quality number. [ 0 = Lowest, 1 = Medium, 2 = Highest ]
|
||||||
* - `boolean` htmldata : given data is html data or not
|
* - `boolean` htmldata : given data is html data or not
|
||||||
* - `number` precache : No of segments of data to store before looping [YouTube Live Stream only]. [ Defaults to 3 ]
|
* - `number` precache : No of segments of data to store before looping [YouTube Live Stream only]. [ Defaults to 3 ]
|
||||||
* - `boolean` discordPlayerCompatibility : Conversion of Webm to Opus [ Defaults to true ]
|
* - `boolean` discordPlayerCompatibility : Conversion of Webm to Opus [ Defaults to false ]
|
||||||
* @returns A {@link YouTubeStream} or {@link SoundCloudStream} Stream to play
|
* @returns A {@link YouTubeStream} or {@link SoundCloudStream} Stream to play
|
||||||
*/
|
*/
|
||||||
async function stream(url: string, options: StreamOptions = {}): Promise<YouTubeStream | SoundCloudStream> {
|
async function stream(url: string, options: StreamOptions = {}): Promise<YouTubeStream | SoundCloudStream> {
|
||||||
@ -240,7 +240,7 @@ async function stream_from_info(info: InfoData, options?: StreamOptions): Promis
|
|||||||
* - `number` quality : Quality number. [ 0 = Lowest, 1 = Medium, 2 = Highest ]
|
* - `number` quality : Quality number. [ 0 = Lowest, 1 = Medium, 2 = Highest ]
|
||||||
* - `boolean` htmldata : given data is html data or not
|
* - `boolean` htmldata : given data is html data or not
|
||||||
* - `number` precache : No of segments of data to store before looping [YouTube Live Stream only]. [ Defaults to 3 ]
|
* - `number` precache : No of segments of data to store before looping [YouTube Live Stream only]. [ Defaults to 3 ]
|
||||||
* - `boolean` discordPlayerCompatibility : Conversion of Webm to Opus[ Defaults to true ]
|
* - `boolean` discordPlayerCompatibility : Conversion of Webm to Opus[ Defaults to false ]
|
||||||
* @returns A {@link YouTubeStream} or {@link SoundCloudStream} Stream to play
|
* @returns A {@link YouTubeStream} or {@link SoundCloudStream} Stream to play
|
||||||
*/
|
*/
|
||||||
async function stream_from_info(
|
async function stream_from_info(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user