Skip to content

Comments

Fix notification sounds#66

Merged
NDevTK merged 4 commits intomainfrom
claude/fix-notification-audio-stxZs
Feb 17, 2026
Merged

Fix notification sounds#66
NDevTK merged 4 commits intomainfrom
claude/fix-notification-audio-stxZs

Conversation

@NDevTK
Copy link
Owner

@NDevTK NDevTK commented Feb 17, 2026

#65

claude and others added 4 commits February 16, 2026 03:47
Notification sounds (e.g. Telegram message received/sent) are typically
under 1 second but trigger a full pause of music on other tabs. This adds
an "Ignore short media" option with two detection strategies:

- Per-media duration check: ContentScript sends element.duration with play
  messages, background ignores media where duration is finite and < 10s.
- Debounce for otherTabs (no content script): delays the pause action by
  5 seconds when a tab becomes audible; if it stops being audible before
  the timer fires, the event is discarded.

https://claude.ai/code/session_01HP27yofm1EcQQRuVQRSk41
3 seconds more precisely targets notification/UI sounds (0.3-1.5s)
without accidentally ignoring short voice messages or video clips.

https://claude.ai/code/session_01HP27yofm1EcQQRuVQRSk41
Telegram (and similar sites) don't load audio metadata until after the
play event, so duration is NaN when onPlay fires. Defer the play message
until durationchange fires (with a 500ms timeout fallback for streams
where durationchange never fires). This ensures short notification sounds
are correctly identified even when metadata loads late.

https://claude.ai/code/session_01HP27yofm1EcQQRuVQRSk41
@NDevTK NDevTK merged commit d83d569 into main Feb 17, 2026
3 checks passed
@NDevTK NDevTK deleted the claude/fix-notification-audio-stxZs branch February 17, 2026 12:18
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

Successfully merging this pull request may close these issues.

2 participants