({ children })
| 4 | export const RTCContext = createContext(); |
| 5 | |
| 6 | const 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 | |
| 16 | export const useRTC = () => { |
| 17 | const context = useContext(RTCContext); |
nothing calls this directly
no outgoing calls
no test coverage detected