Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start adding remove member feature in reference client #107

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions public/full.js
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,10 @@ window.unmuteVideoMember = () => {
roomObj.videoUnmute({ memberId: id })
}

window.removeMember = (id) => {
roomObj.removeMember({ memberid: id})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the idea is to test a feature that is not exposed in the SDK already, you could do

const result = await window.__client.__wsClient.wsClient.execute(params)

Where params is the JSON-RPC request.

}

window.muteVideoSelf = () => {
roomObj.videoMute()
}
Expand Down Expand Up @@ -1409,6 +1413,14 @@ function updateMembersUI() {
onclick: () => console.log('### Nothing Executed ###'),
parent: actionsDiv,
})
createChildElement({
tag: 'a',
className: 'btn btn-warning',
textContent: 'remove member',
href: '#',
onclick: () => window.removeMember(member.id),
parent: actionsDiv,
})

memberDiv.appendChild(actionsDiv)

Expand Down
Loading