WebRTC call client SDK

You can add the client SDK to add audio and video functionality to your app with just a few lines of code. For React, you can use the LiveKit component-js library.

npm install @livekit/components-react livekit-client
import { LiveKitRoom, VideoConference } from '@livekit/components-react'
import '@livekit/components-styles'

export const WebRTCCall = () => {
  return (
    <LiveKitRoom
      // Get this token from our API first.
      token={apiToken}
      // Our server URL
      serverUrl="wss://klinkrtc.livekit.cloud"
      data-lk-theme="default"
      connect={true}
      audio={true}
      video={true}
      onDisconnected={() => {
        // Reset the token here.
      }}
    >
      <VideoConference />
    </LiveKitRoom>
  )
}

For other platforms, please visit LiveKit's API reference.