[mirotalksfu] - add participants search filter
هذا الالتزام موجود في:
@@ -1352,7 +1352,16 @@ async function getRoomParticipants(refresh = false) {
|
||||
|
||||
async function getParticipantsTable(peers) {
|
||||
let table = `
|
||||
<table>
|
||||
<div>
|
||||
<input
|
||||
id="searchParticipants"
|
||||
type="text"
|
||||
placeholder=" 🔍 Search participants ..."
|
||||
name="search"
|
||||
onkeyup="rc.searchPeer();"
|
||||
/>
|
||||
</div>
|
||||
<table id="myTable">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
@@ -1384,7 +1393,7 @@ async function getParticipantsTable(peers) {
|
||||
let peer_id = peer_info.peer_id;
|
||||
if (rc.peer_id === peer_id) {
|
||||
table += `
|
||||
<tr>
|
||||
<tr id='${peer_name}'>
|
||||
<td>${peer_name} (me)</td>
|
||||
<td><button>${peer_audio}</button></td>
|
||||
<td><button>${peer_video}</button></td>
|
||||
|
||||
@@ -2362,6 +2362,29 @@ class RoomClient {
|
||||
}
|
||||
}
|
||||
|
||||
// ####################################################
|
||||
// SEARCH PEER FILTER
|
||||
// ####################################################
|
||||
|
||||
searchPeer() {
|
||||
let input, filter, table, tr, td, i, txtValue;
|
||||
input = this.getId('searchParticipants');
|
||||
filter = input.value.toUpperCase();
|
||||
table = this.getId('myTable');
|
||||
tr = table.getElementsByTagName('tr');
|
||||
for (i = 0; i < tr.length; i++) {
|
||||
td = tr[i].getElementsByTagName('td')[0];
|
||||
if (td) {
|
||||
txtValue = td.textContent || td.innerText;
|
||||
if (txtValue.toUpperCase().indexOf(filter) > -1) {
|
||||
tr[i].style.display = '';
|
||||
} else {
|
||||
tr[i].style.display = 'none';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ####################################################
|
||||
// UPDATE PEER INFO
|
||||
// ####################################################
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم