Rapptz
115c22633c
Change yield from to await in some docstrings.
Fix #625 .
8 years ago
Rapptz
dae3c66a54
Ensure after is called inside the daemon thread for players.
8 years ago
Rapptz
6fec17d7d4
Catch Player errors and gracefully stop them.
This also introduces the concept of the after function taking a single
parameter, the current player. This is useful for error handling, e.g.
checking Player.error.
Fixes #291
9 years ago
Daniel
e977bddc1f
Add stderr arg to create_ffmpeg_player
9 years ago
Hornwitser
e1f8bdc440
Make PyNaCl optional
9 years ago
Rapptz
102e8aca43
Raise TypeError if "after" parameter is not a callable.
9 years ago
Rapptz
e736554777
Make sure the socket is closed when we call VoiceClient.disconnect
9 years ago
Rapptz
fe5c369fe9
Handle voice websocket closure if it's a successful close.
9 years ago
Jake
41a2b5ed73
Actually read from the voice websocket & fix heartbeat.
This change makes it so that the buffer doesn't fill and the voice server drops the socket.
Also, use correct interval for voice websocket heartbeat.
9 years ago
Rapptz
13a9a7520c
Fix ytdl documentation link.
9 years ago
Rapptz
1155a0aaa4
Make Player threads into daemon threads.
9 years ago
Rapptz
3c04ec2af0
Add a way to change the player volume.
9 years ago
Rapptz
339e26275f
Add VoiceClient.move_to for quick switching of voice channels.
9 years ago
Rapptz
2fc496304c
Add libopus DLLs for ease of use.
9 years ago
Rapptz
d9c780b8a8
Working multi-server voice support.
9 years ago
Rapptz
c1b5a52823
Refactor voice websocket into gateway.py
9 years ago
Rapptz
ee4574a5e1
Drop voice packets when it can be potentially blocking.
9 years ago
izy521
719c0269f4
Encrypted audio working with PyNacl
I chose PyNacl since it came with its own libsodium portable copy.
9 years ago
Rapptz
827ca1e5a2
Add boolean option to specify if VoiceClient.play_audio should encode.
This allows people to send raw opus encoded data instead of being
forced to encode to Opus.
9 years ago
Rapptz
4fa1bcadaa
Add a way to set ffmpeg options before the -i flag.
9 years ago
Khazhismel Kumykov
f1736bc08f
Move ffmpeg process cleanup to player thread
9 years ago
Khazhismel
fc2127789a
Support ytsearch and playlists in youtube_dl_player
9 years ago
Jake
b10432d393
Disconnect from voice server properly
This needs to exist when users get flagged as bots.
9 years ago
Khazhismel Kumykov
ef57873f80
Clean up zombies
self.process.communicate(timeout=0.100) will block
zombies probably would be cleaned up anyways but in a non deterministic fashion by the garage collector
9 years ago
Rapptz
1cd3c0b5cb
Make VoiceClient.create_ytdl_player a coroutine.
This is a breaking change. The reason to make it a coroutine is so that
the info retrieval is not blocking since there are rare instances where
it would take an abnormally long time. The player returned is also
augmented to have more attributes relating to the stream itself.
9 years ago
Rapptz
b4604fa3f6
Change options in VoiceClient.create_ytdl_player to ytdl_options.
This is a breaking change. This allows you to set both ffmpeg options
and regular ytdl options in the same function since we now just
forward the keyword arguments to the ffmpeg player.
9 years ago
Rapptz
3d21a186fe
Try to make the pause/resume loop not busy.
9 years ago
Alexey Glushko
f075548d78
add ``headers`` option to create_ffmpeg_player()
headers can't be passed through 'options' because in '-headers' flag shoul be placed before '-i'
At least for ffmpeg 2.8.4
9 years ago
Rapptz
1f5d26b7d3
Unit correction in voice docstrings.
9 years ago
Rapptz
6c7a493fd9
Raise a different exception if ffmpeg is not found in PATH.
9 years ago
Rapptz
4edff12f6b
Proper exception chaining.
9 years ago
Rapptz
c1347dfcf0
Remove excessive logging when using voice.
9 years ago
Rapptz
db4cc791dd
Update license of files to 2016.
9 years ago
Steven Berler
49488c9151
make ip/port voice packet logic more clear
Adds comments and also rewrites the logic in a way that is much easier
to see what is going on. For example you can now easily see that the
port is actually encoded in little endian (which is different from
everything else).
9 years ago
Steven Berler
57c3363119
fix broken ip and port in voice client
Also added debug logging to make it easier to debug errors in how the
initial packet is parsed.
9 years ago
Khazhismel
e8a06b7ee9
Insert options before pipe:1 in ffmpeg player, otherwise they are ignored
9 years ago
Rapptz
78e95ef755
Documentation fixes.
9 years ago
Rapptz
6d26d73e24
Client.run now does cleanup when KeyboardInterrupt is encountered.
9 years ago
Rapptz
f55d82146e
Remove socket.shutdown and only use socket.close instead.
10 years ago
Rapptz
c4e6a53dfe
Add experimental ytdl player.
10 years ago
Rapptz
3cefa5d65c
ffmpeg process is now properly killed.
Two new options are added to the ffmpeg player. `options` and `pipe`.
If `pipe` is True then we can pass in a file-like object to be the
stdin of ffmpeg. `options` allows you to pass extra things to the
ffmpeg command line.
10 years ago
Rapptz
bec7071c48
Add missing implementation for create_stream_player.
10 years ago
Rapptz
eda3c626db
Client now keeps a reference to the VoiceClient constructed.
10 years ago
Rapptz
6a4bddd69b
Add ability to pause/resume audio stream from StreamPlayer.
10 years ago
Rapptz
3ca5845566
Close ffmpeg process after stream is finished.
10 years ago
Rapptz
6217076cbf
Fix exception handling having a NameError
10 years ago
Rapptz
60945868b4
Clear up some documentation.
10 years ago
Rapptz
a6d6d832ff
Working voice sending implementation.
Currently you can only send from a stream that implements
``read`` and a ``ffmpeg`` or ``avconv``.
10 years ago
Rapptz
9102f1ae4f
Work on connecting to a voice channel.
10 years ago