Skip to content

Commit

Permalink
update: meeting_4.2.1 (#226)
Browse files Browse the repository at this point in the history
Co-authored-by: zhangxiaochang <[email protected]>
  • Loading branch information
winsan-zhang and zhangxiaochang authored Feb 2, 2024
1 parent 6bb9e26 commit 6d255bb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions SampleCode/Web/NEMeetingKit_v4.2.1.js

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions SampleCode/Web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<input class="meeting-id" type="text" placeholder="meetingId">
<button onclick="join()">加入</button>
<div id="ne-web-meeting"></div>
<script src="./NEMeetingKit_v3.18.0.js"></script>
<script src="./NEMeetingKit_v4.2.1.js"></script>
<script>
/**
* 先执行项目初始化,将会议初始化操作执行结束后,会依据初始化提供的宽高,进行占位
Expand All @@ -35,14 +35,14 @@
NEMeetingKit.actions.init(0, 0, config, (e) => {
console.log('初始化完成')
}); // (width,height)单位px 建议比例4:3
NEMeetingKit.actions.afterLeave(() => {
NEMeetingKit.actions.on('roomEnded', (reason) => {
console.log('离开会议回调')
})
}
function destory() {
NEMeetingKit.actions.destory(); // 销毁
NEMeetingKit.actions.destroy(); // 销毁
}

function login() {
NEMeetingKit.actions.login({ // 登陆
accountId: 0,
Expand All @@ -54,14 +54,14 @@
}

function loginWithNEMeeting() { // 账号密码登陆
const account = '',password = '';
NEMeetingKit.actions.loginWithNEMeeting(account, password, function(e) {
const username = '',password = '';
NEMeetingKit.actions.loginWithPassword({username, password}, function(e) {
console.log(e)
})
}



function create() { // 创建
NEMeetingKit.actions.create({
meetingNum: 'xxx', // 个人会议号可以在登录完成后通过NEMeetingKit.actions.accountInfo.meetingNum获取。为空表示创建随机会议
Expand All @@ -72,7 +72,7 @@
console.log(e)
})
}

function join() {
var meetingNum = document.querySelector('.meeting-id').value;
NEMeetingKit.actions.join({
Expand All @@ -86,7 +86,7 @@
console.log(e)
})
}

</script>
</body>
</html>
Expand Down

0 comments on commit 6d255bb

Please sign in to comment.