bundle.discord.cogs.music.player¶
Guild voice playback – timing, pause/resume.
Attributes¶
Exceptions¶
The stream ended before FFmpeg delivered a single frame (unreachable or rejected URL). |
Classes¶
Owns voice playback and timing for a single guild. |
Module Contents¶
- bundle.discord.cogs.music.player.log¶
- exception bundle.discord.cogs.music.player.TrackProducedNoAudio¶
Bases:
RuntimeErrorThe stream ended before FFmpeg delivered a single frame (unreachable or rejected URL).
- class bundle.discord.cogs.music.player.GuildPlayer(on_track_end: collections.abc.Callable[[int, Exception | None], collections.abc.Coroutine[Any, Any, None]])¶
Owns voice playback and timing for a single guild.
- async play(vc: discord.VoiceClient, track: bundle.youtube.track.YoutubeTrackData, guild_id: int) bool¶
Start FFmpeg playback. Returns False if no stream URL available.
Streams the audio-only track: a voice channel needs nothing else, and the best video stream can be gigabytes. The source is built in a worker thread because it blocks until its jitter buffer has pre-filled.