功能基本完成
This commit is contained in:
@@ -273,25 +273,32 @@ function addVideoView(id, isLocal = false) {
|
||||
function addMemberView(id) {
|
||||
let memberElm = $('#member-me').clone();
|
||||
memberElm.attr('id', id);
|
||||
memberElm.find('div.member-id').html(id);
|
||||
// memberElm.attr('class', id);
|
||||
memberElm.css('display', 'flex');
|
||||
memberElm.find("#video-btn").click((el)=>{
|
||||
console.log(el)
|
||||
console.log($(el.target).attr("src"))
|
||||
const src = $(el.target).attr("src") == "img/camera-on.png" ? 1 : 0
|
||||
console.log("video" + id);
|
||||
sendsx(id,src)
|
||||
})
|
||||
memberElm.find("#mic-btn").click((el)=>{
|
||||
console.log($(el.target).attr("src"))
|
||||
const src = $(el.target).attr("src") == "img/mic-on.png" ? 1 : 0
|
||||
console.log("mic" + id);
|
||||
sendjinyan(id,src)
|
||||
})
|
||||
memberElm.find("#video-btn").removeAttr("id")
|
||||
memberElm.find("#mic-btn").removeAttr("id")
|
||||
|
||||
console.log("移除")
|
||||
memberElm.appendTo($('#member-list'));
|
||||
getname(id).then((res)=>{
|
||||
$("#" + id).find('div.member-id').html(res);
|
||||
// console.log(.length)
|
||||
})
|
||||
memberElm.appendTo($('#member-list'));
|
||||
}
|
||||
|
||||
function removeView(id) {
|
||||
console.log("被删除")
|
||||
if ($('#' + id)[0]) {
|
||||
$('#' + id).remove();
|
||||
//将video-grid中第一个div设为main-video
|
||||
|
||||
Reference in New Issue
Block a user