feat: implement Phase 12 — voice message playback with ffplay
Add voice message playback infrastructure: - AudioPlayer using ffplay subprocess with SIGSTOP/SIGCONT for pause/resume - VoiceCache with LRU eviction (100 MB limit) - TDLib integration: VoiceInfo, VoiceDownloadState, PlaybackState types - download_voice_note() in TdClientTrait - Keybindings: Space (play/pause), ←/→ (seek ±5s) - Auto-stop playback on message navigation - Remove debug_log module
This commit is contained in:
@@ -49,7 +49,12 @@ pub enum Command {
|
||||
SelectMessage,
|
||||
|
||||
// Media
|
||||
ViewImage,
|
||||
ViewImage, // v - просмотр фото
|
||||
|
||||
// Voice playback
|
||||
TogglePlayback, // Space - play/pause
|
||||
SeekForward, // → - seek +5s
|
||||
SeekBackward, // ← - seek -5s
|
||||
|
||||
// Input
|
||||
SubmitMessage,
|
||||
@@ -211,6 +216,17 @@ impl Keybindings {
|
||||
KeyBinding::new(KeyCode::Char('м')), // RU
|
||||
]);
|
||||
|
||||
// Voice playback
|
||||
bindings.insert(Command::TogglePlayback, vec![
|
||||
KeyBinding::new(KeyCode::Char(' ')),
|
||||
]);
|
||||
bindings.insert(Command::SeekForward, vec![
|
||||
KeyBinding::new(KeyCode::Right),
|
||||
]);
|
||||
bindings.insert(Command::SeekBackward, vec![
|
||||
KeyBinding::new(KeyCode::Left),
|
||||
]);
|
||||
|
||||
// Input
|
||||
bindings.insert(Command::SubmitMessage, vec![
|
||||
KeyBinding::new(KeyCode::Enter),
|
||||
|
||||
Reference in New Issue
Block a user