{"id":4991,"date":"2021-12-20T15:39:16","date_gmt":"2021-12-20T07:39:16","guid":{"rendered":"https:\/\/www.enablex.io\/developer\/?page_id=4991"},"modified":"2022-04-08T18:49:40","modified_gmt":"2022-04-08T10:49:40","slug":"screen-share","status":"publish","type":"page","link":"https:\/\/doc.smartflomeet.ttns.in\/developer\/video-api\/client-api\/flutter-toolkit\/screen-share\/","title":{"rendered":"Screen Share: Flutter SDK &#8211; Video API"},"content":{"rendered":"\n<p>To support Screen-Sharing in the Room, you need to enable Screen-Sharing during <a href=\"..\/..\/..\/server-api\/rooms-route\/#create-room\" target=\"_blank\" rel=\"noreferrer noopener\">Room Creation<\/a> by setting: <code>{ \"screen_share\": true; })<\/code> in the JSON Payload. To receive Shared Screen, you need to subscribe to the Screen-Share Stream ID# 101 and play it on the Video Player.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Start Screen Sharing<\/h3>\n\n\n\n<p>The&nbsp;<code>EnxRtc.startScreenShare()<\/code>&nbsp;method is used to create a Screen-Sharing Stream @ 6fps to publish in the Room.&nbsp;Screen Sharing continues even when the Application runs in the background.<\/p>\n\n\n\n<p><strong>Class:<\/strong> EnxRtc<\/p>\n\n\n\n<p><strong>Method:<\/strong> <code>static Future&lt;void&gt; startScreenShare(); &nbsp;&nbsp;&nbsp;<\/code><\/p>\n\n\n\n<p><strong>Callbacks:<\/strong><\/p>\n\n\n\n<ul><li><code style=\"background-color: rgb(255, 255, 255);\">onStartScreenShareACK<\/code>&#8211; Acknowledgment to the publisher when Screen Share starts.<\/li><li><code>onScreenSharedStarted<\/code> &#8211; Notification to everyone in the Room when Screen-Sharing starts.<\/li><\/ul>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3>Stop Screen Sharing<\/h3>\n\n\n\n<p>The <code>EnxRtc.stopScreenShare()<\/code>&nbsp;method is used to stop the ongoing Screen-Sharing.<\/p>\n\n\n\n<p><strong>Class:<\/strong> EnxRtc<\/p>\n\n\n\n<p><strong>Method:<\/strong> <code>static Future&lt;void&gt; stopScreenShare();<\/code> <\/p>\n\n\n\n<p><strong>Callbacks:<\/strong><\/p>\n\n\n\n<ul><li><code style=\"background-color: rgb(255, 255, 255);\">onStoppedScreenShareACK<\/code> &#8211; Acknowledgment to the publisher when Screen Share stops.<\/li><li><code>onScreenSharedStopped<\/code> &#8211; Notification to everyone in the Room when Screen-Sharing stops.<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">EnxRtc.onStartScreenShareACK=(Map&lt;dynamic, dynamic&gt; map) {\n\/\/ Publisher receives acknowledgement\n };\nEnxRtc.onStoppedScreenShareACK=(Map&lt;dynamic, dynamic&gt; map) {\n\n\/\/ Publisher receives acknowledgement that Screen Share stopped.\n };\nEnxRtc.onScreenSharedStarted=(Map&lt;dynamic, dynamic&gt; map) {\n\/\/ A new Screen Share Stream is available, receive Information\n };\nEnxRtc.onScreenSharedStopped=(Map&lt;dynamic, dynamic&gt; map) {\n \/\/ Screen Share has stopped. Receive Information\n};<\/pre>\n\n\n\n<p><strong>Error Codes \/ Exceptions<\/strong>:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Code<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>5107<\/td><td>Repeated <code>startScreenShare()<\/code> call made while previous request is in process.<\/td><\/tr><tr><td>1170<\/td><td>Screen-Sharing not supported in your subscription.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\">\n<p>\u2190 <a href=\"..\/file-share\/\"><\/a><a href=\"..\/file-share\/\">File Sharing<\/a><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<p class=\"has-text-align-center\"><a href=\"..\/\">Index<\/a><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<p class=\"has-text-align-right\"><a href=\"..\/custom-signalling\/\"><\/a><a href=\"..\/custom-signalling\/\">Custom Signalling<\/a> \u2192<a href=\"\/developer\/how-to-use\/\"><\/a><\/p>\n<\/div>\n<\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To support Screen-Sharing in the Room, you need to enable Screen-Sharing during Room Creation by setting: { &#8220;screen_share&#8221;: true; }) in the JSON Payload. To receive Shared Screen, you need to subscribe to the Screen-Share Stream ID# 101 and play it on the Video Player. Start Screen Sharing The&nbsp;EnxRtc.startScreenShare()&nbsp;method is used to create a Screen-Sharing Stream @ 6fps to publish in the Room.&nbsp;Screen Sharing continues even when the Application runs&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3755,"menu_order":0,"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":"To support Screen-Sharing in the Room, you need to enable Screen-Sharing during Room Creation by setting: { \"screen_share\": true; }) in the JSON Payload. To receive Shared Screen, you need to subscribe to the Screen-Share Stream ID# 101 and play it on the Video Player. Start Screen Sharing The&nbsp;EnxRtc.startScreenShare()&nbsp;method is used to create a Screen-Sharing&hellip;","_links":{"self":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4991"}],"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=4991"}],"version-history":[{"count":0,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/4991\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/pages\/3755"}],"wp:attachment":[{"href":"https:\/\/doc.smartflomeet.ttns.in\/developer\/wp-json\/wp\/v2\/media?parent=4991"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}