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

tlmeetingserver

v0.0.3

Published

A simple video meeting library based on node.js and typescript

Downloads

7

Readme

About

It is an open-source video meeting package of Teamlinker. It provides a variety of features to help users to build their own meeting rooms like these below:

Features

  1. Very easy to complete video meeting functionality
  2. Support screen share,presenter management
  3. mute & unmute
  4. meeting chat
  5. Free and open-source based on mediasoup

Demo

Teamlinker

Teamlinker provides a full experience of this package.Have a try!

Installation

npm i tlmeetingserver

Usage

TLMeetingServer is based on socket.io,you should build a socket.io connection from client and pass the io instance and meeting config to the TLMeetingServer construct function.

let objMeeting=new MeetingServer(io,meetingConfig as any)
objMeeting.onJoinRoom=async (roomId,extraData, socketData, socketId) => {
    try {
        let objRoom=await MeetingRoomService.getItemById(roomId)
        if(!objRoom) {
            return {
                businessId:null,
                roomName:null,
                error:"room not found"
            }
        } else if(objRoom.getItem().password!==extraData){
            return {
                businessId:null,
                roomName:null,
                error:"password wrong"
            }
        } else if(objRoom.getItem().organization_id!==socketData.organizationId) {
            return {
                businessId:null,
                roomName:null,
                error:"access forbidden"
            }
        } else {
            return {
                businessId:socketData.organizationUserId,
                roomName:objRoom.getItem().name
            }
        }
    } catch (err) {
        console.error(err)
    }
}
objMeeting.onJoinedRoom=async (roomId, businessId, socketId) => {
    try {
        let objRoom=await MeetingRoomService.getItemById(roomId)
        if(objRoom) {
            await objRoom.addMember(businessId)
            emit.in(businessId).socketsJoin(roomId)
        }
    } catch(err) {
        console.error(err)
    }
}
objMeeting.onLeavedRoom=async (type, roomId, businessId) => {
    try {
        let objRoom=await MeetingRoomService.getItemById(roomId)
        if(objRoom) {
            await objRoom.removeMember(businessId)
            emit.in(businessId).socketsLeave(roomId)
        }
    } catch(err) {
        console.error(err)
    }
}
objMeeting.onHandleOperation=async (type, roomId, fromBusinessId, toBusinessId, kind) => {
    try {
        let objRoom=await MeetingRoomService.getItemById(roomId)
        if(objRoom) {
            let ret=await objRoom.getPermission(fromBusinessId)
            if(ret===ECommon_Meeting_Room_Permission.PRESENTER) {
                return true;
            }
        } else {
            return false
        }
    } catch(err) {
        console.error(err)
        return false
    }
}
objMeeting.onDeleteRoom=async roomId => {
    try {
        await rpcContentApi.clearByRefId(roomId)
    } catch (err) {
        console.error(err)
    }

}
objMeeting.onMessageSend=async (roomId, fromBusinessId, message) => {
    try {
        await rpcContentApi.add(roomId,ECommon_Model_Content_Type.MEETING_CHAT, fromBusinessId,message as string)
    } catch (err) {
        console.error(err)
    }

}
await objMeeting.start()

Meeting Config

export default {
  "worker": {
    "logLevel": "warn",
    "logTags": [
      "info",
      "ice",
      "dtls",
      "rtp",
      "srtp",
      "rtcp"
    ],
    "rtcMinPort": 40000,
    "rtcMaxPort": 49999
  },
  "codecs": [
    {
      "kind": "audio",
      "mimeType": "audio/opus",
      "clockRate": 48000,
      "channels": 2
    },
    {
      "kind": "video",
      "mimeType": "video/VP8",
      "clockRate": 90000,
      "parameters": {
        "x-google-start-bitrate": 1000
      }
    },
    {
      "kind": "video",
      "mimeType": "video/VP9",
      "clockRate": 90000,
      "parameters": {
        "profile-id": 2,
        "x-google-start-bitrate": 1000
      }
    },
    {
      "kind": "video",
      "mimeType": "video/h264",
      "clockRate": 90000,
      "parameters": {
        "packetization-mode": 1,
        "profile-level-id": "4d0032",
        "level-asymmetry-allowed": 1,
        "x-google-start-bitrate": 1000
      }
    },
    {
      "kind": "video",
      "mimeType": "video/h264",
      "clockRate": 90000,
      "parameters": {
        "packetization-mode": 1,
        "profile-level-id": "42e01f",
        "level-asymmetry-allowed": 1,
        "x-google-start-bitrate": 1000
      }
    }
  ],
  "webRtcTransport": {
    "listenIps": [
      {
        "ip": "0.0.0.0",
        "announcedIp": "192.168.110.6"  //this ip should be the public ip
      }
    ],
    "enableUdp": true,
    "enableTcp": true,
    "preferUdp": true,
    "enableSctp": false,
    "initialAvailableOutgoingBitrate": 1000000,
    "maxSctpMessageSize": 262144
  }
}

About Teamlinker

Teamlinker is a cooperation platform that integrates different kind of modules.You can contact your teammates,assign your tasks,start a meeting,schedule your events,manage your files and so on with Teamlinker.