优化了登录

This commit is contained in:
2020-11-12 18:03:30 +08:00
parent 3b2c47e0ec
commit 5d893d26b5
4 changed files with 36 additions and 73 deletions

View File

@@ -12,14 +12,7 @@ let cameraId = '';
let micId = '';
function login() {
if ($('#userId').val() == '') {
alert('用户名不能为空!');
return;
}
if ($('#roomId').val() == '') {
alert('房间号不能为空!');
return;
}
presetting.login(false, options => {
rtc = new RtcClient(options);
join();
@@ -29,7 +22,10 @@ function login() {
share = new ShareClient(options);
});
}
$(function (){
login();
})
function join() {
rtc.join();
$('#login-root').hide();