diff --git a/public/_locales/en/messages.json b/public/_locales/en/messages.json
index b1be0523..711667c3 100644
--- a/public/_locales/en/messages.json
+++ b/public/_locales/en/messages.json
@@ -918,5 +918,11 @@
},
"youtubeKeybindWarning": {
"message": "This is a built-in YouTube shortcut. Are you sure you want to use it?"
+ },
+ "bindMediaKey": {
+ "message": "Play/Pause Current Video with Media Keys"
+ },
+ "bindMediaKeyDescription": {
+ "message": "Enable this if your media keys stop working after the audio notification is played."
}
}
diff --git a/public/options/options.html b/public/options/options.html
index 189f23ad..e302802f 100644
--- a/public/options/options.html
+++ b/public/options/options.html
@@ -263,6 +263,20 @@
diff --git a/src/config.ts b/src/config.ts
index a890f94a..42192b73 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -36,7 +36,8 @@ interface SBConfig {
serverAddress: string,
minDuration: number,
skipNoticeDuration: number,
- audioNotificationOnSkip,
+ audioNotificationOnSkip: boolean,
+ bindMediaKey: boolean,
checkForUnlistedVideos: boolean,
testingServer: boolean,
refetchWhenNotFound: boolean,
@@ -198,6 +199,7 @@ const Config: SBObject = {
minDuration: 0,
skipNoticeDuration: 4,
audioNotificationOnSkip: false,
+ bindMediaKey: false,
checkForUnlistedVideos: false,
testingServer: false,
refetchWhenNotFound: true,
diff --git a/src/content.ts b/src/content.ts
index d7b55dd9..7ff811d7 100644
--- a/src/content.ts
+++ b/src/content.ts
@@ -1273,7 +1273,8 @@ function skipToTime({v, skipTime, skippingSegments, openNotice, forceAutoSkip, u
const beep = new Audio(chrome.runtime.getURL("icons/beep.ogg"));
beep.volume = video.volume * 0.1;
beep.play();
- window.addEventListener("keydown", mediaPauseListener);
+ if (Config.config.audioNotificationOnSkip && Config.config.bindMediaKey)
+ window.addEventListener("keydown", mediaPauseListener);
}
if (!autoSkip