From 0650777a7f224257767d967f490704a15d431a54 Mon Sep 17 00:00:00 2001 From: redbaron2k7 <76609332+redbaron2k7@users.noreply.github.com> Date: Tue, 13 Aug 2024 18:16:58 -0600 Subject: [PATCH] Fix README plugin name --- src/plugins/webcamStartNotifier/README.md | 6 ++---- src/plugins/webcamStartNotifier/index.ts | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/plugins/webcamStartNotifier/README.md b/src/plugins/webcamStartNotifier/README.md index 8e6bf038c..433cc21a5 100644 --- a/src/plugins/webcamStartNotifier/README.md +++ b/src/plugins/webcamStartNotifier/README.md @@ -1,5 +1,3 @@ -# videoStartNotifier Plugin for Vencord +# WebcamStartNotifier Plugin for Vencord - Plays a sound notification when a user starts/stops their video in a voice chat. The sounds are the stream start/stop sounds but modified pitch - -Idea from [Vencord Plugin Request #1026](https://github.com/Vencord/plugin-requests/issues/1026) \ No newline at end of file + Plays a sound notification when a user starts/stops their video in a voice chat. The sounds are the stream start/stop sounds but modified pitch \ No newline at end of file diff --git a/src/plugins/webcamStartNotifier/index.ts b/src/plugins/webcamStartNotifier/index.ts index 5b0b85c89..7d0db3785 100644 --- a/src/plugins/webcamStartNotifier/index.ts +++ b/src/plugins/webcamStartNotifier/index.ts @@ -11,6 +11,8 @@ import { Devs } from "@utils/constants"; const startSound = "https://raw.githubusercontent.com/redbaron2k7/videoStartNotifier//main/start.mp3"; const stopSound = "https://raw.githubusercontent.com/redbaron2k7/videoStartNotifier/main/stop.mp3"; +const videoStates = new Map(); + function playNotification(isVideoOn: boolean) { new Audio(isVideoOn ? startSound : stopSound).play(); } @@ -21,8 +23,6 @@ export default definePlugin({ authors: [Devs.redbaron2k7], flux: (() => { - const videoStates = new Map(); - return { VOICE_STATE_UPDATES: ({ voiceStates }: { voiceStates: Array<{ userId: string, channelId: string, selfVideo?: boolean; }>; }) => { const currentChannelId = SelectedChannelStore.getVoiceChannelId();