Skip to content

Commit

Permalink
Integrate lock API in the CF playground (#1099)
Browse files Browse the repository at this point in the history
  • Loading branch information
iAmmar7 authored Jul 19, 2024
1 parent b500783 commit a7a5296
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
12 changes: 6 additions & 6 deletions internal/playground-js/src/fabric/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -200,20 +200,20 @@ <h5>Controls</h5>

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

Expand Down
12 changes: 10 additions & 2 deletions internal/playground-js/src/fabric/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ const inCallElements = [
controlLayout,
hideVMutedBtn,
showVMutedBtn,
raiseHandBtn,
lowerHandBtn,
lockRoomBtn,
unlockRoomBtn,
hideScreenShareBtn,
showScreenShareBtn,
controlRecording,
Expand Down Expand Up @@ -501,6 +501,14 @@ window.showVideoMuted = () => {
roomObj.showVideoMuted()
}

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

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

window.changeLayout = (select) => {
roomObj.setLayout({ name: select.value })
}
Expand Down

0 comments on commit a7a5296

Please sign in to comment.