Skip to content

Commit

Permalink
Merge pull request #96 from signalwire/joao/lock_unlock
Browse files Browse the repository at this point in the history
Add lock/unlock
  • Loading branch information
jpsantosbh authored Jul 2, 2024
2 parents 8e72687 + adefd23 commit cdbc939
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions public/full.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ const inCallElements = [
unmuteSelfBtn,
muteVideoSelfBtn,
unmuteVideoSelfBtn,
lockCallBtn,
unlockCallBtn,
deafSelfBtn,
undeafSelfBtn,
controlSliders,
Expand Down Expand Up @@ -800,6 +802,14 @@ window.unmuteVideoSelf = () => {
roomObj.videoUnmute()
}

window.lockCall = () => {
roomObj.lock()
}

window.unlockCall = () => {
roomObj.unlock()
}

window.deafSelf = () => {
roomObj.deaf()
}
Expand Down
10 changes: 10 additions & 0 deletions views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,16 @@
</button>
</div>

<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
</button>
<button id="unlockCallBtn" class="btn btn-warning px-3 mt-2" onClick="unlockCall()"
disabled="true">
unlock room
</button>
</div>

<div class="btn-group w-100" role="group">
<button id="deafSelfBtn" class="btn btn-warning px-3 mt-2" onClick="deafSelf()" disabled="true">
Deaf Self
Expand Down

0 comments on commit cdbc939

Please sign in to comment.