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();