
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@livekit/react-components
Advanced tools
This package provides React components that makes it easier to use LiveKit in a React app.
npm install --save livekit-react
Source available in example
Note: Currently this library isn't compatible with React.StrictMode
. We are working on improvements in this area.
Without customization, the component would use a default skin as seen in the demo above.
import { LiveKitRoom } from "livekit-react";
// CSS should be explicitly imported if using the default UI
import "livekit-react/dist/index.css";
// used by the default ParticipantView to maintain video aspect ratio.
// this CSS must be imported globally
// if you are using a custom Participant renderer, this import isn't necessary.
import "react-aspect-ratio/aspect-ratio.css";
export const RoomPage = () => {
const url = "wss://your_host";
const token = "your_token";
return (
<div className="roomContainer">
<LiveKitRoom
url={url}
token={token}
onConnected={(room) => onConnected(room)}
/>
</div>
);
};
async function onConnected(room) {
await room.localParticipant.setCameraEnabled(true);
await room.localParticipant.setMicrophoneEnabled(true);
}
To provide your own rendering, override one or more of stageRenderer
, participantRenderer
, and controlRenderer
. It's possible customize a single renderer and use defaults for the others.
export const RoomPage = () => {
const url = "wss://your_host";
const token = "your_token";
return (
<LiveKitRoom
url={url}
token={token}
// stageRenderer renders the entire stage
stageRenderer={(props: StageProps) => {
return <div />;
}}
// participantRenderer renders a single participant
participantRenderer={(props: ParticipantProps) => {
return <div />;
}}
// controlRenderer renders the control bar
controlRenderer={(props: ControlsProps) => {
return <div />;
}}
/>
);
};
FAQs
LiveKit SDK & Components
The npm package @livekit/react-components receives a total of 89 weekly downloads. As such, @livekit/react-components popularity was classified as not popular.
We found that @livekit/react-components demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 20 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.