fix: Don't detect audio from stale webrtc connection (#2429)

- Closes: #2417
This commit is contained in:
Dermot Duffy
2026-06-30 17:45:12 -07:00
committed by dermotduffy
parent 55732ead1d
commit 9535bb8aa0
3 changed files with 43 additions and 4 deletions
@@ -1793,6 +1793,24 @@ describe('MenuButtonController', () => {
});
});
it('should not have mute button without audio', () => {
const mediaPlayerController = mock<MediaPlayerController>();
const buttons = calculateButtons(controller, {
currentMediaLoadedInfo: createMediaLoadedInfo({
capabilities: {
hasAudio: false,
},
mediaPlayerController,
}),
});
expect(buttons).not.toContainEqual(
expect.objectContaining({
title: 'Mute / Unmute',
}),
);
});
it('should have screenshot button', () => {
const buttons = calculateButtons(controller, {
currentMediaLoadedInfo: createMediaLoadedInfo({