You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It works! I can even drag images from the download popup
But I wish it had a "Notification sound" switch, independient from that "Download Completion Notification" because I want sound to play but nothing to appear on my screen.
Here's some pseudocode from an extension I put together a while ago that does it
Great extension, thanks for doing this
//Reproduce mp3
function playSound() {
var myAudio = new Audio();
myAudio.src = chrome.extension.getURL("sound/notification2.mp3");
var playPromise = myAudio.play();
// In browsers that don’t yet support this functionality,
// playPromise won’t be defined.
if (playPromise !== undefined) {
playPromise.then(function() {
// Automatic playback started!
}).catch(function(error) {
// Automatic playback failed.
// Show a UI element to let the user manually start playback.
});
}
}
var cd = chrome.downloads;
if(typeof cd !== "undefined"){
cd.onChanged.addListener(function(delta){
if (delta.state && delta.state.current === "complete")
playSound();
});
}
The text was updated successfully, but these errors were encountered:
It works! I can even drag images from the download popup
But I wish it had a "Notification sound" switch, independient from that "Download Completion Notification" because I want sound to play but nothing to appear on my screen.
Here's some pseudocode from an extension I put together a while ago that does it
Great extension, thanks for doing this
The text was updated successfully, but these errors were encountered: