npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

easy-call-js

v1.0.1

Published

makes it easy to add video calls easily and JavaScript-enabled, regardless of the framework

Downloads

141

Readme

WebRTC Library for Video Calls, Screen Sharing, and File Sharing

This open-source library aims to simplify the implementation of WebRTC features, such as video calls, screen sharing, file sharing, etc., in frontend applications like Angular, React, Vue, and others.

Getting Started

  • Install the library via npm:
    npm i easy-call-js
    
  • Use your framework’s dependency injection mechanism to inject the CallProcessService API with its dependencies, which include:

    • The default signaling server implementation based on Firestore, which requires your own Firebase configuration.

    • Your ICE servers configuration.

    • Multimedia constraints for your devices, such as the desired video size, etc.

Using the Main Methods

1. Starting a Call

To start a call, simply call the initializeCall method, which takes as input:

  • The caller's ID

  • The list of users to contact

This method notifies the callees and returns an ID for the call.

2. Initiating the Call with launchCall

This ID is then passed to the launchCall method with a CallParam object. This object contains:

  • The list of users to join

  • The ID of the user initiating the call

  • The ID of the video tag where the caller’s video will be displayed

  • The ID of the tag where the other participants' videos will be added

3. Detect Incoming Calls

The trackCall method allows you to detect incoming calls.

4. Leaving a Call

The releaseCall method allows you to leave the call.

5. Manage Participant Exits

The handleLeaveCall method notifies you whenever a user leaves the call. This can be useful, for example, to remove that participant's video from the screen.

6. Remove a Participant's Video

The removeParticipantVideo method removes from the screen the video of the user whose ID is passed as a parameter.

7. Answer a Call

The takeCall method allows you to answer the call once trackCall has detected it. It takes the following inputs:

  • The connected user’s ID

  • The call ID

  • The selector of the video tag to display the connected user’s local video

  • The ID of the tag where the remote videos will be added

Feel free to refer to the tutorial for more detailed examples and use cases