Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ffmpeg Not played in loop #100

Closed
Berttholio opened this issue Feb 15, 2016 · 2 comments
Closed

ffmpeg Not played in loop #100

Berttholio opened this issue Feb 15, 2016 · 2 comments

Comments

@Berttholio
Copy link

Creating a function for client to disconnect after file is done playing. The client stays connected for the length of time to play file, but no audio is transited. If loop is removed stream plays fine

voice = yield from client.join_voice_channel(hard_coded_channel) player = voice.create_ffmpeg_player('music.mp3') player.start() while player.is_done() is False: if player.is_done() is True: exit= yield from disconnect(voice)

@cookkkie
Copy link
Contributor

Try this:

voice = yield from client.join_voice_channel(hard_coded_channel)
player = voice.create_ffmpeg_player('music.mp3')
player.start()
while not player.is_done():
    yield from asyncio.sleep(1)
yield from client.voice.disconnect()    

@Berttholio
Copy link
Author

Works now, Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants