From 3265e6c2a10ee6544d989eafc5ff88464de4faf2 Mon Sep 17 00:00:00 2001
From: Richard Alam <ritzalam@gmail.com>
Date: Thu, 1 Nov 2012 18:45:51 +0000
Subject: [PATCH]  - add example in 3rd party html to lock unlock layout

---
 bigbluebutton-client/resources/prod/3rd-party.html   | 2 ++
 bigbluebutton-client/resources/prod/lib/3rd-party.js | 5 +++++
 labs/html5-embed/public/index.html                   | 2 ++
 labs/html5-embed/public/js/lib/3rd-party.js          | 5 +++++
 4 files changed, 14 insertions(+)

diff --git a/bigbluebutton-client/resources/prod/3rd-party.html b/bigbluebutton-client/resources/prod/3rd-party.html
index 1a4b1f35e3..4894468501 100755
--- a/bigbluebutton-client/resources/prod/3rd-party.html
+++ b/bigbluebutton-client/resources/prod/3rd-party.html
@@ -42,6 +42,8 @@
       <button type="button" onclick="unmuteAll()">Unmute All</button>
       <button type="button" onclick="switchLayout('Video Chat')">Switch Video Layout</button>
       <button type="button" onclick="switchLayout('Default')">Switch Default Layout</button>
+      <button type="button" onclick="lockLayout(true)">Lock Layout</button>
+      <button type="button" onclick="lockLayout(false)">Unlock Layout</button>
       <button type="button" onclick="sendPublicChat()">Send Public Chat</button>
       <button type="button" onclick="sendPrivateChat()">Send Private Chat</button>
     </div>
diff --git a/bigbluebutton-client/resources/prod/lib/3rd-party.js b/bigbluebutton-client/resources/prod/lib/3rd-party.js
index d6eaacad01..71f6925984 100755
--- a/bigbluebutton-client/resources/prod/lib/3rd-party.js
+++ b/bigbluebutton-client/resources/prod/lib/3rd-party.js
@@ -55,6 +55,11 @@ var switchLayout = function(newLayout) {
   BBB.switchLayout(newLayout);
 }
 
+var lockLayout = function(lock) {
+  BBB.lockLayout(lock);
+}
+
+
 var sendPublicChat = function () {
   var message = "Hello from the Javascript API";
   BBB.sendPublicChatMessage('0x7A7A7A', "en", message);
diff --git a/labs/html5-embed/public/index.html b/labs/html5-embed/public/index.html
index 8b244bcc53..995bdeb8f5 100755
--- a/labs/html5-embed/public/index.html
+++ b/labs/html5-embed/public/index.html
@@ -46,6 +46,8 @@
       <button type="button" onclick="unmuteAll()">Unmute All</button>
       <button type="button" onclick="switchLayout('Video Chat')">Switch Video Layout</button>
       <button type="button" onclick="switchLayout('Default')">Switch Default Layout</button>
+      <button type="button" onclick="lockLayout(true)">Lock Layout</button>
+      <button type="button" onclick="lockLayout(false)">Unlock Layout</button>
       <button type="button" onclick="sendPublicChat()">Send Public Chat</button>
       <button type="button" onclick="sendPrivateChat()">Send Private Chat</button>
     </div>
diff --git a/labs/html5-embed/public/js/lib/3rd-party.js b/labs/html5-embed/public/js/lib/3rd-party.js
index 390c82a5c1..214150ce61 100755
--- a/labs/html5-embed/public/js/lib/3rd-party.js
+++ b/labs/html5-embed/public/js/lib/3rd-party.js
@@ -49,6 +49,11 @@ var switchLayout = function(newLayout) {
   BBB.switchLayout(newLayout);
 }
 
+var lockLayout = function(lock) {
+  BBB.lockLayout(lock);
+}
+
+
 var sendPublicChat = function () {
   var message = "Hello from the Javascript API";
   BBB.sendPublicChatMessage('0x7A7A7A', "en", message);
-- 
GitLab