MCPcopy Create free account
hub / github.com/GRVYDEV/Project-Lightspeed / RTCProvider

Function RTCProvider

frontend/src/context/RTCPeerContext.jsx:6–14  ·  view source on GitHub ↗
({ children })

Source from the content-addressed store, hash-verified

4export const RTCContext = createContext();
5
6const RTCProvider = ({ children }) => {
7 const [pc] = useState(new RTCPeerConnection());
8
9 const value = {
10 pc,
11 };
12
13 return <RTCContext.Provider value={value}>{children}</RTCContext.Provider>;
14};
15
16export const useRTC = () => {
17 const context = useContext(RTCContext);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected