https://github.com/songlin123/video-call
https://github.com/songlin123/video-call
agoraio es6
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/songlin123/video-call
- Owner: SongLin123
- Created: 2018-07-31T02:33:46.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-31T03:05:15.000Z (almost 7 years ago)
- Last Synced: 2025-02-14T10:17:12.217Z (4 months ago)
- Topics: agoraio, es6
- Language: JavaScript
- Size: 182 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# video-call
一个基于声网(agora.io)的视频通话及信令api制作的一对一语音电话的sdk,支持es2015,支持async函数。
## 使用
>
>
> import Client from "agora";
> let client=new Client("your agora appid");
> client.login("account");
> client.calling({remotecount="remotecount",localElementId="localElementId",remoteElementId="remoteElementId"})
## API### METHOD
login(account)
登陆你要使用的uid,必须为数字
calling({
remotecount,
localElementId,
remoteElementId
})
拨打电话
remotecount 拨打的uid,
localElementId 本地视频流播放的标签id,
remoteElementId 远程视频流播放的标签id
endCall()
结束呼叫
refuseCall()
拒绝接听
acceptCall({
remotecount,
localElementId,
remoteElementId
})
接听电话
remotecount 拨打的uid,
localElementId 本地视频流播放的标签id,
remoteElementId 远程视频流播放的标签id