Talk to us
Talk to us
menu

How to Embed Video Call With Prebuilt SDK

How to Embed Video Call With Prebuilt SDK

Video chat has become a necessary feature for applications. To integrate it, a prebuilt SDK is an important tool for developers.

What is a Pre-built SDK?

A pre-built SDK, or Software Development Kit, is a set of software development tools that allow developers to create applications for specific software packages, software frameworks, hardware platforms, computer systems, game consoles, operating systems, or other platforms.

“Pre-built” means that the SDK comes with pre-coded assets, libraries, and modules that save developers time as they don’t have to code these features from scratch. These pre-built elements are often customizable and can be used to add specific features or functionalities to an application without having to develop those features from the ground up.

For example, a pre-built SDK from a cloud communications company like ZEGOCLOUD might provide pre-coded assets for features like video chat, voice calls, or real-time messaging. Developers can use these pre-built elements to add such features to their own applications, saving significant development time and effort.

Pre-built SDKs are especially useful for complex or time-consuming features, as they allow developers to focus on the unique aspects of their application rather than on low-coding common features.

Why Pre-built SDK is Important?

pre-built SDKs can significantly accelerate development processes, reduce costs, and increase the reliability and scalability of applications. If you don’t use this tool, you have complex tasks to do, such as:

  1. Interactive interface development – Although the video call has only one page, there are various interactive buttons; each button has multiple states that can be switched in different ways, rendering the interactive interface quite hard to handle.
  2. Audio and video management – Audio and video management require a lot of testing and verification to ensure the stability of calls, such as different platforms, devices, system versions, and network environments which all need to be targeted. It’s a time-consuming effort.
  3. User permissions, call status, and other business-related – include camera and microphone switch permissions, call permissions, call duration, hang up, waiting, and phone status. These states seem simple, but since each has multiple modification paths, the logic underpinning a correct state is complex. For example, if the call is ‘hung up’, there can be ‘active hang-up’, ‘passive hang-up’, network ‘error hang-up’, ‘insufficient quota’, etc.

Not every team can invest a lot of workforce in solving this heavy R&D work, yet Video Call is an essential product function. The solution is to use the Prebuilt SDK to implement the Video Call function quickly.

Why ZEGOCLOUD Prebuilt Web SDK to Make Video Call

ZEGOCLOUD Prebuilt SDK is a set of standard solutions from the integration process of thousands of customers in Video Call customers. Based on ensuring the high encapsulation of the Video Call function, this solution provides a concise configuration file, which is convenient for users to build and configure flexibly quickly.

Using it enables:

  1. An out-of-the-box video chat interface
  2. Built-in bandwidth management
  3. Cross-browser compatibility
  4. Text chat
  5. Participant list
  6. Network quality monitoring
  7. Recording
  8. Call Invitation
  9. Customizable branding LOGO

Step-by-step Guide to EmbZEGOCLOUD Prebuilt SDK

1. Register an account

Create an account in ZEGOCLOUD Official.

create an account prebuilt SDK

Create a project in ZEGOCLOUD Admin Console.

2. Two lines of code complete the access

ZEGOCLOUD’s prebuilt SDK only needs two lines of code to complete SDK access.

  1. Call the init interface to complete the SDK initialization.
  2. Call the joinRoom interface to join the audio and video call.
<html>
  <style>
      #root {
         width: 100vw;
         height: 100vh;
      }
  </style> 
  <body>
  </body>
  <script crossorigin src="https://zegocloud.github.io/zegocloud_prebuilt_webrtc/ZegoPrebuilt/index.umd.js"></script>
    <script>
      const TOKEN = ''; // need to generate TOKEN first
      const prebuilt = ZegoPrebuilt.init(TOKEN);
      prebuilt.joinRoom({
         container: document.querySelector("#root"),
      });
    </script>
</html>

3. Custom prebuilt UI

ZEGOCLOUD’s prebuilt SDK provides a concise configuration file, which is convenient for you to build and configure flexibly quickly.

 prebuilt.joinRoom({
        container: document.querySelector("#root"), // Mount the container, which fills the entire screen by default
        joinScreen: {
          visible: true; // Whether to display the device detection page, default display
          title:"Join Room"; // Device detection page title, default Join Room
          inviteURL:"https://zegocloud.github.io/zegocloud_prebuilt_webrtc/build/index.html?RoomID=test"; // Invite link, not displayed by default
        };
        micEnabled: true; // Whether to enable your own microphone, it is enabled by default
        cameraEnabled: true; // Whether to open your own camera, open by default
        userCanToggleSelfCamera: true; // Whether you can control your own microphone, enabled by default
        userCanToggleSelfMic: true; // Whether you can control the body's own camera, enabled by default
        deviceSettings: true; // Whether to display audio settings, default display
        chatEnabled: true; // Whether to enable chat, enabled by default
        userListEnabled: true; //Whether to display the member list, the default display
        notification: { // message notification in the lower left corner of the video
          userOnlineOfflineTips: true; //Whether to display member in and out, default display
          unreadMessageTips: true; // Whether to display unread messages, default display
        };
        leaveRoomCallback: () => void; // leave the room callback
        branding: {
          logoURL: "https://www.zegocloud.com/_nuxt/img/zegocloud_logo_white.ddbab9f.png", // Brand logo in the upper left corner, not displayed by default
        };
        leftScreen: true; // leave the room page, default is
  });

Run the demo

Try a live demo: See a live demo

In our journey as developers, we’ve seen the power of embedding video call functionality using a prebuilt SDK. It’s not just about saving time, but also about leveraging a robust, scalable solution. The possibilities are endless, and the power to customize and innovate lies in our hands. So, let’s continue to explore, innovate, and bring more possibilities to life with our code. In the world of development, learning never stops.

FAQ about Prebuilt SDK

Q1: How does a pre-built SDK differ from an API?

An API (Application Programming Interface) defines how different software components should interact, while a pre-built SDK (Software Development Kit) is a collection of software tools, including APIs, libraries, and documentation, that developers use to create applications for specific platforms or software.

Q2: Can you give an example of a pre-built SDK?

An example of a pre-built SDK is the Android SDK provided by Google. It offers pre-built tools, libraries, and documentation that developers can use to create Android applications. It saves developers time as they don’t have to build these tools from scratch.

Q3: Why should developers use a pre-built SDK?

Pre-built SDKs save developers time and effort by providing pre-coded tools and libraries. They allow developers to focus on the unique aspects of their application, rather than spending time building common functionalities from scratch.

Let’s Build APP Together

Start building with real-time video, voice & chat SDK for apps today!

Talk to us

Take your apps to the next level with our voice, video and chat APIs

Free Trial
  • 10,000 minutes for free
  • 4,000+ corporate clients
  • 3 Billion daily call minutes

Stay updated with us by signing up for our newsletter!

Don't miss out on important news and updates from ZEGOCLOUD!

* You may unsubscribe at any time using the unsubscribe link in the digest email. See our privacy policy for more information.