dank074/Discord-video-stream

How to properly end a stream?

Closed this issue · 1 comments

Does the library support the ability to signal Discord that the live stream is over? I've tried this so far:

command.kill("SIGINT");
this._udp.mediaConnection.setVideoStatus(false);
this._udp.mediaConnection.setSpeaking(false);

And it does stop the stream, but the Discord client doesn't realise and waits for it to time out before closing it. Any ideas?

Yes there's a gateway op code for that and you can send it via 'signalStopStream()'

public signalStopStream(guild_id: string, channel_id: string): void {