{"id":742,"date":"2020-01-02T14:44:33","date_gmt":"2020-01-02T06:44:33","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=742"},"modified":"2025-04-05T02:25:43","modified_gmt":"2025-04-04T18:25:43","slug":"whiteboard","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video\/solutions\/whiteboard\/","title":{"rendered":"Whiteboard"},"content":{"rendered":"\n<p>Table of Contents<\/p>\n\n\n\n<ul><li><a href=\"#overview\">Overview<\/a>     <\/li><li><a href=\"#how-to-integrate\">How to integrate?<\/a>     <\/li><li><a href=\"#methods\">Methods<\/a>     <ul><li><a href=\"#init-whiteboard\">Initiate Whiteboard <\/a>    <\/li><li><a href=\"#create-whiteboard\">Create Whiteboard<\/a>     <\/li><li><a href=\"#whiteboard-streaming\">Start \/ Stop Streaming<\/a>     <\/li><li><a href=\"#whiteboard-collaboration\">Start \/ Stop Collaboration<\/a>     <\/li><li><a href=\"#whiteboard-collaboration-with-a-participant\">Collaborate with a Participant <\/a>    <\/li><\/ul><\/li><li><a href=\"#references\">References<\/a><\/li><\/ul>\n\n\n\n<a name=\"overview\"><\/a>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2>Overview<\/h2>\n\n\n\n<p>The Whiteboard is an independent library available on GitHub and the Developer Center, designed to help developers easily deploy a whiteboard with streaming and collaboration features for session participants.<\/p>\n\n\n\n<p>The Whiteboard has all basic tools inbuilt. It is developed using Open Source Fabric.js (<a href=\"http:\/\/fabricjs.com\/\">http:\/\/fabricjs.com\/<\/a>). In case you look to extend it and create richer set of Tools, you are free to do so using Fabric.js library.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-button aligncenter\"><a class=\"wp-block-button__link no-border-radius\" href=\"\/developer\/wp-content\/uploads\/whiteboard-sdk\/EnxWb.js.v1.0.zip\">Download Whiteboard v1.0<\/a><\/div>\n\n\n\n<p class=\"has-text-align-center\">Release Date: January 1, 2025. File Size: 441KB<\/p>\n\n\n\n<a name=\"how-to-integrate\"><\/a>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2>How to Integrate?<\/h2>\n\n\n\n<ul><li>Download the Whiteboard Library.<\/li><li> Extract it. Move the <code>EnxWB.js<\/code> and <code>EnxWB.js.map<\/code> files to a designated folder within Virtual Root.<\/li><li> Use the <code>EnxWB.js<\/code> file in your HTML through <code>&lt;Script&gt;<\/code> Tag. <\/li><li> Refer the following section of document to know how to initiate, create, stream and collaborate Whiteboard among other participant of Session.<\/li><\/ul>\n\n\n\n<a name=\"methods\"><\/a>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2>Methods<\/h2>\n\n\n\n<a name=\"init-whiteboard\"><\/a>\n\n\n\n<h3>Initiate Whiteboard<\/h3>\n\n\n\n<p>Create an Object of <code>EnxWb<\/code> Class with a JSON Payload to define Whiteboard UI Components.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">var wbObject  =  new EnxWb(\n\t{\tcanvasId: 'wb',\t\t\/\/ id of the Canvas DOM Element \n\t\tinitialWidth: 1000,\n\t\tinitialHeight: 500,\n\t\tscheme : 'default'\n\t}\n);<\/pre>\n\n\n\n<p><strong>Parameter: <\/strong>A JSON Object, attributes explained below:<\/p>\n\n\n\n<ul><li><code>canvasId<\/code>: The HTML CANVAS Element ID which will be used with the Whiteboard. <\/li><li><code>initialWidth<\/code>: Width of the Whiteboard in pixel.<\/li><li><code>initialHeight<\/code>: Height of the Whiteboard in pixel<\/li><li><code>scheme<\/code>: It\u2019s a scheme \/ template definition of Whiteboard UI Components. You can use default scheme. In case you want to re-define, use custom scheme. And, when you use custom scheme, you need to define each UI component separately using a new object called custom in the JSON payload. E.g.<\/li><li><code>custom<\/code>: Optional. Custom Scheme definition object, in case you are usin scheme=custom. <\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">Var wbObject  =  new EnxWb(\n\t{\tcanvasId: 'wb', \/\/ id of the canvas \n\t\tinitialWidth: 1000,\n\t\tinitialHeight: 500,\n\t\tscheme : 'custom',\n\t\tcustom: {\n\t\t\tbgColor : 'red',\t\t\/* WB Backbround *\/\n\t\t\ttoolbarBGColor : 'black',\t\/* Toolbar Background *\/\n\t\t\tbrushColor:'black',\t\t\/* Default Brush Color *\/\n\t\t\ticon : {\t\t\t\/* Toolbar Icon definition *\/\n\t\t\t\tsize: 'medium', \/* Enum: small,large,medium *\/\n\t\t\t\ttype: 'rounded-square', \/* Enum:  square,rounded-square *\/\n\t\t\t\tBGColor: '#f3f3f3',\t\/* Tool Background *\/\n\t\t\t\tFGColor: '#000000',\t\/* Tool Foreground *\/\n\t\t\t\tborder: '1px solid grey'\/* Tool Border *\/\n\t\t\t}\n\t\t}\n\t}\n);<\/pre>\n\n\n\n<a name=\"create-whiteboard\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Create Whiteboard<\/h3>\n\n\n\n<p>You need to draw the Whiteboard to get make it appear in the HTML DOM using the <code>EnxWb.create()<\/code> method. <\/p>\n\n\n\n<p><strong>Method:<\/strong> <code>EnxWb.create( EnxRoom-Object )<\/code><\/p>\n\n\n\n<p><strong>Parameter<\/strong>: <code>EnxRoom-Object<\/code>: It\u2019s the Room Object with which the Whiteboard to get connected to for streaming and collaboration.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">wbObject.create(roomObject);<\/pre>\n\n\n\n<a name=\"whiteboard-streaming\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Start \/ Stop Whiteboard Streaming<\/h3>\n\n\n\n<p>If you want\nto start streaming your Whiteboard, the Whiteboard contents will be viewable to\nremote participants as video stream and will be playable in a Video Player. The\nStreamed Whiteboard may also be recorded for future reference. <\/p>\n\n\n\n<p><strong>Methods:<\/strong> <\/p>\n\n\n\n<ul><li><code>EnxWb.startStreaming()<\/code> &#8211; To start streaming<\/li><li><code>EnxWb.stopStreaming()<\/code> &#8211; To stop streaming<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">wbObject.startStreaming();\nwbObject.stopStreaming();<\/pre>\n\n\n\n<p><strong>Note:<\/strong> The Whiteboard Toolbar has toggle buttons\nto start\/stop streaming. The methods explained above are called by clicking the\nbuttons. However, these methods accessible to you to create your own UI to\nstart \/ stop streaming.<\/p>\n\n\n\n<a name=\"whiteboard-collaboration\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Start \/ Stop Whiteboard Collaboration<\/h3>\n\n\n\n<p>If you want\nto collaborate Whiteboard with other participants, they will also be able to use\nthe Whiteboard to edit\/collaborate in it. When you share the Whiteboard with\nothers, the UI Component appears in the View in HTML DOM. <\/p>\n\n\n\n<p><strong>Methods:<\/strong> <\/p>\n\n\n\n<ul><li><code>EnxWb.startCollaboration()<\/code> &#8211; To start collaboration with others<\/li><li><code>EnxWb.stopStreaming()<\/code> &#8211; To stop collaboration with others<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">wbObject.startCollaboration();\nwbObject.stopCollaboration();<\/pre>\n\n\n\n<p><strong>Note:<\/strong> The Whiteboard Toolbar has toggle buttons\nto start\/stop Whiteboard Collaboration. The methods explained above are called\nby clicking these buttons. However, these methods accessible to you to create\nyour own UI to start \/ stop Collaboration.<\/p>\n\n\n\n<a name=\"whiteboard-collaboration-with-a-participant\"><\/a>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Whiteboard Collaboration with designated Participant<\/h3>\n\n\n\n<p>If you want\nto collaborate Whiteboard with specific participant, he will also be able to\nuse the Whiteboard to edit\/collaborate in it. When you share the Whiteboard\nwith a participant, the UI Component appears in the View in HTML DOM at\ndesignated Participants\u2019 end-point. <\/p>\n\n\n\n<p><strong>Method<\/strong>: <code>EnxWb.shareWith(clientId)<\/code> &#8211; To start collaboration with participant specified by clientId parameter.<br><strong>Parameter:<\/strong> <code>clientId<\/code>\u2013 Client ID of the participant whom you wish to grant Collaboration Rights. <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">wbObject.shareWith(clientId);<\/pre>\n\n\n\n<p><strong>Note<\/strong>: When you collaborate Whiteboard with all participants; you still need to use the <code>shareWith()<\/code> method to share the whiteboard with any new participant joining the session after the initial <code>startCollaboration()<\/code> was invoked. To do so, refer the following sample code: <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ A new user connected. user JSON has user information\nroom.addEventListener(\"user-connected\", function(event) {\n     \/\/ Share the Whiteboard for Collaboration\n     wbObject.shareWith(event.clientId);\n});<\/pre>\n\n\n\n<a name=\"references\"><\/a>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2>References<\/h2>\n\n\n\n<ul><li><a href=\"\/developer\/wp-content\/uploads\/whiteboard-sdk\/EnxWb.js.v1.0.zip\">Download Whiteboard v1.0<\/a> &#8211; For Integration<\/li><li><a rel=\"noreferrer noopener\" href=\"#\" target=\"_blank\">Github Sample Code <\/a>&#8211; For easy rampup<\/li><li><a href=\"http:\/\/fabricjs.com\/\">Fabric.js<\/a> &#8211; To extend functionality &amp; tool <\/li><\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Table of Contents Overview How to integrate? Methods Initiate Whiteboard Create Whiteboard Start \/ Stop Streaming Start \/ Stop Collaboration Collaborate with a Participant References Overview The Whiteboard is an independent library available on GitHub and the Developer Center, designed to help developers easily deploy a whiteboard with streaming and collaboration features for session participants. The Whiteboard has all basic tools inbuilt. It is developed using Open Source Fabric.js (http:\/\/fabricjs.com\/).&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":116,"menu_order":3,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ub_ctt_via":""},"featured_image_src":null,"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"featured":false,"featured-large":false},"uagb_author_info":{"display_name":"vcxdevwpadmin","author_link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/author\/vcxdevwpadmin\/"},"uagb_comment_info":0,"uagb_excerpt":"Table of Contents Overview How to integrate? Methods Initiate Whiteboard Create Whiteboard Start \/ Stop Streaming Start \/ Stop Collaboration Collaborate with a Participant References Overview The Whiteboard is an independent library available on GitHub and the Developer Center, designed to help developers easily deploy a whiteboard with streaming and collaboration features for session participants.&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/742"}],"collection":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/comments?post=742"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/742\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/116"}],"wp:attachment":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/media?parent=742"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}