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

@sendbird/live-uikit-react

v1.0.0-beta.5

Published

Sendbird Live UIKit for React allows you to create customizable views and execute essential live functions

Downloads

31

Readme

Sendbird Live UIKit for React

minified size minzipped size npm version Commercial License


Requirements

The minimum requirements for UiKit for React are:

  • React 16.8.0 or higher
  • React DOM 16.8.0 or higher
  • WebRTC API supported browsers

Before you start

Sendbird UIKit for Live is an add-on to Sendbird Live SDK which provides live streaming feature and uses open channels from Sendbird Chat SDK for chat. Installing the Sendbird UiKit for Live will automatically install the Live SDK and the Chat SDK.

Before installing Sendbird UIKit for Live, create a Sendbird account to acquire an application ID which you will need to initialize the UIKit. Go to Sendbird Dashboard and create an application by selecting Calls+Live in product type. Once you have created an application, go to Overview and you will see the Application ID.


Get Started

You can start building your first live event by installing UIKit for Live. When you install the UiKit for Live, Sendbird Live SDK will be installed implicitly.

Step 1 Install the UIKit

You can install UIKit for React through npm. Enter the following code on the command line with npm. The minimum requirements listed above must be installed on your system to use npm.

Note: If you have already been using Sendbird Chat, the minimum version of the Chat SDK must be equal or greater than [minimum version specified by Live SDK].

npm i @sendbird/live-uikit-react

When using yarn, enter the following command.

yarn add @sendbird/live-uikit-react

An example of a tsconfig file should look like the following:

{
  "compilerOptions": {
    "target": "es5",
    "lib": [
      "dom",
      "dom.iterable",
      "esnext"
    ],
    "esModuleInterop": true,
    "jsx": "react-jsx"
  },
  "include": [
    "src"
  ]
}

Next, import UIKit components to your app.

import { App as SendbirdLiveApp } from "@sendbird/live-uikit-react";

Step 2 Implement UIKit to your web app

Once you're done installing Sendbird UIKit for Live, you can now implement it to your web app by using the App component. The App component is a group of essential UI components needed to build a functioning streaming interface.

Add the following pattern to use the App component:

import { App as SendbirdLiveApp } from "@sendbird/live-uikit-react";

const App = () => {
    return (
        <div className="App">
            <SendbirdLiveApp
                // Add the two lines below.
                appId={YOUR_APP_ID}   // Specify your Sendbird application ID.
                userId={USER_ID}        // Specify your user ID.
            />
        </div>
    );
};

Specify the dimensions of your chat interface.

.App {
  height: 100vh;   // Add this line.
  width: 100vw;   // Add this line.
}

Step 3 Start you first live

You can now run the app to start a streaming. First, create a live event by clicking on the icon in the top-left corner. Then, you can set the title and cover image, and hosts for your live event. After the live event has been created, start the live event by clicking on the icon in the bottom-right corner. Once the live event started, broadcast yourself and chat with the participants.

[insert gif here]

You've successfully started your first live with SendbirdLive.

App

The App component is a collection of all UIKit components needed to quickly implement a basic live, and only requires the app ID and user ID to be configured.

List of property

|Required|Type|Description| |---|---|---| |appId|string|The APP_ID of the Sendbird application.| |userId|string|The unique ID of the user. |

|Optional|Type|Description| |---|---|---| |accessToken|string|An opaque string that identifies the user. It is recommended that every user has their own access token and provides it upon login for security. (Default: null)| |stringSet|object|The set of strings for UIKit components. This can override the default language. (Default: null) | |colorSet|object|The set of colors used in the UIKit themes. This can overrides the default theme. (Default: null) | |imageSet|object|The set of images for UIKit components. This can override the default images. (Default: null) |fontSet|object|The set of fonts for UIKit components. This can override the default fonts. (Default: null) |customize|object|The set of objects that customize each components in App. (Default: null)

customize.liveEventList

|Optional|Type|Description| |---|---|---| |queryParams|LiveEventListQueryParams|The query parameters that the view will use to retrieve live event list. (Default: { limit: 10 }) |renderTitle|() => React.ReactElement|The function that returns alternative title element. (default: null) |renderCreateButton|() => React.ReactElement|The function that returns alternative create live event button element. (default: null) |renderLiveEventElem|(props: { liveEvent: LiveEvent }) => React.ReactElement|The function that returns alternative live event cell in the list view. (default: null) |showStatusLabel|boolean|The boolean to show status label (Default: true) |showHostNickname|boolean|The boolean to show host nickname (Default: true)

customize.liveEventView

|Optional|Type|Description| |---|---|---| |showDuration|boolean|The boolean to show duration while the live event is ongoing (Default: true) |onEndEventClick|(props: { onClick: () => void }) => void|The callback that is fired when end event button (Default: null) |showStatusLabel|boolean|The boolean to show status label (Default: true) |showParticipantCount|boolean|The boolean to show participant count (Default: true) |eventEndViewDisplayTime|number|The millisecond number that determine how long live event end view will be displayed.

customize.hostView

|Optional|Type|Description| |---|---|---| |allowExitWithoutEnding|boolean|The boolean to allow the host exit without end the live event (Default: true) |showEventSummaryView|boolean|The boolean to show the summary view after when the live event ends (Default: true)

customize.CreateEventView

|Optional|Type|Description| |---|---|---| |showUserIdsForHostSelectionView|boolean|The boolean to show the user ids for host selection view. (Default: true) |renderCustomEventHostView|(props:{ userId: string;nickname?: string; profileUrl?: string; hideProfile?: boolean; onRemove?: (userId: string) => void; }|The function that returns alternative event host view element. (default: null)