Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
视频通话信令 SDK
npm install @nereid/shine-vdc --save
<script src="path/to/index.js"></script>
const vdc = new TQVdc({
id: [用户ID],
appKey: [无线云平台注册的clientNameSpace],
dcUrl: [调度中心长链接地址],
voipUrl: [视频通话地址],
msgApi: [信令转发请求地址],
host: [当前用户信息,需包含 `{id, name, sub}`三个字段]
});
receive
- 通话页面传递消息时触发的事件 (data) => {}
默认情况下不太需要去关心该事件的处理,大部分的事件类型已经在内部做了处理,或者转成其他事件抛出
loaded
- 通话页面成功加载的事件 () => {}
一般意味着会议开始
unload
- 通话页面关闭的事件 () => {}
end
- 停止了会议 () => {}
call-vide
- 当收到视频会议邀请时触发 ({ roomId, from, type } ) => {}
当收到其他人的视频会议/通话邀请时,触发该事件,在该事件中可以主动弹出提示框,并告知用户是否接受或者拒绝
leave
- 离开/强制离开会议时触发 ({msg}) => {}
accept
- 当邀请人接受会议邀请时触发 (data) => {}
refuse
- 当邀请人拒绝会议邀请时触发 (data) => {}
fetchUserInfoById
- 需要获取用户信息时触发 (userId) => {}
当视频会议中有新的参会人员加入时,会触发该事件,并传递参会人员的唯一标示信息,一般来说是用户id。在该事件的回掉中可以异步的请求人员信息,然后使用
sendUserInfo
传递该人员的信息
isMeetingChange
- 会议状态改变事件 (flag) => {}
isDisconnectChange
- 视频页面与当前业务(项目)通信状态改变事件 (flag) => {}
vdc.createVoip(cb?: Function)
创建会议的方法,一般在会议创建完成后再发送会议邀请
arguments | required | type | description |
---|---|---|---|
cb | false | Function | 创建会议完成的回掉方法 |
vdc.invite(type: number, id: string, user: UserInfo)
发起视频邀请
arguments | required | type | description |
---|---|---|---|
type | true | number | 视频通话类型,2: 视频会议;3: 语音; 4: 视频通话 |
id | true | string | 被邀请的人员 id |
user | false | UserInfo | 被邀请人的相关信息 |
vdc.sendUserInfo(info: UserInfo)
传递用户信息的方法,配合
fetchUserInfoById
事件使用
arguments | required | type | description |
---|---|---|---|
info | true | UserInfo | 用户信息需包含以下字段{ id, name, sub } |
vdc.reopenVoip()
重新打开视频通话会议
vdc.answerVoip(room: string, from: string, isAccept: boolean, cb?: Function)
应答视频会议邀请的方法
arguments | required | type | description |
---|---|---|---|
room | true | string | 会议室id |
from | true | string | 邀请人 |
isAccept | true | boolean | 是否同意进入会议 |
cb | false | Function | 应答完成后的回调 |
vdc.destroy()
销毁实例,断开信令链接等操作
FAQs
shine voip dispatch center
We found that shine-vdc demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.