优化了登录
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user