Skip to content

Commit

Permalink
README fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
longnguyen2004 authored Feb 8, 2025
1 parent 9537628 commit 4dc6cdc
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,16 @@ await streamer.client.login('TOKEN HERE');

```

Make client join a voice channel and create a stream:
Make client join a voice channel

```typescript
await streamer.joinVoice("GUILD ID HERE", "CHANNEL ID HERE");

const udp = await streamer.createStream({
// stream options here
});
```

Start sending media over the udp connection:
Start sending media

```typescript
import { prepareStream, playStream, Util } from "@dank074/discord-video-stream"
import { prepareStream, playStream, Utils } from "@dank074/discord-video-stream"
try {
const { command, output } = prepareStream("DIRECT VIDEO URL OR READABLE STREAM HERE", {
// Specify either width or height for aspect ratio aware scaling
Expand Down Expand Up @@ -185,6 +181,10 @@ h26xPreset?: 'ultrafast' | 'superfast' | 'veryfast' | 'faster' | 'fast' | 'mediu
* Might create lag in video output in some rare cases
*/
minimizeLatency?: boolean;
/**
* Custom headers for HTTP requests
*/
customHeaders?: Record<string, string>
```

## `playStream` options available
Expand Down Expand Up @@ -238,10 +238,6 @@ rtcpSenderReportEnabled?: boolean;
* ChaCha20-Poly1305 Encryption is faster than AES-256-GCM, except when using AES-NI
*/
forceChacha20Encryption?: boolean;
/**
* Custom headers for HTTP requests
*/
customHeaders?: Record<string, string>
```

## Performance tips
Expand Down

0 comments on commit 4dc6cdc

Please sign in to comment.