From c81b2c087b0206e27eb10c966464007c53f62da9 Mon Sep 17 00:00:00 2001 From: Cortex <126973723+verysillycat@users.noreply.github.com> Date: Tue, 25 Mar 2025 18:25:51 -0600 Subject: [PATCH] git(revert): "feat(voiceMessages): Added an option to convert to .ogg for ios support. (#197)" This reverts commit d4858e219c70f0de16d4c89dead7645f8a02a614. broken atm waiting for mohammad fix --- src/plugins/voiceMessages/index.tsx | 40 ++--------------------------- 1 file changed, 2 insertions(+), 38 deletions(-) diff --git a/src/plugins/voiceMessages/index.tsx b/src/plugins/voiceMessages/index.tsx index a1523582..35522301 100644 --- a/src/plugins/voiceMessages/index.tsx +++ b/src/plugins/voiceMessages/index.tsx @@ -21,9 +21,6 @@ import "./styles.css"; import { NavContextMenuPatchCallback } from "@api/ContextMenu"; import { Microphone } from "@components/Icons"; import { Link } from "@components/Link"; -import { loadFFmpeg } from "@equicordplugins/moreStickers/utils"; -import { FFmpeg } from "@ffmpeg/ffmpeg"; -import { fetchFile } from "@ffmpeg/util"; import { Devs, EquicordDevs } from "@utils/constants"; import { Margins } from "@utils/margins"; import { ModalContent, ModalFooter, ModalHeader, ModalProps, ModalRoot, openModal } from "@utils/modal"; @@ -31,7 +28,7 @@ import { useAwaiter } from "@utils/react"; import definePlugin from "@utils/types"; import { chooseFile } from "@utils/web"; import { findByPropsLazy, findLazy, findStoreLazy } from "@webpack"; -import { Button, Card, Constants, Flex, FluxDispatcher, Forms, lodash, Menu, MessageActions, PermissionsBits, PermissionStore, React, RestAPI, SelectedChannelStore, showToast, SnowflakeUtils, Toasts, useEffect, useState } from "@webpack/common"; +import { Button, Card, Constants, FluxDispatcher, Forms, lodash, Menu, MessageActions, PermissionsBits, PermissionStore, RestAPI, SelectedChannelStore, showToast, SnowflakeUtils, Toasts, useEffect, useState } from "@webpack/common"; import { ComponentType } from "react"; import { lastState as silentMessageEnabled } from "../silentMessageToggle"; @@ -185,17 +182,6 @@ function Modal({ modalProps }: { modalProps: ModalProps; }) { !blob.type.startsWith("audio/ogg") || blob.type.includes("codecs") && !blob.type.includes("opus") ); - const ffmpegLoaded = React.useState(false); - const ffmpeg = React.useState(new FFmpeg()); - - React.useEffect(() => { - if (ffmpegLoaded[0]) return; - - loadFFmpeg(ffmpeg[0], () => { - ffmpegLoaded[1](true); - }); - }, []); - return ( @@ -240,13 +226,12 @@ function Modal({ modalProps }: { modalProps: ModalProps; }) { To fix it, first convert it to OggOpus, for example using the convertio web converter - )} - + - {isUnsupportedFormat && } - ); }