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

@teaminua/collabsdk

v0.0.21

Published

## Prerequisites ### 1. Familiarize yourself with Agora by reading the guide on [how to get started with Agora](https://www.agora.io/en/blog/how-to-get-started-with-agora/).

Downloads

143

Readme

Getting started

Before you start integrating Agora into your Angular application, follow these steps to set up and use the Collabora SDK effectively.

Prerequisites

1. Familiarize yourself with Agora by reading the guide on how to get started with Agora.

Setup Instructions

  1. Import CollaboraModule

    In your Angular application, import CollaboraModule into your app.module.ts:

    import { CollaboraModule } from '@teaminua/collabsdk';
    @NgModule({
        imports:[
            CollaboraModule
        ]
    })
  2. Utilize CollaboraService in Your Component

    Import CollaboraService in your component and configure it with your Agora credentials:

    // Import CollaboraService
    import { CollaboraService } from '@teaminua/collabsdk';
    
    // Example initialization in your component
    this.collaboraService.init();
    this.collaboraService.agoraAppId = '<your_agora_app_id>';
    this.collaboraService.agoraToken = '<your_agora_token>';
    this.collaboraService.agoraChannel = '<your_agora_channel>';
    this.collaboraService.userId = '<user_id>';
    this.collaboraService.usersInfo = <ICollaboraUser>{
    uid: '<user_uid>',
    image: '<user_image>',
    name: '<user_name>',
    backgroundColor: '<color>'
    };
    this.collaboraService.join();

    ICollaboraUser interface representation:

    interface ICollaboraUser {
        uid: string;
        image: string;
        name: string;
        backgroundColor: string;
    }

    token should be obtained from your backend. Learn how to obtain an Agora token from your backend

How to Obtain an Agora Token

Instructions are provided for Node.js, but you can also refer to the official Agora documentation for Node.js or GoLang for more details.

  1. Install agora-access-token package
    npm i agora-access-token
  2. Implement token generation in your project::
    const { RtcTokenBuilder, RtcRole } = require('agora-access-token');
    
    const appID = process.env.AGORA_APP_ID;
    const appCertificate = process.env.AGORA_APP_CERTIFICATE;
    const role = RtcRole.PUBLISHER;
    
    const createAgoraToken = (uid, channelName) => {
        const expirationTimeInSeconds = 3600;
        const currentTimestamp = Math.floor(Date.now() / 1000);
        const privilegeExpiredTs = currentTimestamp + expirationTimeInSeconds;
        return RtcTokenBuilder.buildTokenWithAccount(appID, appCertificate,     channelName, uid, role, privilegeExpiredTs);
    }
    
    const getAgoraAppId = () => appID;
    
    module.exports = {
        createAgoraToken,
        getAgoraAppId
    };
    Learn how to generate an AGORA_APP_CERTIFICATE in your Agora console by following this guide.
  3. User collabsdk in your html
    <collabora></collabora>
    or if you want use sidebar
    <collabora-sidebar></collabora-sidebar>