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

nemeeting-core-sdk

v4.7.0

Published

NEMeetingKit

Downloads

3

Readme

NEMeetingKit

NEMeetingKit

下载依赖

$ npm install nemeeting-web-sdk --save

使用

<!-- 预留一个dom用于挂载会议组件 -->
<div id="ne-web-meeting"></div>
import NEMeetingKit from 'nemeeting-web-sdk'

/* 初始化
 * 需要一个id为ne-web-meeting的元素容器用于挂载会议组件
 * @param width:宽度(px),为0则表示100%
 * @param height:高度(px),为0则表示100%
 * @param config:入会配置
 * @param callback: 回调
*/
const config = {
    appKey: '', //云信服务appkey
}
NEMeetingKit.actions.init(0, 0, config, () => {
    console.log('init回调 ', e)

    // 检测浏览器兼容性
    NEMeetingKit.actions.checkSystemRequirements(
        function (err, result) {
            let str = ''
            if (err) {
                str = err
            } else {
                str = result ? "支持" : "不支持"
            }
            console.log('浏览器兼容性检测结果:', str)
        }
    )

    // 事件监听
    NEMeetingKit.actions.on("peerJoin", (members) => {
        console.log("成员加入回调", members);
    });
    NEMeetingKit.actions.on("peerLeave", (uuids) => {
        console.log("成员离开回调", uuids);
    });
    NEMeetingKit.actions.on("roomEnded", (reason) => {
        console.log("房间被关闭", reason);
    });

    NEMeetingKit.actions.addMeetingStatusListener({
      onMeetingStatusChanged: (status: NEMeetingStatus, arg, obj) => {
        console.log('会议状态变更了: ', status, arg, obj)
      },
    })

    // 获取会议相关信息
    const NEMeetingInfo = NEMeetingKit.actions.NEMeetingInfo // 会议基本信息
    const memberInfo = NEMeetingKit.actions.memberInfo // 当前成员信息
    const joinMemberInfo = NEMeetingKit.actions.joinMemberInfo // 入会成员信息

})

// token登录
NEMeetingKit.actions.login({
        accountId: accountId, // 账号
        accountToken: accountToken, // token
    },
    function (e) {
        console.log('login回调', e)
    }
);

// 登出
NEMeetingKit.actions.logout(
    function (e) {
        console.log('logout回调', e)
    }
)

// 加入会议,需要先进行token登录
NEMeetingKit.actions.join({
        meetingId: meetingId, // 会议号
        nickName: nickName, // 会中昵称
        video: 1, // 视频开关,1为打开2为关闭
        audio: 1, // 音频开关,1为打开2为关闭
    },
    function (e) {
        console.log('加入会议回调', e);
    }
);

// 取消监听
NEMeetingKit.actions.off("peerJoin")
NEMeetingKit.actions.off("peerLeave")
NEMeetingKit.actions.off("roomEnded")
NEMeetingKit.actions.removeMeetingStatusListener()

// 销毁sdk
NEMeetingKit.actions.destroy(); // 销毁