Skip to content

Commit

Permalink
integrate hand-raise API
Browse files Browse the repository at this point in the history
  • Loading branch information
iAmmar7 committed Oct 9, 2024
1 parent cdbc939 commit f7b54b0
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
10 changes: 10 additions & 0 deletions public/full.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ const inCallElements = [
unlockCallBtn,
deafSelfBtn,
undeafSelfBtn,
raiseHandBtn,
lowerHandBtn,
controlSliders,
controlLayout,
hideVMutedBtn,
Expand Down Expand Up @@ -826,6 +828,14 @@ window.showVideoMuted = () => {
roomObj.showVideoMuted()
}

window.raiseHand = () => {
roomObj.setRaisedHand({ raised: true })
}

window.lowerHand = () => {
roomObj.setRaisedHand({ raised: false })
}

window.changeLayout = (select) => {
console.log('changeLayout', select.value)
roomObj.setLayout({ name: select.value })
Expand Down
23 changes: 21 additions & 2 deletions views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@

<div class="btn-group w-100" role="group">
<button id="lockCallBtn" class="btn btn-warning px-3 mt-2" onClick="lockCall()" disabled="true">
lock room
Lock room
</button>
<button id="unlockCallBtn" class="btn btn-warning px-3 mt-2" onClick="unlockCall()"
disabled="true">
unlock room
Unlock room
</button>
</div>

Expand All @@ -181,6 +181,25 @@
</button>
</div>

<div class="btn-group w-100" role="group">
<button
id="raiseHandBtn"
class="btn btn-warning px-3 mt-2"
onClick="raiseHand()"
disabled="true"
>
Raise hand
</button>
<button
id="lowerHandBtn"
class="btn btn-warning px-3 mt-2"
onClick="lowerHand()"
disabled="true"
>
Lower hand
</button>
</div>

<h5 class="mt-3" for="layout">Controls</h5>
<div class="col-12">
<select class="form-select" onchange="changeLayout(this)" value="" id="layout"></select>
Expand Down

0 comments on commit f7b54b0

Please sign in to comment.