diff --git a/Plugins/FriendNotifications/FriendNotifications.plugin.js b/Plugins/FriendNotifications/FriendNotifications.plugin.js index 899c9a21c9..4b7539392d 100644 --- a/Plugins/FriendNotifications/FriendNotifications.plugin.js +++ b/Plugins/FriendNotifications/FriendNotifications.plugin.js @@ -465,7 +465,7 @@ module.exports = (_ => { }); else BDFDB.LibraryRequires.fs.readFile(source, (error, response) => { if (error) BDFDB.NotificationUtils.toast("Could not fetch file, please make sure the file exists", {type: "danger"}); - else successSavedAudio(key, source, `data: audio/mpeg;base64,${response.toString("base64")}`); + else successSavedAudio(key, source, `data:audio/mpeg;base64,${response.toString("base64")}`); }); }, children: BDFDB.LanguageUtils.LanguageStrings.SAVE diff --git a/Plugins/NotificationSounds/NotificationSounds.plugin.js b/Plugins/NotificationSounds/NotificationSounds.plugin.js index 5cd6f736ce..4bfce616fd 100644 --- a/Plugins/NotificationSounds/NotificationSounds.plugin.js +++ b/Plugins/NotificationSounds/NotificationSounds.plugin.js @@ -14,16 +14,12 @@ module.exports = (_ => { "info": { "name": "NotificationSounds", "author": "DevilBro", - "version": "3.5.5", + "version": "3.5.6", "description": "Allow you to replace the native sounds of Discord with your own" }, "changeLog": { - "added": { - "Halloween": "Added discord's halloween call sound to the choices", - "Global Volume": "Added global volume slider affecting all sounds" - }, "fixed": { - "Removed Default Category": "Removed the category 'Default' since the audio files no longer exist on the webpage" + "Local Sounds not playing": "Fixed issue with newly added local sounds not playing" } } }; @@ -66,44 +62,44 @@ module.exports = (_ => { /* NEVER CHANGE THE SRC LINKS IN THE PLUGIN FILE, TO ADD NEW SOUNDS ADD THEM IN THE SETTINGS GUI IN THE PLUGINS PAGE */ const types = { - "message1": {implemented: true, name: "New Chatmessage", src: "/assets/dd920c06a01e5bb8b09678581e29d56f.mp3", mute: true, focus: null, include: true}, - "dm": {implemented: true, name: "Direct Message", src: "/assets/84c9fa3d07da865278bd77c97d952db4.mp3", mute: true, focus: true, include: false}, - "mentioned": {implemented: true, name: "Mentioned", src: "/assets/a5f42064e8120e381528b14fd3188b72.mp3", mute: true, focus: true, include: false}, - "role": {implemented: true, name: "Mentioned (role)", src: "/assets/a5f42064e8120e381528b14fd3188b72.mp3", mute: true, focus: true, include: false}, - "everyone": {implemented: true, name: "Mentioned (@everyone)", src: "/assets/a5f42064e8120e381528b14fd3188b72.mp3", mute: true, focus: true, include: false}, - "here": {implemented: true, name: "Mentioned (@here)", src: "/assets/a5f42064e8120e381528b14fd3188b72.mp3", mute: true, focus: true, include: false}, - "deafen": {implemented: true, name: "Voicechat Deafen", src: "/assets/e4d539271704b87764dc465b1a061abd.mp3", mute: false, focus: null, include: true}, - "mute": {implemented: true, name: "Voicechat Mute", src: "/assets/429d09ee3b86e81a75b5e06d3fb482be.mp3", mute: false, focus: null, include: true}, - "disconnect": {implemented: true, name: "Voicechat Disconnect", src: "/assets/7e125dc075ec6e5ae796e4c3ab83abb3.mp3", mute: false, focus: null, include: true}, - "undeafen": {implemented: true, name: "Voicechat Undeafen", src: "/assets/5a000a0d4dff083d12a1d4fc2c7cbf66.mp3", mute: false, focus: null, include: true}, - "unmute": {implemented: true, name: "Voicechat Unmute", src: "/assets/43805b9dd757ac4f6b9b58c1a8ee5f0d.mp3", mute: false, focus: null, include: true}, - "user_join": {implemented: true, name: "Voicechat User Joined", src: "/assets/5dd43c946894005258d85770f0d10cff.mp3", mute: false, focus: null, include: true}, - "user_leave": {implemented: true, name: "Voicechat User Left", src: "/assets/4fcfeb2cba26459c4750e60f626cebdc.mp3", mute: false, focus: null, include: true}, - "user_moved": {implemented: true, name: "Voicechat User Moved", src: "/assets/e81d11590762728c1b811eadfa5be766.mp3", mute: false, focus: null, include: true}, - "reconnect": {implemented: false, name: "Voicechat Reconnect", src: "/assets/471cfd0005b112ff857705e894bf41a6.mp3", mute: true, focus: null, include: true}, - "ptt_start": {implemented: true, name: "Push2Talk Start", src: "/assets/8b63833c8d252fedba6b9c4f2517c705.mp3", mute: false, focus: null, include: true}, - "ptt_stop": {implemented: true, name: "Push2Talk Stop", src: "/assets/74ab980d6890a0fa6aa0336182f9f620.mp3", mute: false, focus: null, include: true}, - "call_calling": {implemented: true, name: "Outgoing Call", src: "/assets/c6e92752668dde4eee5923d70441579f.mp3", mute: false, focus: null, include: true}, - "call_ringing": {implemented: true, name: "Incoming Call", src: "/assets/84a1b4e11d634dbfa1e5dd97a96de3ad.mp3", mute: true, focus: null, include: true}, - "call_ringing_beat": {implemented: false, name: "Incoming Call Beat", src: "/assets/b9411af07f154a6fef543e7e442e4da9.mp3", mute: true, focus: null, include: true}, - "call_ringing_halloween": {implemented: false, name: "Incoming Call Halloween", src: "/assets/bceeb2ba92c01584dcaafc957f769bae.mp3", mute: true, focus: null, include: true}, - "stream_started": {implemented: true, name: "Stream Started", src: "/assets/9ca817f41727edc1b2f1bc4f1911107c.mp3", mute: false, focus: null, include: true}, - "stream_ended": {implemented: true, name: "Stream Ended", src: "/assets/4e30f98aa537854f79f49a76af822bbc.mp3", mute: false, focus: null, include: true}, - "stream_user_joined": {implemented: true, name: "Stream User Joined", src: "/assets/5827bbf9a67c61cbb0e02ffbf434b654.mp3", mute: false, focus: null, include: true}, - "stream_user_left": {implemented: true, name: "Stream User Left", src: "/assets/7cdcdcbc426cc43583365a671c24b740.mp3", mute: false, focus: null, include: true}, - "ddr-down": {implemented: true, name: "HotKeys Window Down", src: "/assets/71f048f8aa7d4b24bf4268a87cbbb192.mp3", mute: false, focus: null, include: true}, - "ddr-left": {implemented: true, name: "HotKeys Window Left", src: "/assets/1de04408e62b5d52ae3ebbb91e9e1978.mp3", mute: false, focus: null, include: true}, - "ddr-right": {implemented: true, name: "HotKeys Window Right", src: "/assets/2c0433f93db8449e4a82b76dc520cb29.mp3", mute: false, focus: null, include: true}, - "ddr-up": {implemented: true, name: "HotKeys Window Up", src: "/assets/68472713f7a62c7c37e0a6a5d5a1faeb.mp3", mute: false, focus: null, include: true}, - "mention1": {implemented: false, name: "Mention Ping", src: "/assets/fa4d62c3cbc80733bf1f01b9c6f181de.mp3", mute: true, focus: null, include: true}, - "mention2": {implemented: false, name: "Mention Ping 2", src: "/assets/a5f42064e8120e381528b14fd3188b72.mp3", mute: true, focus: null, include: true}, - "mention3": {implemented: false, name: "Mention Ping 3", src: "/assets/84c9fa3d07da865278bd77c97d952db4.mp3", mute: true, focus: null, include: true}, - "message2": {implemented: false, name: "New Chatmessage 2", src: "/assets/15fe810f6cfab609c7fcda61652b9b34.mp3", mute: true, focus: null, include: true}, - "message3": {implemented: false, name: "New Chatmessage 3", src: "/assets/53ce6a92d3c233e8b4ac529d34d374e4.mp3", mute: true, focus: null, include: true}, - "human_man": {implemented: false, name: "Human Man Voice", src: "/assets/a37dcd6272ae41cf49295d58c9806fe3.mp3", mute: true, focus: null, include: true}, - "robot_man": {implemented: false, name: "Robot Man Voice", src: "/assets/66598bea6e59eb8acdf32cf2d9d75ba9.mp3", mute: true, focus: null, include: true}, - "discodo": {implemented: false, name: "Discodo Launch", src: "/assets/ae7d16bb2eea76b9b9977db0fad66658.mp3", mute: true, focus: null, include: true}, - "overlayunlock": {implemented: false, name: "Overlay Unlocked", src: "/assets/ad322ffe0a88436296158a80d5d11baa.mp3", mute: true, focus: null, include: true} + "message1": {implemented: true, name: "New Chatmessage", src: "/assets/dd920c06a01e5bb8b09678581e29d56f.mp3", mute: true, focus: null, include: true}, + "dm": {implemented: true, name: "Direct Message", src: "/assets/84c9fa3d07da865278bd77c97d952db4.mp3", mute: true, focus: true, include: false}, + "mentioned": {implemented: true, name: "Mentioned", src: "/assets/a5f42064e8120e381528b14fd3188b72.mp3", mute: true, focus: true, include: false}, + "role": {implemented: true, name: "Mentioned (role)", src: "/assets/a5f42064e8120e381528b14fd3188b72.mp3", mute: true, focus: true, include: false}, + "everyone": {implemented: true, name: "Mentioned (@everyone)", src: "/assets/a5f42064e8120e381528b14fd3188b72.mp3", mute: true, focus: true, include: false}, + "here": {implemented: true, name: "Mentioned (@here)", src: "/assets/a5f42064e8120e381528b14fd3188b72.mp3", mute: true, focus: true, include: false}, + "deafen": {implemented: true, name: "Voicechat Deafen", src: "/assets/e4d539271704b87764dc465b1a061abd.mp3", mute: false, focus: null, include: true}, + "mute": {implemented: true, name: "Voicechat Mute", src: "/assets/429d09ee3b86e81a75b5e06d3fb482be.mp3", mute: false, focus: null, include: true}, + "disconnect": {implemented: true, name: "Voicechat Disconnect", src: "/assets/7e125dc075ec6e5ae796e4c3ab83abb3.mp3", mute: false, focus: null, include: true}, + "undeafen": {implemented: true, name: "Voicechat Undeafen", src: "/assets/5a000a0d4dff083d12a1d4fc2c7cbf66.mp3", mute: false, focus: null, include: true}, + "unmute": {implemented: true, name: "Voicechat Unmute", src: "/assets/43805b9dd757ac4f6b9b58c1a8ee5f0d.mp3", mute: false, focus: null, include: true}, + "user_join": {implemented: true, name: "Voicechat User Joined", src: "/assets/5dd43c946894005258d85770f0d10cff.mp3", mute: false, focus: null, include: true}, + "user_leave": {implemented: true, name: "Voicechat User Left", src: "/assets/4fcfeb2cba26459c4750e60f626cebdc.mp3", mute: false, focus: null, include: true}, + "user_moved": {implemented: true, name: "Voicechat User Moved", src: "/assets/e81d11590762728c1b811eadfa5be766.mp3", mute: false, focus: null, include: true}, + "reconnect": {implemented: false, name: "Voicechat Reconnect", src: "/assets/471cfd0005b112ff857705e894bf41a6.mp3", mute: true, focus: null, include: true}, + "ptt_start": {implemented: true, name: "Push2Talk Start", src: "/assets/8b63833c8d252fedba6b9c4f2517c705.mp3", mute: false, focus: null, include: true}, + "ptt_stop": {implemented: true, name: "Push2Talk Stop", src: "/assets/74ab980d6890a0fa6aa0336182f9f620.mp3", mute: false, focus: null, include: true}, + "call_calling": {implemented: true, name: "Outgoing Call", src: "/assets/c6e92752668dde4eee5923d70441579f.mp3", mute: false, focus: null, include: true}, + "call_ringing": {implemented: true, name: "Incoming Call", src: "/assets/84a1b4e11d634dbfa1e5dd97a96de3ad.mp3", mute: true, focus: null, include: true}, + "call_ringing_beat": {implemented: false, name: "Incoming Call Beat", src: "/assets/b9411af07f154a6fef543e7e442e4da9.mp3", mute: true, focus: null, include: true}, + "call_ringing_halloween": {implemented: false, name: "Incoming Call Halloween", src: "/assets/bceeb2ba92c01584dcaafc957f769bae.mp3", mute: true, focus: null, include: true}, + "stream_started": {implemented: true, name: "Stream Started", src: "/assets/9ca817f41727edc1b2f1bc4f1911107c.mp3", mute: false, focus: null, include: true}, + "stream_ended": {implemented: true, name: "Stream Ended", src: "/assets/4e30f98aa537854f79f49a76af822bbc.mp3", mute: false, focus: null, include: true}, + "stream_user_joined": {implemented: true, name: "Stream User Joined", src: "/assets/5827bbf9a67c61cbb0e02ffbf434b654.mp3", mute: false, focus: null, include: true}, + "stream_user_left": {implemented: true, name: "Stream User Left", src: "/assets/7cdcdcbc426cc43583365a671c24b740.mp3", mute: false, focus: null, include: true}, + "ddr-down": {implemented: true, name: "HotKeys Window Down", src: "/assets/71f048f8aa7d4b24bf4268a87cbbb192.mp3", mute: false, focus: null, include: true}, + "ddr-left": {implemented: true, name: "HotKeys Window Left", src: "/assets/1de04408e62b5d52ae3ebbb91e9e1978.mp3", mute: false, focus: null, include: true}, + "ddr-right": {implemented: true, name: "HotKeys Window Right", src: "/assets/2c0433f93db8449e4a82b76dc520cb29.mp3", mute: false, focus: null, include: true}, + "ddr-up": {implemented: true, name: "HotKeys Window Up", src: "/assets/68472713f7a62c7c37e0a6a5d5a1faeb.mp3", mute: false, focus: null, include: true}, + "mention1": {implemented: false, name: "Mention Ping", src: "/assets/fa4d62c3cbc80733bf1f01b9c6f181de.mp3", mute: true, focus: null, include: true}, + "mention2": {implemented: false, name: "Mention Ping 2", src: "/assets/a5f42064e8120e381528b14fd3188b72.mp3", mute: true, focus: null, include: true}, + "mention3": {implemented: false, name: "Mention Ping 3", src: "/assets/84c9fa3d07da865278bd77c97d952db4.mp3", mute: true, focus: null, include: true}, + "message2": {implemented: false, name: "New Chatmessage 2", src: "/assets/15fe810f6cfab609c7fcda61652b9b34.mp3", mute: true, focus: null, include: true}, + "message3": {implemented: false, name: "New Chatmessage 3", src: "/assets/53ce6a92d3c233e8b4ac529d34d374e4.mp3", mute: true, focus: null, include: true}, + "human_man": {implemented: false, name: "Human Man Voice", src: "/assets/a37dcd6272ae41cf49295d58c9806fe3.mp3", mute: true, focus: null, include: true}, + "robot_man": {implemented: false, name: "Robot Man Voice", src: "/assets/66598bea6e59eb8acdf32cf2d9d75ba9.mp3", mute: true, focus: null, include: true}, + "discodo": {implemented: false, name: "Discodo Launch", src: "/assets/ae7d16bb2eea76b9b9977db0fad66658.mp3", mute: true, focus: null, include: true}, + "overlayunlock": {implemented: false, name: "Overlay Unlocked", src: "/assets/ad322ffe0a88436296158a80d5d11baa.mp3", mute: true, focus: null, include: true} }; /* NEVER CHANGE THE SRC LINKS IN THE PLUGIN FILE, TO ADD NEW SOUNDS ADD THEM IN THE SETTINGS GUI IN THE PLUGINS PAGE */ @@ -164,7 +160,7 @@ module.exports = (_ => { _ensureAudio () { return this._audio = this._audio || new Promise((callback, errorCallback) => { let audio = new Audio; - audio.src = this._src; + audio.src = this._src && this._src.startsWith("data") ? this._src.replace(/ /g, "") : this._src; audio.onloadeddata = _ => { audio.volume = Math.min((BDFDB.LibraryModules.MediaDeviceUtils.getOutputVolume() / 100) * (this._volume / 100) * (volumes.globalVolume / 100), 1); BDFDB.LibraryModules.PlatformUtils.embedded && audio.setSinkId(currentDevice || defaultDevice); @@ -506,7 +502,7 @@ module.exports = (_ => { }); else BDFDB.LibraryRequires.fs.readFile(source, (error, response) => { if (error) BDFDB.NotificationUtils.toast("Could not fetch file. Please make sure the file exists", {type: "danger"}); - else return successSavedAudio({category, sound, source: `data: audio/mpeg;base64,${response.toString("base64")}`}); + else return successSavedAudio({category, sound, source: `data:audio/mpeg;base64,${response.toString("base64")}`}); }); }, children: BDFDB.LanguageUtils.LanguageStrings.SAVE