Change extra button to only work during recording phase
- Extra button now only responds during actual recording - Does not work during greeting playback or when on-hook - Updated logic from checking off-hook status to checking recording status - Updated README to reflect recording-only behavior This allows guests to add sound effects to their recorded message without interrupting the initial greeting. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -319,13 +319,13 @@ class RotaryPhone:
|
||||
}
|
||||
|
||||
def play_extra_button_sound(self):
|
||||
"""Play sound when extra button is pressed (only when off-hook/in call)"""
|
||||
"""Play sound when extra button is pressed (only during recording)"""
|
||||
if not EXTRA_BUTTON_ENABLED:
|
||||
return
|
||||
|
||||
# Only play if phone is OFF hook (during a call)
|
||||
if self.phone_status != "off_hook":
|
||||
print("Extra button ignored - phone is on hook")
|
||||
# Only play if currently recording
|
||||
if not self.recording:
|
||||
print("Extra button ignored - not recording")
|
||||
return
|
||||
|
||||
button_sound = self.get_extra_button_sound_path()
|
||||
|
||||
Reference in New Issue
Block a user