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-electron-sdk

v4.9.0

Published

NetEase Meeting Electron SDK

Downloads

109

Readme

Electron 接入手册

1. 环境准备

1.1 环境要求

  1. 操作系统:win7、win10、win11 的 32 位和 64 位,MacOS 10.11 及以上
  2. nodejs 18.19 以上
  3. electron 版本 24.8.3

1.2 安装

$ npm install --save nemeeting-electron-sdk
# or
$ yarn add nemeeting-electron-sdk
# or
$ pnpm add nemeeting-electron-sdk

2. SDK 快速接入

2.1 导入 SDK

  1. typescript
import NEMeetingKit from 'nemeeting-electron-sdk'
  1. javascript
const { default: NEMeetingKit } = require('nemeeting-electron-sdk')

2.2 初始化 SDK

const neMeetingKit = NEMeetingKit.getInstance()
const appKey = ''
const serverUrl = ''
neMeetingKit.initialize({
  appKey,
  serverUrl,
})

2.3 账户登录,登出

需要先初始化 SDK

//使用 账号密码 登录
const neMeetingKit = NEMeetingKit.getInstance()
const accountService = neMeetingKit.getAccountService()
// 用户账户
const userUuid = ''
// 用户密码
const password = ''
accountService.loginByPassword(userUuid, password)
//账户登出
const neMeetingKit = NEMeetingKit.getInstance()
const accountService = neMeetingKit.getAccountService()

accountService.logout()

2.4 显示会前设置页面,包含音视频预览

需要先初始化 SDK,并且登录账号

const neMeetingKit = NEMeetingKit.getInstance()
const settingsService = neMeetingKit.getSettingsService()

settingsService.openSettingsWindow()

2.5 预约会议

需要先初始化 SDK,并且登录账号

const neMeetingKit = NEMeetingKit.getInstance()
const preMeetingService = neMeetingKit.getPreMeetingService()

preMeetingService.createScheduleMeetingItem().then(({ data: meetingItem }) => {
  // 修改预约会议信息
  meetingItem.subject = ''
  preMeetingService.scheduleMeeting(meetingItem)
})

2.6 开始会议,加入会议,离开当前会议

需要先初始化 SDK,并且登录账号

// 开始会议
const neMeetingKit = NEMeetingKit.getInstance()
const meetingService = neMeetingKit.getMeetingService()

const param = {
  displayName: '入会昵称',
}

meetingService.startMeeting(param)
// 加入会议
const neMeetingKit = NEMeetingKit.getInstance()
const meetingService = neMeetingKit.getMeetingService()

const param = {
  displayName: '入会昵称',
  // 会议号
  meetingNum: '123456',
}

meetingService.joinMeeting(param)
// 离开当前会议
const neMeetingKit = NEMeetingKit.getInstance()
const meetingService = neMeetingKit.getMeetingService()
// false: 离开会议;true: 离开并结束会议
const closeIfHost = false

meetingService.leaveCurrentMeeting(closeIfHost)

3.常用定制化功能

3.1 定制会议中菜单

// 通过 startMeeting 或 joinMeeting opts 传入
const neMeetingKit = NEMeetingKit.getInstance()
const meetingService = neMeetingKit.getMeetingService()

const param = {
  displayName: '入会昵称',
  // 会议号
  meetingNum: '123456',
}

const opts = {
  fullMoreMenuItems: [
    {
      // 自定义菜单需要 id 大于 100
      itemId: 101,
      visibility: NEMenuVisibility.VISIBLE_ALWAYS,
      singleStateItem: {
        // 按钮图标
        icon: '',
        // 按钮文案
        text: '',
      },
    },
  ],
}

meetingService.joinMeeting(param, opts)

3.2 定制会议中菜单回调

const neMeetingKit = NEMeetingKit.getInstance()
const meetingService = neMeetingKit.getMeetingService()

const meetingOnInjectedMenuItemClickListener = {
  onInjectedMenuItemClick(clickInfo, meetingInfo) {
    // 菜单点击回调
  },
}

meetingService.setOnInjectedMenuItemClickListener(
  meetingOnInjectedMenuItemClickListener
)

4. 更多功能

请参考《NEMeetingSDK 接口参考》文档