Don't play notification if video is muted

Fixes #1888
This commit is contained in:
Ajay 2024-07-17 13:17:50 -04:00
parent 3ec1e85712
commit 3738b180dd

View file

@ -1721,7 +1721,8 @@ function skipToTime({v, skipTime, skippingSegments, openNotice, forceAutoSkip, u
}
}
if (autoSkip && Config.config.audioNotificationOnSkip && !isSubmittingSegment) {
if (autoSkip && Config.config.audioNotificationOnSkip
&& !isSubmittingSegment && !getVideo()?.muted) {
const beep = new Audio(chrome.runtime.getURL("icons/beep.ogg"));
beep.volume = getVideo().volume * 0.1;
const oldMetadata = navigator.mediaSession.metadata