Skip to content

Commit

Permalink
Merge pull request #76 from whereby/kevinhanna/pan-305-add-chat-open-…
Browse files Browse the repository at this point in the history
…and-close-methods-to-embed-element

add toggle chat command
  • Loading branch information
kevinwhereby authored Oct 10, 2023
2 parents c033106 + 6e71af3 commit 0dd1777
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@whereby.com/browser-sdk",
"version": "1.9.1",
"version": "1.10.0",
"description": "Configurable web component for embedding Whereby video rooms in web applications",
"author": "Whereby AS",
"license": "MIT",
Expand Down
1 change: 1 addition & 0 deletions src/lib/__tests__/index.unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ describe("@whereby/browser-sdk", () => {
toggleCamera: expect.any(Function),
toggleMicrophone: expect.any(Function),
toggleScreenshare: expect.any(Function),
toggleChat: expect.any(Function),
})
);
});
Expand Down
3 changes: 3 additions & 0 deletions src/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ define("WherebyEmbed", {
toggleScreenshare(enabled) {
this._postCommand("toggle_screenshare", [enabled]);
},
toggleChat(enabled) {
this._postCommand("toggle_chat", [enabled]);
},

onmessage({ origin, data }) {
if (origin !== this.roomUrl.origin) return;
Expand Down

0 comments on commit 0dd1777

Please sign in to comment.