Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

webrtc-frontend-library

Package Overview
Dependencies
Maintainers
0
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webrtc-frontend-library

``` npm install webrtc-frontend-library --save ```

  • 1.0.117
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
23
decreased by-30.3%
Maintainers
0
Weekly downloads
 
Created
Source

Install

npm install webrtc-frontend-library --save

Imports

Import the components and constants from the package into the file:

import { VideoChat, LS_WEBRTK_TOKEN_KEY } from 'webrtc-frontend-library'
Important

After logging the user into your application, you should set the access token in the local storage of the browser for the chat components:

localStorage.setItem(LS_WEBRTK_TOKEN_KEY, access_token)

After calling the function to refresh a token from your app, the new received token must be installed in local storage of the browser under the key LS_WEBRTK_TOKEN_KEY and returned from the function.


VideoChat Component

import { VideoChat } from "chat-frontend-library";

  <VideoChat
    roomId="roomId"
    handleError={cbHandleError}
    handleClose={cbHandleClose}
    user_locale='user_locale'
    />
VideoChat props
propdefaulttypedescription
roomIdnonestringRoom id to connect
user_localeru/enstringChat interface language. The browser language is set by default
cbHandleClosenonefunctionA callback function that is called when the user clicks the leave call button
cbHandleErrornonefunctionAn asynchronous callback function that is called if the chat API call returns an error. Should return the new user token
isDisabledButtonJoinnonebooleanDisable or allow click on join call button

FAQs

Package last updated on 13 Nov 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc