This commit is contained in:
2020-12-03 16:24:22 +08:00
parent 6a0a50d9f7
commit 394a8e34b4
3 changed files with 88 additions and 15 deletions

View File

@@ -157,9 +157,9 @@ function setBtnClickFuc() {
$('#logout-btn').on('click', () => {
// window.location.hash='edit'
// console.log(window.location.hash)
var x;
var r=confirm("您确认关闭吗?");
if (r==true){
// var x;
// var r=confirm("您确认关闭吗?");
// if (r==true){
leave();
$('#room-root').hide();
$('#login-root').show();
@@ -188,6 +188,9 @@ function setBtnClickFuc() {
},
success(){
res(1)
},
error(){
res(2)
}
})
})
@@ -204,10 +207,10 @@ function setBtnClickFuc() {
window.parent.location.href="/regime/livedetail?id=" + window.liveid;
})
}
else{
x="你按下了\"取消\"按钮!";
}
// }
// else{
// x="你按下了\"取消\"按钮!";
// }
// leave();
// $('#room-root').hide();
// $('#login-root').show();
@@ -333,11 +336,14 @@ function addMemberView(id) {
const src = $(el.target).attr("src") == "img/camera-on.png" ? 1 : 0
console.log("video" + id);
sendsx(id,src)
window.message(src == 1 ? "关闭摄像头成功" : "解禁摄像头成功")
})
memberElm.find("#mic-btn").click((el)=>{
const src = $(el.target).attr("src") == "img/mic-on.png" ? 1 : 0
console.log("mic" + id);
sendjinyan(id,src)
window.message(src == 1 ? "关闭麦克风成功" : "解禁麦克风成功")
})
memberElm.find("#video-btn").removeAttr("id")
memberElm.find("#mic-btn").removeAttr("id")
@@ -345,6 +351,7 @@ function addMemberView(id) {
console.log("移除")
getname(id).then((res)=>{
$("#" + id).find('div.member-id').html(res);
// console.log(.length)
})
memberElm.appendTo($('#member-list'));

View File

@@ -29,10 +29,10 @@ function getgrouplist(){
promise.then(function(imResponse) {
console.log(imResponse.data.memberCount);
if(imResponse.data.memberCount < 3){
$("#main-video").css("grid-area","1/1/3/5")
$(".video-box").eq(0).css("grid-area","1/1/3/5")
$(".liaotian").css("grid-area","3/1/4/5")
}else{
$("#main-video").css("grid-area","1/1/3/4")
$(".video-box").eq(0).css("grid-area","1/1/3/4")
$(".liaotian").css("grid-area","3/1/4/4")
}
}).catch(function(imError) {