class Worker::AudioPlayer
- Worker::AudioPlayer
- Reference
- Object
Overview
Single audio player
Defined in:
worker/audio_player.crworker/audio_player/asset_audio.cr
worker/audio_player/audio.cr
worker/audio_player/connection_lost_error.cr
worker/audio_player/failed_to_connect_error.cr
worker/audio_player/queue.cr
worker/audio_player/remote_audio.cr
Constant Summary
-
AUDIO_LOAD_FAILED_TIMEOUT =
3.seconds
-
AUDIO_PLAY_INTERVAL =
1.second
-
CONNECTION_CHECK_INTERVAL =
500.milliseconds
-
CONNECTION_TIMEOUT =
6.seconds
-
Log =
Worker::Log.for("audio_player")
-
MAXIMUM_SIZE =
2000
-
PLAY_STOP_AWAIT =
10.seconds
-
PLAY_STOP_CHECK_INTERVAL =
500.milliseconds
-
PREMIUM_MAXIMUM_SIZE =
10000
Constructors
Instance Method Summary
- #channel_id : UInt64 | Nil
- #channel_id=(channel_id : UInt64 | Nil)
- #connected?
- #connecting?
- #current_audio : Audio | Nil
- #disconnected?
- #disconnecting?
- #play(channel_id : UInt64) : Nil
- #playing?
- #queue : Queue
- #skip : Nil
- #status : Status
- #stop(preserve_current : Bool = false, await_fiber : Bool = false) : Nil