Add notification sound upon match.

This commit is contained in:
Ceda EI 2020-09-15 18:29:44 +05:30
parent 4594a31115
commit e10e3f2016
3 changed files with 4 additions and 2 deletions

View File

@ -59,6 +59,8 @@ function captionUpdate() {
if (matched && surroundingText !== lastNotification) {
new Notification("Match found", {body: surroundingText});
lastNotification = surroundingText;
const audio = new Audio(browser.runtime.getURL("static/notif.mp3"));
audio.play();
}
})
}

View File

@ -27,6 +27,6 @@
"matches": ["https://meet.google.com/*"],
"js": ["gmcr.js"]
}
]
],
"web_accessible_resources": ["static/*"]
}

BIN
static/notif.mp3 Normal file

Binary file not shown.