Подготовка голосовых сообщений

This commit is contained in:
RoyceDa
2026-04-09 16:53:57 +02:00
parent 8fdfe9b786
commit 93ef692eb5
2 changed files with 68 additions and 4 deletions

View File

@@ -0,0 +1,25 @@
import { createContext, useRef } from "react";
const PlayerContext = createContext(null);
/**
* Провайдер для Audio/Video плеера
*/
interface PlayerProviderProps {
children: React.ReactNode;
}
export function PlayerProvider(props : PlayerProviderProps) {
const audioRef = useRef<HTMLAudioElement>(null);
const playVoice = () => {
}
return (
<PlayerContext.Provider value={null}>
{props.children}
<audio ref={audioRef} />
</PlayerContext.Provider>
)
}