Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
SimpleWebRTC code example
<Provider store={store}>
<SWRTC.Provider configUrl={CONFIG_URL} userData={userDataToken} >
<SWRTC.Connecting configUrl={CONFIG_URL}>
<Loader size={40} style={{padding: '40px 0'}}/>
<SWRTC.Connected configUrl={CONFIG_URL} userData={userDataToken}>
{/* Request the user's media */}
<SWRTC.RequestUserMedia audio={true} video={true} auto={true}/>
{/* Enable playing remote audio. */}
{/* Connect to a room with a name and optional password */}
<SWRTC.Room name={ROOM_NAME}>
{({room, peers, localMedia, remoteMedia}) => {
if (!room.joined || !room.address) {
return <Subhead1>Uniendo a sala...</Subhead1>;
const roomAddress: string = room.address; }}
return (
<div className="App">....</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.